Cars project 3 do dokończenia
This commit is contained in:
1 parent
3b96ac1be8
commit
b3be59a011
159 files changed
+9794
-3786
No files matched your search
@@ -0,0 +1,27 @@
|
||||
<h2>favourite cars</h2>
|
||||
<section>
|
||||
<table>
|
||||
<tr>
|
||||
<th>_id</th>
|
||||
<th>model</th>
|
||||
<th>ubezpieczony</th>
|
||||
<th>benzyna</th>
|
||||
<th>uszkodzony</th>
|
||||
<th>naped4x4</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
{{#each car}}
|
||||
<tr>
|
||||
<td>{{_id}}</td>
|
||||
<td>{{model}}</td>
|
||||
<td>{{ubezpieczony}}</td>
|
||||
<td>{{benzyna}}</td>
|
||||
<td>{{uszkodzony}}</td>
|
||||
<td>{{naped4x4}}</td>
|
||||
<td style="text-align: center;">
|
||||
<button>Remove</button>
|
||||
</td>
|
||||
</tr>
|
||||
{{/each}}
|
||||
</table>
|
||||
</section>
|
||||
@@ -11,12 +11,24 @@
|
||||
<body>
|
||||
<nav>
|
||||
<a href="/">Cars</a>
|
||||
<a href="/add">Add</a>
|
||||
<a href="/list">List</a>
|
||||
<a href="/search">Search</a>
|
||||
{{#if (gte privilege_level 1)}}
|
||||
<a href="/favourites">Favourites</a>
|
||||
{{/if}}
|
||||
{{#if (gte privilege_level 2)}}
|
||||
<a href="/add">Add</a>
|
||||
<a href="/delete">Delete</a>
|
||||
<a href="/edit">Edit</a>
|
||||
<a href="/search">Search</a>
|
||||
<a href="/advanced_search">Advanced search</a>
|
||||
{{/if}}
|
||||
<div style="float: right;">
|
||||
{{#if (equ privilege_level 0)}}
|
||||
<a href="/login" style="color: cornflowerblue;">Zaloguj się</a>
|
||||
{{else}}
|
||||
<a href="/logout" style="color: cornflowerblue;">Wyloguj</a>
|
||||
{{/if}}
|
||||
</div>
|
||||
</nav>
|
||||
{{{ body }}}
|
||||
</body>
|
||||
|
||||
@@ -9,6 +9,9 @@
|
||||
<th>uszkodzony</th>
|
||||
<th>naped4x4</th>
|
||||
<th></th>
|
||||
{{#if (gte privilege_level 1)}}
|
||||
<th></th>
|
||||
{{/if}}
|
||||
</tr>
|
||||
{{#each car}}
|
||||
<tr>
|
||||
@@ -22,6 +25,11 @@
|
||||
<button
|
||||
onclick="alert(`id: {{_id}}\nModel: {{model}}\nubezpieczony: {{ubezpieczony}}\nbenzyna: {{benzyna}}\nuszkodzony: {{uszkodzony}}\nnaped4x4: {{naped4x4}}`);">INFO</button>
|
||||
</td>
|
||||
{{#if (gte ../privilege_level 1)}}
|
||||
<td>
|
||||
<button onclick="window.location = `/fav?id={{_id}}`">FAV</button>
|
||||
</td>
|
||||
{{/if}}
|
||||
</tr>
|
||||
{{/each}}
|
||||
</table>
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
<h2>Zaloguj się</h2>
|
||||
|
||||
<section>
|
||||
<form method="post">
|
||||
{{#if badcreds}}
|
||||
<span style="color: red;">Nieprawidłowe dane logowania!</span><br><br>
|
||||
{{/if}}
|
||||
<input type="text" name="login" id="login" placeholder="user | admin"><br><br>
|
||||
<input type="password" name="password" id="password" placeholder="123"><br><br>
|
||||
<input type="submit" value="Zaloguj się">
|
||||
</form>
|
||||
</section>
|
||||
Reference in new issue
Block a user