home · contact · privacy
Template layout and code improvements.
[plomtask] / templates / _macros.html
index 14395914052efd6511eddc6cc82bbe947dda62c4..23dfbe9fb75d53a0fe866c1228eeee7e51a0a6da 100644 (file)
@@ -1,8 +1,10 @@
 {% macro edit_buttons() %}
+<div class="edit_buttons">
 <input class="btn-harmless" type="submit" name="update" value="update" />
 <div class="btn-to-right">
 <input class="btn-dangerous" type="submit" name="delete" value="delete" />
 </div>
+</div>
 {% endmacro %}
 
 
@@ -39,6 +41,7 @@
 
 {% macro history_page(item_name, item, attribute_name, attribute, as_pre=false) %}
 <h3>{{item_name}} {{attribute_name}} history</h3>
+<form action="{{item_name}}_{{attribute_name}}s?id={{item.id_}}" method="POST">
 <table>
 
 <tr>
 <td><a href="{{item_name}}?id={{item.id_}}">{{item.title.newest|e}}</a></td>
 </tr>
 
+
 {% for date in attribute.history.keys() | sort(reverse=True) %}
 <tr>
-<th>{{date | truncate(19, True, '') }}</th>
+<td><input name="at:{{date}}" class="timestamp" value="{{date|truncate(19, True, '', 0)}}"></td>
 <td>{% if as_pre %}<pre>{% endif %}{{attribute.history[date]}}{% if as_pre %}</pre>{% endif %}</td>
 </tr>
 {% endfor %}
 
 </table>
+<input class="btn-harmless" type="submit" name="update" value="update" />
+</form>
 {% endmacro %}