root/trunk/tmpl/cms/list_template.tmpl @ 3082

Revision 3082, 5.9 kB (checked in by bchoate, 14 months ago)

Merging fireball branch changes to-date to trunk: svn merge -r2974:3081 http://code.sixapart.com/svn/movabletype/branches/fireball .

  • Property svn:keywords set to Author Date Id Revision
Line 
1<mt:if name="blog_id"><mt:setvarblock name="page_title"><__trans phrase="Blog Templates"></mt:setvarblock><mt:else><mt:setvarblock name="page_title"><__trans phrase="Global Templates"></mt:setvarblock></mt:if>
2<mt:setvarblock name="related_content">
3    <mtapp:widget
4        id="quickfilters"
5        label="<__trans phrase="Quickfilters">">
6        <mt:if name="filter_key" eq="backup_templates">
7            <mt:setvarblock name="script_url_plus"><mt:var name="script_url">?__mode=list&amp;_type=template&amp;blog_id=<mt:var name="blog_id"></mt:setvarblock>
8        </mt:if>
9        <ul>
10        <mt:if name="blog_id">
11            <li id="all-tab"><a href="<$mt:var name="script_url_plus"$>#all" onclick="showTable('all-listing');"><__trans phrase="Show All"></a></li>
12            <li id="index-tab"><a href="<$mt:var name="script_url_plus"$>#index" onclick="showTable('index-listing');"><__trans phrase="Index Templates"></a></li>
13            <li id="system-tab"><a href="<$mt:var name="script_url_plus"$>#system" onclick="showTable('system-listing');"><__trans phrase="System Templates"></a></li>
14            <li id="archive-tab"><a href="<$mt:var name="script_url_plus"$>#archive" onclick="showTable('archive-listing');"><__trans phrase="Archive Templates"></a></li>
15            <li id="module-tab"><a href="<$mt:var name="script_url_plus"$>#module" onclick="showTable('module-listing');"><__trans phrase="Template Modules"></a></li>
16        <mt:else>
17            <li id="all-tab"><a href="<mt:var name="script_url">?__mode=list&amp;_type=template#all" onclick="showTable('all-listing');"><__trans phrase="Show All"></a></li>
18            <li id="module-tab"><a href="<mt:var name="script_url">?__mode=list&amp;_type=template#module" onclick="showTable('module-listing');"><__trans phrase="Template Modules"></a></li>
19            <li id="email-tab"><a href="<mt:var name="script_url">?__mode=list&amp;_type=template#email" onclick="showTable('email-listing');"><__trans phrase="Email Templates"></a></li>
20            <li id="system-tab"><a href="<mt:var name="script_url">?__mode=list&amp;_type=template#system" onclick="showTable('system-listing');"><__trans phrase="System Templates"></a></li>
21        </mt:if>
22        </ul>
23        <$mtapp:ListFilters$>
24    </mtapp:widget>
25    <mtapp:widget
26        id="useful-links"
27        label="<__trans phrase="Useful links">">
28        <ul>
29            <li><a href="<mt:var name="script_url">?__mode=list&amp;_type=template&amp;filter_key=backup_templates&amp;blog_id=<mt:var name="blog_id">" class="icon-left icon-related"><__trans phrase="Template Backups"></a></li>
30        <mt:if name="can_edit_config">
31            <li><a href="<mt:var name="script_url">?__mode=cfg_archives&amp;blog_id=<mt:var name="blog_id">" class="icon-left icon-related"><__trans phrase="Blog Publishing Settings"></a></li>
32        </mt:if>
33        </ul>
34    </mtapp:widget>
35    <$MTApp:PageActions from="list_template"$>
36</mt:setvarblock>
37<mt:setvarblock name="html_head" append="1">
38<script type="text/javascript">
39/* <![CDATA[ */
40    <mt:unless name="filter_key" eq="backup_templates">
41        <mt:if name="blog_id">
42var tableList = ["index", "archive", "module", "system"];
43        <mt:else>
44var tableList = ["module", "email", "system"];
45        </mt:if>
46    <mt:else>
47var tableList = ["backup"];
48    </mt:unless>
49function showTable(name) {
50    for (var i=0, len=tableList.length; i<len; i++) {
51        var el = tableList[i] + "-listing"
52        var elTab = tableList[i] + "-tab"
53        if (name == "all-listing") {
54            DOM.removeClassName ( el, "hidden");
55            DOM.removeClassName ( elTab, "current-filter");
56            DOM.addClassName( "all-tab", "current-filter" );
57        }
58        else if (name == el) {
59            DOM.removeClassName ( el, "hidden");
60            DOM.addClassName( elTab, "current-filter" );
61            DOM.removeClassName( "all-tab", "current-filter" );
62        }
63        else {
64            DOM.addClassName( el, "hidden" );
65            DOM.removeClassName( elTab, "current-filter" );
66            DOM.removeClassName( "all-tab", "current-filter" );
67        }
68    }
69}
70var tableSelect = [];
71function init() {
72<mt:loop name="template_type_loop">
73    tableSelect.push(new TC.TableSelect( '<mt:var name="template_type">-listing-table' ));
74    tableSelect[tableSelect.length-1].rowSelect = true;
75</mt:loop>
76    var name = (window.location.hash && window.location.hash.match( /^#/ ) ) ? window.location.hash.substr(1) : "all";
77    showTable(name + "-listing");
78}
79TC.attachLoadEvent(init);
80/* ]]> */
81</script>
82</mt:setvarblock>
83<mt:setvarblock name="system_msg">
84    <mt:if name="saved_deleted">
85        <mtapp:statusmsg
86            id="saved-deleted"
87            class="success">
88            <__trans phrase="You have successfully deleted the checked template(s).">
89        </mtapp:statusmsg>
90    </mt:if>
91    <mt:if name="refreshed">
92        <mtapp:statusmsg
93            id="refreshed"
94            class="success">
95            <__trans phrase="You have successfully refreshed your templates.">
96        </mtapp:statusmsg>
97    </mt:if>
98    <mt:if name="saved">
99        <mtapp:statusmsg
100            id="saved-settings"
101            class="success">
102            <__trans phrase="Your settings have been saved.">
103        </mtapp:statusmsg>
104    </mt:if>
105    <mt:if name="published">
106        <mtapp:statusmsg
107            id="published"
108            class="success">
109            <__trans phrase="Your templates have been published.">
110        </mtapp:statusmsg>
111    </mt:if>
112    <mt:if name="saved_copied">
113        <mtapp:statusmsg
114            id="saved-copied"
115            class="success">
116            <__trans phrase="Selected template(s) has been copied.">
117        </mtapp:statusmsg>
118    </mt:if>
119</mt:setvarblock>
120
121<mt:include name="include/header.tmpl">
122
123<mt:loop name="template_type_loop">
124<mt:if name="__first__">
125<$mt:var name="list_filter_form"$>
126</mt:if>
127<$mt:include name="include/template_table.tmpl"$>
128</mt:loop>
129
130<mt:include name="include/footer.tmpl">
Note: See TracBrowser for help on using the browser.