root/branches/release-33/tmpl/cms/include/template_table.tmpl @ 1786

Revision 1786, 7.8 kB (checked in by auno, 20 months ago)

Added publish button and pulldown option on template listing. BugzID:75100

  • Property svn:keywords set to Id Revision
Line 
1<mt:setvarblock name="listing_header">
2    <h3><mt:var name="template_type_label"></h3>
3
4    <mt:unless name="template_type" like="/system|email|backup/">
5        <mt:if name="template_type" eq="archive">
6    <p><__trans phrase="Create Archive Template:">
7        &nbsp;
8        <a href="<mt:var name="script_url">?__mode=view&amp;_type=template&amp;type=individual&amp;blog_id=<mt:var name="blog_id">" class="icon-left icon-create"><__trans phrase="Entry"></a>
9        &nbsp;
10        <a href="<mt:var name="script_url">?__mode=view&amp;_type=template&amp;type=archive&amp;blog_id=<mt:var name="blog_id">" class="icon-left icon-create"><__trans phrase="Entry Listing"></a>
11        &nbsp;
12        <a href="<mt:var name="script_url">?__mode=view&amp;_type=template&amp;type=page&amp;blog_id=<mt:var name="blog_id">" class="icon-left icon-create"><__trans phrase="Page"></a>
13    </p>
14        <mt:elseif name="template_type" eq="module">
15    <p><a href="<mt:var name="script_url">?__mode=view&amp;_type=template&amp;type=module&amp;blog_id=<mt:var name="blog_id">" class="icon-left icon-create"><__trans phrase="Create template module"></a></p>
16        <mt:elseif name="template_type" eq="index">
17    <p><a href="<mt:var name="script_url">?__mode=view&amp;_type=template&amp;type=index&amp;blog_id=<mt:var name="blog_id">" class="icon-left icon-create"><__trans phrase="Create index template"></a></p>
18        <mt:elseif name="create_link">
19        <mt:var name="create_link">
20        </mt:if>
21    </mt:unless>
22</mt:setvarblock>
23<mt:setvarblock name="action_buttons">
24    <mt:unless name="template_type" eq="system"><mt:unless name="template_type" eq="email">
25    <mt:if name="template_type" eq="index">
26        <a href="javascript:void(0)"
27            onclick="doForMarkedInThisWindow(getByID('<$mt:var name="template_type"$>-listing-form'), '<__trans phrase="template" escape="js">', '<__trans phrase="templates" escape="js">', 'id', 'publish_index_templates', {}, '<__trans phrase="to publish" escape="js">'); return false;"
28            accesskey="a"
29            title="<__trans phrase="Publish selected templates (a)">"
30            ><__trans phrase="Publish"></a>
31    <mt:else if name="template_type" eq="archive">
32        <a href="javascript:void(0)"
33            onclick="doForMarkedInThisWindow(getByID('<$mt:var name="template_type"$>-listing-form'), '<__trans phrase="template" escape="js">', '<__trans phrase="templates" escape="js">', 'id', 'publish_archive_templates', {}, '<__trans phrase="to publish" escape="js">'); return false;"
34            accesskey="a"
35            title="<__trans phrase="Publish selected templates (a)">"
36            ><__trans phrase="Publish"></a>
37    </mt:if>
38    <a href="javascript:void(0)"
39        onclick="doRemoveItems(getByID('<$mt:var name="template_type"$>-listing-form'), '<__trans phrase="template" escape="js">', '<__trans phrase="templates" escape="js">'); return false;"
40        accesskey="x"
41        title="<__trans phrase="Delete selected [_1] (x)" params="<$mt:var name="object_label_plural"$>">"
42        ><__trans phrase="Delete"></a>
43    </mt:unless></mt:unless>
44</mt:setvarblock>
45<mt:setvarblock name="table_id"><mt:var name="template_type">-listing</mt:setvarblock>
46<mtapp:listing id="$table_id" hide_pager="1" class="show-all" listing_class="show-actions-bar-top">
47    <mt:if __first__>
48        <thead>
49            <tr>
50                <th class="cb"><input type="checkbox" name="id-head" value="all" class="select" /></th>
51                <th class="template-name"><__trans phrase="Template Name"></th>
52        <mt:if name="template_type" eq="index">
53                <th class="output-file"><__trans phrase="Output File"></th>
54        </mt:if>
55        <mt:if name="template_type" eq="archive">
56                <th class="output-file"><__trans phrase="Archive Path"></th>
57        </mt:if>
58        <mt:unless name="blog_view">
59                <th class="blog"><__trans phrase="Blog"></th>
60        </mt:unless>
61        <mt:if name="template_type" like="/(index|archive)/">
62                <th class="publishing-method"><!-- <img src="<mt:var name="static_uri">images/status_icons/dynamic.gif" alt="<__trans phrase="Dynamic Template">" title="<__trans phrase="Publishing Method">" width="11" height="9" /> --><__trans phrase="Publishing"></th>
63        </mt:if>
64        <mt:unless name="screen_id" eq="search-replace">
65                <th class="linked-template si"><img src="<mt:var name="static_uri">images/status_icons/linked.gif" alt="<__trans phrase="Linked Template">" title="<__trans phrase="Linked Template">" width="17" height="9" /></th>
66        </mt:unless>
67            </tr>
68        </thead>
69        <tbody>
70    </mt:if>
71            <tr class="<mt:if name="__odd__">odd<mt:else>even</mt:if> template-<$mt:var name="template_type"$>">
72                <td class="cb"><input type="checkbox" name="id" class="select" value="<mt:var name="id">" /></td>
73                <td class="template-name"><a href="<mt:var name="script_url">?__mode=view&amp;_type=template&amp;id=<mt:var name="id">&amp;blog_id=<mt:var name="blog_id">"><mt:var name="name" escape="html"></a></td>
74    <mt:if name="template_type" like="/(index|archive)/">
75                <td class="output-file">
76        <mt:if name="outfile">
77            <mt:var name="outfile" escape="html"> <mt:if name="published_url"><a href="<mt:var name="published_url">" target="<__trans phrase="_external_link_target">" title="<__trans phrase="View Published Template">"><img src="<mt:var name="static_uri">images/status_icons/view.gif" alt="<__trans phrase="View Published Template">" width="13" height="9" /></a></mt:if>
78        <mt:else name="template_type" eq="archive">
79                    <ul>
80            <mt:loop name="archive_types">
81                <mt:loop name="archive_tmpl_loop">
82                        <li><mt:if name="selected"><mt:var name="name" escape="html"></mt:if></li>
83                </mt:loop>
84            </mt:loop>
85                    </ul>
86        <mt:else>
87                    <span><__trans phrase="-"></span>
88        </mt:if>
89                </td>
90    </mt:if>
91    <mt:unless name="blog_view">
92                <td class="blog"><a href="<$mt:var name="script_url"$>?__mode=list&amp;_type=template&amp;blog_id=<$mt:var name="blog_id"$>"><$mt:var name="weblog_name" escape="html"$></a></td>
93    </mt:unless>
94    <mt:if name="template_type" like="/(index|archive)/">
95                <td class="publishing-method">
96                    <mt:if name="build_type" eq="0"><__trans phrase="Disabled">
97                    <mt:else name="build_type" eq="2"><__trans phrase="Manual">
98                    <mt:else name="build_type" eq="3"><__trans phrase="Dynamic">
99                    <mt:else name="build_type" eq="4"><__trans phrase="Asynchronous">
100                    <mt:else name="build_type" eq="5"><__trans phrase="Scheduled">
101                    <mt:else><__trans phrase="Static">
102                    </mt:if>
103                </td>
104    </mt:if>
105    <mt:unless name="screen_id" eq="search-replace">
106                <td class="linked-template si status-<mt:if name="linked_file">linked<mt:else>unlinked</mt:if>"><img src="<mt:var name="static_uri">images/spacer.gif" alt="<mt:if name="linked_file"><__trans phrase="Yes"><mt:else><__trans phrase="No"></mt:if>" width="9" height="9" <mt:if name="linked_file">title="<mt:var name="linked_file" escape="html">"</mt:if> /></td>
107    </mt:unless>
108            </tr>
109    <mt:if __last__>
110        </tbody>
111    </mt:if>
112<mt:else>
113    <div id="<$mt:var name="template_type"$>-listing" class="listing zero-state-listing zero-state">
114        <div class="listing-header">
115            <$mt:var name="listing_header"$>
116        </div>
117        <mtapp:statusmsg
118            id="zero-state"
119            class="info zero-state">
120            <__trans phrase="No [_1] could be found." params="<$mt:var name="template_type_label"$>">
121        </mtapp:statusmsg>
122    </div>
123</mtapp:listing>
Note: See TracBrowser for help on using the browser.