Преглед изворни кода

Prettier formatting of tags and link for edit

oz123 пре 10 година
родитељ
комит
15b852a687
2 измењених фајлова са 2 додато и 2 уклоњено
  1. 1 1
      pwman/ui/templates/edit.tpl
  2. 1 1
      pwman/ui/templates/main.tpl

+ 1 - 1
pwman/ui/templates/edit.tpl

@@ -4,6 +4,6 @@ Username: <input type="text" name="username" value="{{node.username}}"><br>
 Password: <input type="password" name="password" value="{{node.password}}"><br>
 Repeat Password: <input type="password" name="password" value="{{node.password}}"><br>
 Notes: <input type="text" name="notes" value="{{node.notes}}"><br>
-Tags: <input type="text" name="tags" value="{{node.tags}}"><br>
+Tags: <input type="text" name="tags" value="{{  ', '.join([t.strip() for t in filter(None, node.tags)]) }}"><br>
  <input type="submit" value="Save edits">
 </form>

+ 1 - 1
pwman/ui/templates/main.tpl

@@ -15,7 +15,7 @@
   %# <td><a href={{node._id}}><{{item}}</a></td>
   <td><a href=/node/{{node._id}}>{{node.username}}@{{node.url}}</a></td>
   <td>{{  ', '.join([t.strip() for t in filter(None, node.tags)]) }}</td>
-  <td>edit</td>
+  <td><a href="/edit/{{node._id}}>edit</td>
   %end
   </tr>
 %end