source: WAeUP_SRP/branches/uli/skins/waeup_academics/academics_content_lib_info_detail_tab.pt

Last change on this file was 903, checked in by Henrik Bettermann, 19 years ago

isManager renamed to isSectionManager

  • Property svn:keywords set to Id
File size: 9.4 KB
Line 
1<!-- a content_lib macro -->
2<!-- $Id: academics_content_lib_info_detail_tab.pt 903 2006-11-20 08:08:10Z henrik $ -->
3<!-- All doc information -->
4
5<metal:block define-macro="info_detail_tab"
6             tal:define="title_in_tabs python: 'title' in detail_tab_columns;
7                         long_title_in_tabs python:'long_title' in detail_tab_columns;
8                         id_in_tabs python:'id' in detail_tab_columns;
9                         typetext_in_tabs python:'typetext' in detail_tab_columns;
10                         type_in_tabs python:'type' in detail_tab_columns;
11                         size_in_tabs python:'size' in detail_tab_columns;
12                         date_in_tabs python:'date' in detail_tab_columns;
13                         author_in_tabs python:'author' in detail_tab_columns;
14                         status_in_tabs python:'status' in detail_tab_columns;
15                         version_in_tabs python:'version' in detail_tab_columns;
16                         context_url context_url|here/getContextUrl;
17                         display_buttons context/academics_contents_display_buttons;
18                        ">
19<tal:block condition="start">
20  <tal:block replace='structure string:&lt;table class="contentListing" width="100%" summary="content layout" id="folder_content">' />
21
22
23  <thead tal:condition="nothing">
24    <tr>
25      <td tal:condition="display_buttons"> </td>
26      <th tal:condition="type_in_tabs" align="center">
27        <strong tal:define="sort_type python:sort_by=='type'"
28           tal:omit-tag="not:sort_type"><a href=""
29           tal:attributes="href python:'%s/changeDisplayParams?display_order=%s' % (context_url, test(sort_type and direction=='asc','type_desc','type_asc'))"
30           i18n:translate="label_info_tab_type"></a></strong></th>
31      <th tal:condition="title_in_tabs" align="left">
32        <strong tal:define="sort_title python:sort_by=='title'"
33           tal:omit-tag="not:sort_title"><a href=""
34           tal:attributes="href python:'%s/changeDisplayParams?display_order=%s' % (context_url, test(sort_title and direction=='asc','title_desc','title_asc'))"
35           i18n:translate="label_info_tab_title"></a></strong></th>
36      <th tal:condition="long_title_in_tabs" align="left">
37        <strong tal:define="sort_title python:sort_by=='title'"
38           tal:omit-tag="not:sort_title"><a href=""
39           tal:attributes="href python:'%s/changeDisplayParams?display_order=%s' % (context_url, test(sort_title and direction=='asc','title_desc','title_asc'))"
40           i18n:translate="label_info_tab_title"></a></strong></th>
41
42      <th tal:condition="python:id_in_tabs and display_buttons" align="center">
43        <strong tal:define="sort_id python:sort_by=='id'"
44           tal:omit-tag="not:sort_id"><a href=""
45           tal:attributes="href python:'%s/changeDisplayParams?display_order=%s' % (context_url, test(sort_id and direction=='asc','id_desc','id_asc'))"
46           i18n:translate="label_info_tab_id"></a>ID</strong></th>
47
48      <th tal:condition="typetext_in_tabs" align="center">
49        <strong tal:define="sort_typetext python:sort_by=='typetext'"
50           tal:omit-tag="not:sort_typetext"><a href=""
51           tal:attributes="href python:'%s/changeDisplayParams?display_order=%s' % (context_url, test(sort_typetext and direction=='asc','typetext_desc','typetext_asc'))"
52           i18n:translate="label_info_tab_typetext"></a></strong></th>
53
54
55      <th tal:condition="size_in_tabs" align="center">
56        <strong tal:define="sort_size python:sort_by=='size'"
57           tal:omit-tag="not:sort_size"><a href=""
58           tal:attributes="href python:'%s/changeDisplayParams?display_order=%s' % (context_url, test(sort_size and direction=='asc','size_desc','size_asc'))"
59           i18n:translate="label_info_tab_size"></a></strong></th>
60      <th tal:condition="date_in_tabs" align="center">
61        <strong tal:define="sort_date python:sort_by=='date'"
62           tal:omit-tag="not:sort_date"><a href=""
63           tal:attributes="href python:'%s/changeDisplayParams?display_order=%s' % (context_url, test(sort_date and direction=='asc','date_desc','date_asc'))"
64           i18n:translate="label_info_tab_date"></a></strong></th>
65      <th tal:condition="author_in_tabs" align="center">
66        <strong tal:define="sort_author python:sort_by=='author'"
67           tal:omit-tag="not:sort_author"><a href=""
68           tal:attributes="href python:'%s/changeDisplayParams?display_order=%s' % (context_url, test(sort_author and direction=='asc','author_desc','author_asc'))"
69           i18n:translate="label_info_tab_author"></a></strong></th>
70        <th tal:condition="display_buttons"></th>
71        <th tal:condition="python: display_buttons and status_in_tabs" align="center">
72        <strong tal:define="sort_status python:sort_by=='status'"
73           tal:omit-tag="not:sort_status"><a href=""
74           tal:attributes="href python:'%s/changeDisplayParams?display_order=%s' % (context_url, test(sort_status and direction=='asc','status_desc','status_asc'))"
75           i18n:translate="label_info_tab_status"></a></strong></th>
76      <th tal:condition="version_in_tabs" align="center">
77        <strong tal:define="sort_version python:sort_by=='version'"
78           tal:omit-tag="not:sort_version"><a href=""
79           tal:attributes="href python:'%s/changeDisplayParams?display_order=%s' % (context_url, test(sort_version and direction=='asc','version_desc','version_asc'))"
80           i18n:translate="label_info_tab_version"></a></strong></th>
81    </tr>
82  </thead>
83  <tal:block replace='structure string:&lt;tbody id="folder_content_tbody">' />
84</tal:block>
85
86<tr tal:define="action python:test(info['type'] in ('Section', 'Workspace'),
87                '/folder_contents', '')"
88    tal:attributes="class python:test(repeat['item'].even(), 'even ajaxtd', 'odd ajaxtd')">
89      <span tal:condition="display_buttons" tal:omit-tag="">
90        <td align="left" valign="middle" style="width: 5px;" tal:condition="display_buttons">
91          <input type="checkbox" name="ids:list" value="" id="" class="noborder"
92                 tal:condition="not:no_form"
93                 tal:define="id item/getId"
94                 tal:attributes="value python:site_wide and item.getContextUrl(utool=utool) or id;
95                 id python:'cb_' + id;
96                 checked python:id in choosen_ids;"
97                 />
98        </td>
99      </span>
100      <td align="center" tal:condition="type_in_tabs">
101      <img tal:replace="structure python:here.getImgTag(info['icon'],
102                        base_url=base_url, title=info['type'])" />
103  </td>
104  <td tal:condition="title_in_tabs">
105    <a href="" tal:attributes="href string:${info/url}${action};
106                               title info/description;">
107    <strong tal:content="info/title_or_id">ID</strong></a></td>
108
109  <td tal:condition="long_title_in_tabs">
110    <a href="" tal:attributes="href string:${info/url}${action};
111                               title info/description;">
112    <strong tal:content="info/long_title|info/title">ID</strong></a></td>
113
114
115  <td tal:condition="python:id_in_tabs and display_buttons and context.portal_type not in ('Certificate',)">
116    <span tal:content="info/id">ID</span>
117  </td>
118  <td tal:condition="typetext_in_tabs">
119    <span tal:content="info/type">ID</span>
120  </td>
121    <span tal:condition="python: info['doc'].portal_type == 'Course'">
122      <td>
123        <span tal:content="info/semester">ID</span>
124      </td>
125      <td>
126        <span tal:content="info/credits">ID</span>
127      </td>
128      <td>
129        <span tal:content="info/passmark">ID</span>
130      </td>
131    </span>
132    <span tal:define="docu python: info['doc']"
133          tal:condition="python: docu.portal_type == 'StudentCourseResult'">
134      <td>
135        <span tal:content="docu/grade">ID</span>
136      </td>
137      <td>
138        <span tal:content="docu/score">ID</span>
139      </td>
140    </span>
141    <span tal:define="docu python: info['doc']"
142          tal:condition="python: False and docu.portal_type == 'Student'">
143      <td>
144        <span tal:content="info/clearance/matric_no">ID</span>
145      </td>
146    </span>
147    <span tal:condition="python: info['doc'].portal_type == 'CertificateCourse'">
148      <td>
149        <span tal:content="info/core_or_elective">ID</span>
150      </td>
151    </span>
152  <td align="left"   tal:define="isSectionManager python:checkPerm('Modify portal content', item)">
153    <a tal:condition="python: display_buttons and isSectionManager and context.portal_type not in ('Certificate',)"
154       href="dummy"  tal:attributes="href string:${item/absolute_url}/cpsdocument_edit_form">[edit]</a></td>
155  <td align="center" tal:condition="size_in_tabs">
156    <span tal:condition="info/size|nothing" tal:content="info/size"> </span></td>
157  <td align="center" tal:condition="date_in_tabs">
158    <span tal:content="info/time_str">May 6,...</span></td>
159  <td align="center" tal:condition="author_in_tabs">
160    <span tal:content="info/creator"> </span></td>
161  <td align="center" tal:condition="python:status_in_tabs and display_buttons and info['review_state'] in ('unchecked','checked',)"
162      tal:content="info/review_state" tal:attributes="class info/review_state"
163      i18n:translate="">published</td>
164  <td align="center" tal:condition="version_in_tabs">
165    v-<tal:block replace="info/rev" />
166    <tal:block i18n:translate=""
167      content="string:label_language_${info/lang}">en</tal:block>
168  </td>
169</tr>
170<tal:block condition="end" tal:replace="structure string:&lt;/tbody>">
171</tal:block>
172<tal:block condition="end" tal:replace="structure string:&lt;/table>">
173</tal:block>
174</metal:block>
Note: See TracBrowser for help on using the repository browser.