annotate MoinMoin/templates/index.html @ 1829:6ef26d1fa2fe

Use different macros for dir and file in index, make dir items link to +index view instead of +show
author Cheer Xiao <xiaqqaix@gmail.com>
date Fri, 05 Oct 2012 11:13:28 +0800
parents 54062fc0ca97
children 9e8e47fd8fba
rev   line source
977
d8c8dc20cc5f fixes #54, global index inherited from wrong parent template
Bruno Martin <bruno@hacklab.com.br>
parents: 523
diff changeset
1 {% extends theme("layout.html") %}
1420
100197cb69ab Convert Flatland forms to contain rendering hints.
Cheer Xiao <xiaqqaix@gmail.com>
parents: 1397
diff changeset
2 {% import "forms.html" as forms with context %}
1241
95abf895be4f Refactor title code, fixes #147
Sam Toyer <samATqxcvDOTnet>
parents: 977
diff changeset
3
95abf895be4f Refactor title code, fixes #147
Sam Toyer <samATqxcvDOTnet>
parents: 977
diff changeset
4 {% if item_name %}
95abf895be4f Refactor title code, fixes #147
Sam Toyer <samATqxcvDOTnet>
parents: 977
diff changeset
5 {% set title = _("Index of subitems of '%(item_name)s'", item_name=item_name) %}
95abf895be4f Refactor title code, fixes #147
Sam Toyer <samATqxcvDOTnet>
parents: 977
diff changeset
6 {% else %}
95abf895be4f Refactor title code, fixes #147
Sam Toyer <samATqxcvDOTnet>
parents: 977
diff changeset
7 {% set title = _("Global Index") %}
95abf895be4f Refactor title code, fixes #147
Sam Toyer <samATqxcvDOTnet>
parents: 977
diff changeset
8 {% endif %}
95abf895be4f Refactor title code, fixes #147
Sam Toyer <samATqxcvDOTnet>
parents: 977
diff changeset
9
505
e65f9a5ee6df selet item feature added on index page
Akash Sinha <akash2607@gmail.com>
parents: 497
diff changeset
10 {% block head_scripts %}
e65f9a5ee6df selet item feature added on index page
Akash Sinha <akash2607@gmail.com>
parents: 497
diff changeset
11 {{ super() }}
1433
246a8b1019d4 add i18n to global index javascript; Requires following cs to move index_action.js from /static/js/ to /templates/
Roger Haase <crosseyedpenguin@yahoo.com>
parents: 1426
diff changeset
12 <script src="{{ url_for('frontend.template', filename='index_action.js') }}"></script>
505
e65f9a5ee6df selet item feature added on index page
Akash Sinha <akash2607@gmail.com>
parents: 497
diff changeset
13 {% endblock %}
0
5568cf133caf create moin/2.0 repo, drop all history (see notes below)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents:
diff changeset
14
1755
ef3990098268 Refactor foobar templates for better code reusing.
Cheer Xiao <xiaqqaix@gmail.com>
parents: 1742
diff changeset
15 {% block action_bars_inner %}
ef3990098268 Refactor foobar templates for better code reusing.
Cheer Xiao <xiaqqaix@gmail.com>
parents: 1742
diff changeset
16 <ul>
ef3990098268 Refactor foobar templates for better code reusing.
Cheer Xiao <xiaqqaix@gmail.com>
parents: 1742
diff changeset
17 {% if index %}
ef3990098268 Refactor foobar templates for better code reusing.
Cheer Xiao <xiaqqaix@gmail.com>
parents: 1742
diff changeset
18 <li class="action-bar">
ef3990098268 Refactor foobar templates for better code reusing.
Cheer Xiao <xiaqqaix@gmail.com>
parents: 1742
diff changeset
19 <div class="moin-select-all">
ef3990098268 Refactor foobar templates for better code reusing.
Cheer Xiao <xiaqqaix@gmail.com>
parents: 1742
diff changeset
20 <span class="moin-select-allitem allitem-toselect" title="{{ _("Select All") }}">{{ _("Select All") }}</span>
ef3990098268 Refactor foobar templates for better code reusing.
Cheer Xiao <xiaqqaix@gmail.com>
parents: 1742
diff changeset
21 </div>
ef3990098268 Refactor foobar templates for better code reusing.
Cheer Xiao <xiaqqaix@gmail.com>
parents: 1742
diff changeset
22 </li>
ef3990098268 Refactor foobar templates for better code reusing.
Cheer Xiao <xiaqqaix@gmail.com>
parents: 1742
diff changeset
23 {% endif %}
ef3990098268 Refactor foobar templates for better code reusing.
Cheer Xiao <xiaqqaix@gmail.com>
parents: 1742
diff changeset
24 <li class="action-bar">
ef3990098268 Refactor foobar templates for better code reusing.
Cheer Xiao <xiaqqaix@gmail.com>
parents: 1742
diff changeset
25 <div class="moin-select-actions">
ef3990098268 Refactor foobar templates for better code reusing.
Cheer Xiao <xiaqqaix@gmail.com>
parents: 1742
diff changeset
26 <div>
ef3990098268 Refactor foobar templates for better code reusing.
Cheer Xiao <xiaqqaix@gmail.com>
parents: 1742
diff changeset
27 <span class="show-action">Actions</span>
ef3990098268 Refactor foobar templates for better code reusing.
Cheer Xiao <xiaqqaix@gmail.com>
parents: 1742
diff changeset
28 </div>
ef3990098268 Refactor foobar templates for better code reusing.
Cheer Xiao <xiaqqaix@gmail.com>
parents: 1742
diff changeset
29 <ul>
ef3990098268 Refactor foobar templates for better code reusing.
Cheer Xiao <xiaqqaix@gmail.com>
parents: 1742
diff changeset
30 <li id="moin-create-newitem">{{ _("New item") }}</li>
ef3990098268 Refactor foobar templates for better code reusing.
Cheer Xiao <xiaqqaix@gmail.com>
parents: 1742
diff changeset
31 {% if index %}
ef3990098268 Refactor foobar templates for better code reusing.
Cheer Xiao <xiaqqaix@gmail.com>
parents: 1742
diff changeset
32 <li id="moin-download-trigger">{{ _("Download") }}</li>
ef3990098268 Refactor foobar templates for better code reusing.
Cheer Xiao <xiaqqaix@gmail.com>
parents: 1742
diff changeset
33 <li class="moin-action-tab"
ef3990098268 Refactor foobar templates for better code reusing.
Cheer Xiao <xiaqqaix@gmail.com>
parents: 1742
diff changeset
34 id="moin-delete-trigger"
ef3990098268 Refactor foobar templates for better code reusing.
Cheer Xiao <xiaqqaix@gmail.com>
parents: 1742
diff changeset
35 data-actionurl="{{ url_for('frontend.ajaxdelete', item_name=item_name) }}">
ef3990098268 Refactor foobar templates for better code reusing.
Cheer Xiao <xiaqqaix@gmail.com>
parents: 1742
diff changeset
36 {{ _("Delete") }}
ef3990098268 Refactor foobar templates for better code reusing.
Cheer Xiao <xiaqqaix@gmail.com>
parents: 1742
diff changeset
37 </li>
ef3990098268 Refactor foobar templates for better code reusing.
Cheer Xiao <xiaqqaix@gmail.com>
parents: 1742
diff changeset
38 <li class="moin-action-tab"
ef3990098268 Refactor foobar templates for better code reusing.
Cheer Xiao <xiaqqaix@gmail.com>
parents: 1742
diff changeset
39 id="moin-destroy-trigger"
ef3990098268 Refactor foobar templates for better code reusing.
Cheer Xiao <xiaqqaix@gmail.com>
parents: 1742
diff changeset
40 data-actionurl="{{ url_for('frontend.ajaxdestroy', item_name=item_name) }}">
ef3990098268 Refactor foobar templates for better code reusing.
Cheer Xiao <xiaqqaix@gmail.com>
parents: 1742
diff changeset
41 {{ _("Destroy") }}
ef3990098268 Refactor foobar templates for better code reusing.
Cheer Xiao <xiaqqaix@gmail.com>
parents: 1742
diff changeset
42 </li>
ef3990098268 Refactor foobar templates for better code reusing.
Cheer Xiao <xiaqqaix@gmail.com>
parents: 1742
diff changeset
43 {% endif %}
ef3990098268 Refactor foobar templates for better code reusing.
Cheer Xiao <xiaqqaix@gmail.com>
parents: 1742
diff changeset
44 </ul>
ef3990098268 Refactor foobar templates for better code reusing.
Cheer Xiao <xiaqqaix@gmail.com>
parents: 1742
diff changeset
45 </div>
ef3990098268 Refactor foobar templates for better code reusing.
Cheer Xiao <xiaqqaix@gmail.com>
parents: 1742
diff changeset
46 </li>
ef3990098268 Refactor foobar templates for better code reusing.
Cheer Xiao <xiaqqaix@gmail.com>
parents: 1742
diff changeset
47 <li class="action-bar">
ef3990098268 Refactor foobar templates for better code reusing.
Cheer Xiao <xiaqqaix@gmail.com>
parents: 1742
diff changeset
48 <div class="moin-contenttypes-wrapper">
ef3990098268 Refactor foobar templates for better code reusing.
Cheer Xiao <xiaqqaix@gmail.com>
parents: 1742
diff changeset
49 <div class="ct-hide">{{ _("Filter by content type") }}</div>
ef3990098268 Refactor foobar templates for better code reusing.
Cheer Xiao <xiaqqaix@gmail.com>
parents: 1742
diff changeset
50 {% set unknown_items_label = _("items having unknown mime types") %}
ef3990098268 Refactor foobar templates for better code reusing.
Cheer Xiao <xiaqqaix@gmail.com>
parents: 1742
diff changeset
51 {{ gen.form.open(form, method="get", action=url_for('frontend.index', item_name=item_name)) }}
ef3990098268 Refactor foobar templates for better code reusing.
Cheer Xiao <xiaqqaix@gmail.com>
parents: 1742
diff changeset
52 <ul>
ef3990098268 Refactor foobar templates for better code reusing.
Cheer Xiao <xiaqqaix@gmail.com>
parents: 1742
diff changeset
53 <li>
ef3990098268 Refactor foobar templates for better code reusing.
Cheer Xiao <xiaqqaix@gmail.com>
parents: 1742
diff changeset
54 <a href="#" class="filter-toggle">&raquo; {{ _("Toggle") }}</a>
ef3990098268 Refactor foobar templates for better code reusing.
Cheer Xiao <xiaqqaix@gmail.com>
parents: 1742
diff changeset
55 <a href="#" class="filter-more">&raquo; {{ _("More") }}</a>
ef3990098268 Refactor foobar templates for better code reusing.
Cheer Xiao <xiaqqaix@gmail.com>
parents: 1742
diff changeset
56 </li>
ef3990098268 Refactor foobar templates for better code reusing.
Cheer Xiao <xiaqqaix@gmail.com>
parents: 1742
diff changeset
57 {{ forms.render(form['contenttype']) }}
ef3990098268 Refactor foobar templates for better code reusing.
Cheer Xiao <xiaqqaix@gmail.com>
parents: 1742
diff changeset
58 </ul>
ef3990098268 Refactor foobar templates for better code reusing.
Cheer Xiao <xiaqqaix@gmail.com>
parents: 1742
diff changeset
59 {{ forms.render(form['submit']) }}
ef3990098268 Refactor foobar templates for better code reusing.
Cheer Xiao <xiaqqaix@gmail.com>
parents: 1742
diff changeset
60 {{ gen.form.close() }}
ef3990098268 Refactor foobar templates for better code reusing.
Cheer Xiao <xiaqqaix@gmail.com>
parents: 1742
diff changeset
61 </div>
ef3990098268 Refactor foobar templates for better code reusing.
Cheer Xiao <xiaqqaix@gmail.com>
parents: 1742
diff changeset
62 </li>
ef3990098268 Refactor foobar templates for better code reusing.
Cheer Xiao <xiaqqaix@gmail.com>
parents: 1742
diff changeset
63 </ul>
ef3990098268 Refactor foobar templates for better code reusing.
Cheer Xiao <xiaqqaix@gmail.com>
parents: 1742
diff changeset
64 {% endblock %}
ef3990098268 Refactor foobar templates for better code reusing.
Cheer Xiao <xiaqqaix@gmail.com>
parents: 1742
diff changeset
65
ef3990098268 Refactor foobar templates for better code reusing.
Cheer Xiao <xiaqqaix@gmail.com>
parents: 1742
diff changeset
66 {% block action_bars %}
ef3990098268 Refactor foobar templates for better code reusing.
Cheer Xiao <xiaqqaix@gmail.com>
parents: 1742
diff changeset
67 <div class="moin-align-right">
ef3990098268 Refactor foobar templates for better code reusing.
Cheer Xiao <xiaqqaix@gmail.com>
parents: 1742
diff changeset
68 {{ self.action_bars_inner() }}
ef3990098268 Refactor foobar templates for better code reusing.
Cheer Xiao <xiaqqaix@gmail.com>
parents: 1742
diff changeset
69 </div>
ef3990098268 Refactor foobar templates for better code reusing.
Cheer Xiao <xiaqqaix@gmail.com>
parents: 1742
diff changeset
70 {% endblock %}
ef3990098268 Refactor foobar templates for better code reusing.
Cheer Xiao <xiaqqaix@gmail.com>
parents: 1742
diff changeset
71
1829
6ef26d1fa2fe Use different macros for dir and file in index, make dir items link to +index view instead of +show
Cheer Xiao <xiaqqaix@gmail.com>
parents: 1800
diff changeset
72 {% set maxchars = 20 %}
6ef26d1fa2fe Use different macros for dir and file in index, make dir items link to +index view instead of +show
Cheer Xiao <xiaqqaix@gmail.com>
parents: 1800
diff changeset
73
6ef26d1fa2fe Use different macros for dir and file in index, make dir items link to +index view instead of +show
Cheer Xiao <xiaqqaix@gmail.com>
parents: 1800
diff changeset
74 {% macro render_dir_entry(e) %}
6ef26d1fa2fe Use different macros for dir and file in index, make dir items link to +index view instead of +show
Cheer Xiao <xiaqqaix@gmail.com>
parents: 1800
diff changeset
75 <div>
6ef26d1fa2fe Use different macros for dir and file in index, make dir items link to +index view instead of +show
Cheer Xiao <xiaqqaix@gmail.com>
parents: 1800
diff changeset
76 <a href="{{ url_for('.index', item_name=e.meta['name']) }}"
6ef26d1fa2fe Use different macros for dir and file in index, make dir items link to +index view instead of +show
Cheer Xiao <xiaqqaix@gmail.com>
parents: 1800
diff changeset
77 {# TODO .moin-dir-item class is not styled yet #}
6ef26d1fa2fe Use different macros for dir and file in index, make dir items link to +index view instead of +show
Cheer Xiao <xiaqqaix@gmail.com>
parents: 1800
diff changeset
78 class="moin-dir-item"
6ef26d1fa2fe Use different macros for dir and file in index, make dir items link to +index view instead of +show
Cheer Xiao <xiaqqaix@gmail.com>
parents: 1800
diff changeset
79 title="{{ e.relname }}">
6ef26d1fa2fe Use different macros for dir and file in index, make dir items link to +index view instead of +show
Cheer Xiao <xiaqqaix@gmail.com>
parents: 1800
diff changeset
80 {{ e.relname|truncate(maxchars, true, '..') }}
6ef26d1fa2fe Use different macros for dir and file in index, make dir items link to +index view instead of +show
Cheer Xiao <xiaqqaix@gmail.com>
parents: 1800
diff changeset
81 </a>
6ef26d1fa2fe Use different macros for dir and file in index, make dir items link to +index view instead of +show
Cheer Xiao <xiaqqaix@gmail.com>
parents: 1800
diff changeset
82 </div>
6ef26d1fa2fe Use different macros for dir and file in index, make dir items link to +index view instead of +show
Cheer Xiao <xiaqqaix@gmail.com>
parents: 1800
diff changeset
83 {% endmacro %}
6ef26d1fa2fe Use different macros for dir and file in index, make dir items link to +index view instead of +show
Cheer Xiao <xiaqqaix@gmail.com>
parents: 1800
diff changeset
84
6ef26d1fa2fe Use different macros for dir and file in index, make dir items link to +index view instead of +show
Cheer Xiao <xiaqqaix@gmail.com>
parents: 1800
diff changeset
85 {% macro render_file_entry(e) %}
1766
b78098593483 templates/index.html: Add macro render_entry.
Cheer Xiao <xiaqqaix@gmail.com>
parents: 1755
diff changeset
86 <div>
b78098593483 templates/index.html: Add macro render_entry.
Cheer Xiao <xiaqqaix@gmail.com>
parents: 1755
diff changeset
87 <span class="moin-select-item">&nbsp;</span>
b78098593483 templates/index.html: Add macro render_entry.
Cheer Xiao <xiaqqaix@gmail.com>
parents: 1755
diff changeset
88 {% set mimetype = "application/x.moin.download" %}
b78098593483 templates/index.html: Add macro render_entry.
Cheer Xiao <xiaqqaix@gmail.com>
parents: 1755
diff changeset
89 <a href="{{ url_for('.download_item', item_name=e.meta['name'], mimetype=mimetype) }}" class="moin-download-link">
b78098593483 templates/index.html: Add macro render_entry.
Cheer Xiao <xiaqqaix@gmail.com>
parents: 1755
diff changeset
90 </a>
b78098593483 templates/index.html: Add macro render_entry.
Cheer Xiao <xiaqqaix@gmail.com>
parents: 1755
diff changeset
91 <a href="{{ url_for('.show_item', item_name=e.meta['name']) }}"
b78098593483 templates/index.html: Add macro render_entry.
Cheer Xiao <xiaqqaix@gmail.com>
parents: 1755
diff changeset
92 {# TODO .moin-itemtype-* classes are not styled yet #}
b78098593483 templates/index.html: Add macro render_entry.
Cheer Xiao <xiaqqaix@gmail.com>
parents: 1755
diff changeset
93 class="{{ e.meta['contenttype']|contenttype_to_class }} moin-itemtype-{{ e.meta['itemtype'] }} moin-item"
b78098593483 templates/index.html: Add macro render_entry.
Cheer Xiao <xiaqqaix@gmail.com>
parents: 1755
diff changeset
94 title="{{ e.relname }}">
b78098593483 templates/index.html: Add macro render_entry.
Cheer Xiao <xiaqqaix@gmail.com>
parents: 1755
diff changeset
95 {{ e.relname|truncate(maxchars, true, '..') }}
b78098593483 templates/index.html: Add macro render_entry.
Cheer Xiao <xiaqqaix@gmail.com>
parents: 1755
diff changeset
96 </a>
b78098593483 templates/index.html: Add macro render_entry.
Cheer Xiao <xiaqqaix@gmail.com>
parents: 1755
diff changeset
97 </div>
b78098593483 templates/index.html: Add macro render_entry.
Cheer Xiao <xiaqqaix@gmail.com>
parents: 1755
diff changeset
98 {% endmacro %}
b78098593483 templates/index.html: Add macro render_entry.
Cheer Xiao <xiaqqaix@gmail.com>
parents: 1755
diff changeset
99
0
5568cf133caf create moin/2.0 repo, drop all history (see notes below)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents:
diff changeset
100 {% block content %}
523
200be16e8d55 select all link moved separate from actions bar and some re-styilng done (to hande with width issue)
Akash Sinha <akash2607@gmail.com>
parents: 521
diff changeset
101 <div class="moin-index-message"><span></span></div>
1755
ef3990098268 Refactor foobar templates for better code reusing.
Cheer Xiao <xiaqqaix@gmail.com>
parents: 1742
diff changeset
102 {{ self.action_bars() }}
515
e665d70b0278 index page view modified (elements re-arranged on the page)
Akash Sinha <akash2607@gmail.com>
parents: 513
diff changeset
103 <div>
497
d20568493a93 unified global_index and item index, thus we are now left with only 1 type of index
Akash Sinha <akash2607@gmail.com>
parents: 493
diff changeset
104 {% if item_name: %}
1241
95abf895be4f Refactor title code, fixes #147
Sam Toyer <samATqxcvDOTnet>
parents: 977
diff changeset
105 <h1>{{ title }}</h1>
497
d20568493a93 unified global_index and item index, thus we are now left with only 1 type of index
Akash Sinha <akash2607@gmail.com>
parents: 493
diff changeset
106 <div class="moin-index-path">
d20568493a93 unified global_index and item index, thus we are now left with only 1 type of index
Akash Sinha <akash2607@gmail.com>
parents: 493
diff changeset
107 <a href="{{ url_for('frontend.index') }}" title="{{ _("Global Index") }}">{{ ("..") }}</a>
d20568493a93 unified global_index and item index, thus we are now left with only 1 type of index
Akash Sinha <akash2607@gmail.com>
parents: 493
diff changeset
108 <span class="moin-path-separator">{{ ("/") }}</span>
d20568493a93 unified global_index and item index, thus we are now left with only 1 type of index
Akash Sinha <akash2607@gmail.com>
parents: 493
diff changeset
109 {% for i in range(0, item_names|count) %}
d20568493a93 unified global_index and item index, thus we are now left with only 1 type of index
Akash Sinha <akash2607@gmail.com>
parents: 493
diff changeset
110 {% set fullname = item_names[:i+1]|join('/') %}
d20568493a93 unified global_index and item index, thus we are now left with only 1 type of index
Akash Sinha <akash2607@gmail.com>
parents: 493
diff changeset
111 {% set relname = item_names[i] %}
d20568493a93 unified global_index and item index, thus we are now left with only 1 type of index
Akash Sinha <akash2607@gmail.com>
parents: 493
diff changeset
112 <a href="{{ url_for('frontend.index', item_name=fullname) }}" title="{{ relname }}">{{ relname }}</a>
d20568493a93 unified global_index and item index, thus we are now left with only 1 type of index
Akash Sinha <akash2607@gmail.com>
parents: 493
diff changeset
113 <span class="moin-path-separator">{{ ("/") }}</span>
d20568493a93 unified global_index and item index, thus we are now left with only 1 type of index
Akash Sinha <akash2607@gmail.com>
parents: 493
diff changeset
114 {% endfor %}
d20568493a93 unified global_index and item index, thus we are now left with only 1 type of index
Akash Sinha <akash2607@gmail.com>
parents: 493
diff changeset
115 </div>
d20568493a93 unified global_index and item index, thus we are now left with only 1 type of index
Akash Sinha <akash2607@gmail.com>
parents: 493
diff changeset
116 {% else %}
1241
95abf895be4f Refactor title code, fixes #147
Sam Toyer <samATqxcvDOTnet>
parents: 977
diff changeset
117 <h1>{{ title }}</h1>
497
d20568493a93 unified global_index and item index, thus we are now left with only 1 type of index
Akash Sinha <akash2607@gmail.com>
parents: 493
diff changeset
118 {% endif %}
505
e65f9a5ee6df selet item feature added on index page
Akash Sinha <akash2607@gmail.com>
parents: 497
diff changeset
119 </div>
497
d20568493a93 unified global_index and item index, thus we are now left with only 1 type of index
Akash Sinha <akash2607@gmail.com>
parents: 493
diff changeset
120 <div class='moin-clr'></div>
493
17132086b9d6 File upload functionality moved from index2 to index, index2 has been removed, as well as its link from itemviews bar also.
Akash Sinha <akash2607@gmail.com>
parents: 483
diff changeset
121 <div id="moin-new-index" class="moin-item-index">
17132086b9d6 File upload functionality moved from index2 to index, index2 has been removed, as well as its link from itemviews bar also.
Akash Sinha <akash2607@gmail.com>
parents: 483
diff changeset
122 <h3 style="display: none;">{{ _("Recently uploaded items") }}</h3>
17132086b9d6 File upload functionality moved from index2 to index, index2 has been removed, as well as its link from itemviews bar also.
Akash Sinha <akash2607@gmail.com>
parents: 483
diff changeset
123 <div class="file_download_template" style="display: none;">
17132086b9d6 File upload functionality moved from index2 to index, index2 has been removed, as well as its link from itemviews bar also.
Akash Sinha <akash2607@gmail.com>
parents: 483
diff changeset
124 <a></a>
17132086b9d6 File upload functionality moved from index2 to index, index2 has been removed, as well as its link from itemviews bar also.
Akash Sinha <akash2607@gmail.com>
parents: 483
diff changeset
125 </div>
17132086b9d6 File upload functionality moved from index2 to index, index2 has been removed, as well as its link from itemviews bar also.
Akash Sinha <akash2607@gmail.com>
parents: 483
diff changeset
126 </div>
17132086b9d6 File upload functionality moved from index2 to index, index2 has been removed, as well as its link from itemviews bar also.
Akash Sinha <akash2607@gmail.com>
parents: 483
diff changeset
127 <div class="moin-index-separator"></div>
1800
54062fc0ca97 Separate "directory" and "file" items in the index view.
Cheer Xiao <xiaqqaix@gmail.com>
parents: 1766
diff changeset
128 {% if files or dirs %}
497
d20568493a93 unified global_index and item index, thus we are now left with only 1 type of index
Akash Sinha <akash2607@gmail.com>
parents: 493
diff changeset
129 <div id="moin-initials">
d20568493a93 unified global_index and item index, thus we are now left with only 1 type of index
Akash Sinha <akash2607@gmail.com>
parents: 493
diff changeset
130 {% if not startswith %}
d20568493a93 unified global_index and item index, thus we are now left with only 1 type of index
Akash Sinha <akash2607@gmail.com>
parents: 493
diff changeset
131 <a class="selected" href="{{ url_for('frontend.index', item_name=item_name) }}">{{ _("All") }}</a>
d20568493a93 unified global_index and item index, thus we are now left with only 1 type of index
Akash Sinha <akash2607@gmail.com>
parents: 493
diff changeset
132 {% else %}
d20568493a93 unified global_index and item index, thus we are now left with only 1 type of index
Akash Sinha <akash2607@gmail.com>
parents: 493
diff changeset
133 <a href="{{ url_for('frontend.index', item_name=item_name) }}">{{ _("All") }}</a>
d20568493a93 unified global_index and item index, thus we are now left with only 1 type of index
Akash Sinha <akash2607@gmail.com>
parents: 493
diff changeset
134 {% endif %}
d20568493a93 unified global_index and item index, thus we are now left with only 1 type of index
Akash Sinha <akash2607@gmail.com>
parents: 493
diff changeset
135 {% for initial in initials %}
d20568493a93 unified global_index and item index, thus we are now left with only 1 type of index
Akash Sinha <akash2607@gmail.com>
parents: 493
diff changeset
136 {% if startswith == initial %}
d20568493a93 unified global_index and item index, thus we are now left with only 1 type of index
Akash Sinha <akash2607@gmail.com>
parents: 493
diff changeset
137 <a class="selected" href="{{ url_for('frontend.index', item_name=item_name, startswith=initial) }}">{{ initial }}</a>
d20568493a93 unified global_index and item index, thus we are now left with only 1 type of index
Akash Sinha <akash2607@gmail.com>
parents: 493
diff changeset
138 {% else %}
d20568493a93 unified global_index and item index, thus we are now left with only 1 type of index
Akash Sinha <akash2607@gmail.com>
parents: 493
diff changeset
139 <a href="{{ url_for('frontend.index', item_name=item_name, startswith=initial) }}">{{ initial }}</a>
d20568493a93 unified global_index and item index, thus we are now left with only 1 type of index
Akash Sinha <akash2607@gmail.com>
parents: 493
diff changeset
140 {% endif %}
d20568493a93 unified global_index and item index, thus we are now left with only 1 type of index
Akash Sinha <akash2607@gmail.com>
parents: 493
diff changeset
141 {% endfor %}
d20568493a93 unified global_index and item index, thus we are now left with only 1 type of index
Akash Sinha <akash2607@gmail.com>
parents: 493
diff changeset
142 </div>
1800
54062fc0ca97 Separate "directory" and "file" items in the index view.
Cheer Xiao <xiaqqaix@gmail.com>
parents: 1766
diff changeset
143 {% if dirs %}
54062fc0ca97 Separate "directory" and "file" items in the index view.
Cheer Xiao <xiaqqaix@gmail.com>
parents: 1766
diff changeset
144 <div class="moin-item-index">
54062fc0ca97 Separate "directory" and "file" items in the index view.
Cheer Xiao <xiaqqaix@gmail.com>
parents: 1766
diff changeset
145 <p>{{ _("These items have subitems that match your filter:") }}</p>
54062fc0ca97 Separate "directory" and "file" items in the index view.
Cheer Xiao <xiaqqaix@gmail.com>
parents: 1766
diff changeset
146 {% for e in dirs %}
1829
6ef26d1fa2fe Use different macros for dir and file in index, make dir items link to +index view instead of +show
Cheer Xiao <xiaqqaix@gmail.com>
parents: 1800
diff changeset
147 {{ render_dir_entry(e) }}
1800
54062fc0ca97 Separate "directory" and "file" items in the index view.
Cheer Xiao <xiaqqaix@gmail.com>
parents: 1766
diff changeset
148 {% endfor %}
54062fc0ca97 Separate "directory" and "file" items in the index view.
Cheer Xiao <xiaqqaix@gmail.com>
parents: 1766
diff changeset
149 </div>
54062fc0ca97 Separate "directory" and "file" items in the index view.
Cheer Xiao <xiaqqaix@gmail.com>
parents: 1766
diff changeset
150 <div class="moin-clr"></div>
54062fc0ca97 Separate "directory" and "file" items in the index view.
Cheer Xiao <xiaqqaix@gmail.com>
parents: 1766
diff changeset
151 <hr />
54062fc0ca97 Separate "directory" and "file" items in the index view.
Cheer Xiao <xiaqqaix@gmail.com>
parents: 1766
diff changeset
152 {% endif %}
54062fc0ca97 Separate "directory" and "file" items in the index view.
Cheer Xiao <xiaqqaix@gmail.com>
parents: 1766
diff changeset
153 {% if files %}
54062fc0ca97 Separate "directory" and "file" items in the index view.
Cheer Xiao <xiaqqaix@gmail.com>
parents: 1766
diff changeset
154 <div class="moin-item-index">
54062fc0ca97 Separate "directory" and "file" items in the index view.
Cheer Xiao <xiaqqaix@gmail.com>
parents: 1766
diff changeset
155 {% for e in files %}
1829
6ef26d1fa2fe Use different macros for dir and file in index, make dir items link to +index view instead of +show
Cheer Xiao <xiaqqaix@gmail.com>
parents: 1800
diff changeset
156 {{ render_file_entry(e) }}
1800
54062fc0ca97 Separate "directory" and "file" items in the index view.
Cheer Xiao <xiaqqaix@gmail.com>
parents: 1766
diff changeset
157 {% endfor %}
54062fc0ca97 Separate "directory" and "file" items in the index view.
Cheer Xiao <xiaqqaix@gmail.com>
parents: 1766
diff changeset
158 </div>
54062fc0ca97 Separate "directory" and "file" items in the index view.
Cheer Xiao <xiaqqaix@gmail.com>
parents: 1766
diff changeset
159 <div class="moin-clr"></div>
54062fc0ca97 Separate "directory" and "file" items in the index view.
Cheer Xiao <xiaqqaix@gmail.com>
parents: 1766
diff changeset
160 {% endif %}
516
476c38f0418b popup block html moved outside of index test condition
Akash Sinha <akash2607@gmail.com>
parents: 515
diff changeset
161 {% endif %}
511
5c86980e7d06 Ajax delete feature for the items, has been added on index page.
Akash Sinha <akash2607@gmail.com>
parents: 509
diff changeset
162 <div id="popup">
513
050c5d125762 New item tab added on index page, and Upload file button also moved under that new item box (but drag-drop area kept to whole screen as it was earlier)
Akash Sinha <akash2607@gmail.com>
parents: 512
diff changeset
163 <div id="popup-for-action" class="popup-container">
515
e665d70b0278 index page view modified (elements re-arranged on the page)
Akash Sinha <akash2607@gmail.com>
parents: 513
diff changeset
164 <div class="popup-header">
1755
ef3990098268 Refactor foobar templates for better code reusing.
Cheer Xiao <xiaqqaix@gmail.com>
parents: 1742
diff changeset
165 <input type="button" class="popup-closer popup-cancel" value="{{ _("X") }}" title="{{ _("Close") }}"/>
515
e665d70b0278 index page view modified (elements re-arranged on the page)
Akash Sinha <akash2607@gmail.com>
parents: 513
diff changeset
166 <span>{{ _("Please provide comment for this action") }}</span>
e665d70b0278 index page view modified (elements re-arranged on the page)
Akash Sinha <akash2607@gmail.com>
parents: 513
diff changeset
167 </div>
513
050c5d125762 New item tab added on index page, and Upload file button also moved under that new item box (but drag-drop area kept to whole screen as it was earlier)
Akash Sinha <akash2607@gmail.com>
parents: 512
diff changeset
168 <div class="popup-body">
050c5d125762 New item tab added on index page, and Upload file button also moved under that new item box (but drag-drop area kept to whole screen as it was earlier)
Akash Sinha <akash2607@gmail.com>
parents: 512
diff changeset
169 <input type="text" class="popup-comment" placeholder="{{ _("Enter your comment") }}"/>
050c5d125762 New item tab added on index page, and Upload file button also moved under that new item box (but drag-drop area kept to whole screen as it was earlier)
Akash Sinha <akash2607@gmail.com>
parents: 512
diff changeset
170 <input type="hidden" class="popup-action" value=""/>
050c5d125762 New item tab added on index page, and Upload file button also moved under that new item box (but drag-drop area kept to whole screen as it was earlier)
Akash Sinha <akash2607@gmail.com>
parents: 512
diff changeset
171 <br/>
050c5d125762 New item tab added on index page, and Upload file button also moved under that new item box (but drag-drop area kept to whole screen as it was earlier)
Akash Sinha <akash2607@gmail.com>
parents: 512
diff changeset
172 <input type="button" class="popup-submit" value="{{ _("Submit") }}"/>
050c5d125762 New item tab added on index page, and Upload file button also moved under that new item box (but drag-drop area kept to whole screen as it was earlier)
Akash Sinha <akash2607@gmail.com>
parents: 512
diff changeset
173 <input type="button" class="popup-cancel" value="{{ _("Cancel") }}"/>
050c5d125762 New item tab added on index page, and Upload file button also moved under that new item box (but drag-drop area kept to whole screen as it was earlier)
Akash Sinha <akash2607@gmail.com>
parents: 512
diff changeset
174 </div>
050c5d125762 New item tab added on index page, and Upload file button also moved under that new item box (but drag-drop area kept to whole screen as it was earlier)
Akash Sinha <akash2607@gmail.com>
parents: 512
diff changeset
175 </div>
050c5d125762 New item tab added on index page, and Upload file button also moved under that new item box (but drag-drop area kept to whole screen as it was earlier)
Akash Sinha <akash2607@gmail.com>
parents: 512
diff changeset
176 <div id="popup-for-newitem" class="popup-container">
515
e665d70b0278 index page view modified (elements re-arranged on the page)
Akash Sinha <akash2607@gmail.com>
parents: 513
diff changeset
177 <div class="popup-header">
1755
ef3990098268 Refactor foobar templates for better code reusing.
Cheer Xiao <xiaqqaix@gmail.com>
parents: 1742
diff changeset
178 <input type="button" class="popup-closer popup-cancel" value="{{ _("X") }}" title="{{ _("Close") }}"/>
515
e665d70b0278 index page view modified (elements re-arranged on the page)
Akash Sinha <akash2607@gmail.com>
parents: 513
diff changeset
179 <span>{{ _("Create new item") }}</span>
e665d70b0278 index page view modified (elements re-arranged on the page)
Akash Sinha <akash2607@gmail.com>
parents: 513
diff changeset
180 </div>
513
050c5d125762 New item tab added on index page, and Upload file button also moved under that new item box (but drag-drop area kept to whole screen as it was earlier)
Akash Sinha <akash2607@gmail.com>
parents: 512
diff changeset
181 <div class="popup-body">
515
e665d70b0278 index page view modified (elements re-arranged on the page)
Akash Sinha <akash2607@gmail.com>
parents: 513
diff changeset
182 <form action={{ url_for('.ajaxmodify') }} method="post">
1367
5f6ee0ddb0aa fix for #191 - Global Index page has multiple HTML validation errors
Roger Haase <crosseyedpenguin@yahoo.com>
parents: 1364
diff changeset
183 <label for="moin-newitem">{{ _("Item name") }}</label>
515
e665d70b0278 index page view modified (elements re-arranged on the page)
Akash Sinha <akash2607@gmail.com>
parents: 513
diff changeset
184 {% if item_name %}
1386
ab98b4172d5a fix for #191 part 2 - fix bugs created by eliminating html validation errors on Global Index page
Roger Haase <crosseyedpenguin@yahoo.com>
parents: 1367
diff changeset
185 <input type="text" id="moin-newitem" name="newitem" placeholder="{{ _("Enter item name here") }}" value="{{ item_name }}/" required="required"/>
515
e665d70b0278 index page view modified (elements re-arranged on the page)
Akash Sinha <akash2607@gmail.com>
parents: 513
diff changeset
186 {% else %}
1386
ab98b4172d5a fix for #191 part 2 - fix bugs created by eliminating html validation errors on Global Index page
Roger Haase <crosseyedpenguin@yahoo.com>
parents: 1367
diff changeset
187 <input type="text" id="moin-newitem" name="newitem" placeholder="{{ _("Enter item name here") }}" required="required"/>
515
e665d70b0278 index page view modified (elements re-arranged on the page)
Akash Sinha <akash2607@gmail.com>
parents: 513
diff changeset
188 {% endif %}
513
050c5d125762 New item tab added on index page, and Upload file button also moved under that new item box (but drag-drop area kept to whole screen as it was earlier)
Akash Sinha <akash2607@gmail.com>
parents: 512
diff changeset
189 <br/>
050c5d125762 New item tab added on index page, and Upload file button also moved under that new item box (but drag-drop area kept to whole screen as it was earlier)
Akash Sinha <akash2607@gmail.com>
parents: 512
diff changeset
190 <input type="submit" value="{{ _("Create") }}"/>
515
e665d70b0278 index page view modified (elements re-arranged on the page)
Akash Sinha <akash2607@gmail.com>
parents: 513
diff changeset
191 <input type="button" class="popup-cancel" value="{{ _("Cancel") }}"/>
513
050c5d125762 New item tab added on index page, and Upload file button also moved under that new item box (but drag-drop area kept to whole screen as it was earlier)
Akash Sinha <akash2607@gmail.com>
parents: 512
diff changeset
192 </form>
050c5d125762 New item tab added on index page, and Upload file button also moved under that new item box (but drag-drop area kept to whole screen as it was earlier)
Akash Sinha <akash2607@gmail.com>
parents: 512
diff changeset
193 </div>
511
5c86980e7d06 Ajax delete feature for the items, has been added on index page.
Akash Sinha <akash2607@gmail.com>
parents: 509
diff changeset
194 </div>
5c86980e7d06 Ajax delete feature for the items, has been added on index page.
Akash Sinha <akash2607@gmail.com>
parents: 509
diff changeset
195 </div>
5c86980e7d06 Ajax delete feature for the items, has been added on index page.
Akash Sinha <akash2607@gmail.com>
parents: 509
diff changeset
196
513
050c5d125762 New item tab added on index page, and Upload file button also moved under that new item box (but drag-drop area kept to whole screen as it was earlier)
Akash Sinha <akash2607@gmail.com>
parents: 512
diff changeset
197 <div id="moin-upload-cont">
493
17132086b9d6 File upload functionality moved from index2 to index, index2 has been removed, as well as its link from itemviews bar also.
Akash Sinha <akash2607@gmail.com>
parents: 483
diff changeset
198 {% set submit_url = url_for('.jfu_server', item_name=item_name) %}
17132086b9d6 File upload functionality moved from index2 to index, index2 has been removed, as well as its link from itemviews bar also.
Akash Sinha <akash2607@gmail.com>
parents: 483
diff changeset
199 {{ forms.render_file_uploader(submit_url) }}
513
050c5d125762 New item tab added on index page, and Upload file button also moved under that new item box (but drag-drop area kept to whole screen as it was earlier)
Akash Sinha <akash2607@gmail.com>
parents: 512
diff changeset
200 </div>
050c5d125762 New item tab added on index page, and Upload file button also moved under that new item box (but drag-drop area kept to whole screen as it was earlier)
Akash Sinha <akash2607@gmail.com>
parents: 512
diff changeset
201 <span class="moin-drag">{{ _("(Drag and drop multiple files to this white area to upload them.)") }}</span>
493
17132086b9d6 File upload functionality moved from index2 to index, index2 has been removed, as well as its link from itemviews bar also.
Akash Sinha <akash2607@gmail.com>
parents: 483
diff changeset
202 <script src="{{ url_for('static', filename='js/jfu.js') }}"></script>
515
e665d70b0278 index page view modified (elements re-arranged on the page)
Akash Sinha <akash2607@gmail.com>
parents: 513
diff changeset
203 <div id="lightbox">&nbsp;</div>
0
5568cf133caf create moin/2.0 repo, drop all history (see notes below)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents:
diff changeset
204 {% endblock %}