allura
Revision | aaa49753cdc02320e9b37f1251e50dab976bc009 (tree) |
---|---|
Zeit | 2012-04-20 05:54:24 |
Autor | Tim Van Steenburgh <tvansteenburgh@geek...> |
Commiter | Yaroslav Luzin |
[#2827] Fix for "can't create new search bin if none exist."
Signed-off-by: Tim Van Steenburgh <tvansteenburgh@geek.net>
@@ -12,7 +12,6 @@ | ||
12 | 12 | {% block header %}Saved Search Bins{% endblock %} |
13 | 13 | |
14 | 14 | {% block content %} |
15 | - {% if bins.__len__() %} | |
16 | 15 | <form action="{{c.project.url()}}admin/{{app.config.options.mount_point}}/bins/update_bins" method="post" class="update_bins"> |
17 | 16 | <table> |
18 | 17 | <thead> |
@@ -23,6 +22,9 @@ | ||
23 | 22 | </tr> |
24 | 23 | </thead> |
25 | 24 | <tbody class="bin-list"> |
25 | + {% if not bins %} | |
26 | + <tr><td colspan="3">No saved search bins have been created yet.</td></tr> | |
27 | + {% endif %} | |
26 | 28 | {% for bin in bins %} |
27 | 29 | <tr{% if loop.index0 % 2 == 0 %} class="even"{% endif %}> |
28 | 30 | <td class="view" {% if bin.error %}style="display:none"{% endif %}><a href="{{bin.url()}}">{{bin.summary}}</a></td> |
@@ -45,7 +47,7 @@ | ||
45 | 47 | <tr class="new_bin" {% if not (new_bin and new_bin.error) %}style="display:none"{% endif %}> |
46 | 48 | <td {% if new_bin and new_bin.error %}style="vertical-align:top"{% endif %}> |
47 | 49 | <input type="hidden" name="bins-{{num_bins}}.id"> |
48 | - <input type="hidden" name="bins-{{loop.index0}}.delete" value="False" class="delete_flag"> | |
50 | + <input type="hidden" name="bins-{{num_bins}}.delete" value="False" class="delete_flag"> | |
49 | 51 | <input type="text" name="bins-{{num_bins}}.summary" placeholder="Summary" {% if new_bin %}value="{{new_bin.summary}}"{% endif %}> |
50 | 52 | </td> |
51 | 53 | <td> |
@@ -67,9 +69,6 @@ | ||
67 | 69 | {% endif %} |
68 | 70 | </div> |
69 | 71 | </form> |
70 | - {% else %} | |
71 | - No saved search bins have been created yet. | |
72 | - {% endif %} | |
73 | 72 | {{c.search_help_modal.display()}} |
74 | 73 | {% endblock %} |
75 | 74 |