wiki-archive/twiki/templates/attachtables.pattern.tmpl

71 lines
3.8 KiB
Cheetah
Raw Normal View History

%{ These templates define the tables used to display attachments. }%
%TMPL:DEF{"commonattachtableattributes"}%tablerules="rows" valign="middle" dataalign="center,left,left,right,left,left, left,center" datavalign="top" headercolor="#0066cc" databg="#ffffff" headerbg="#ffffff" headerbgsorted="#eeeeee" databgsorted="#f5f5f5" %TMPL:END%
%TMPL:DEF{"topicattachmentwisty"}%%TWISTYSHOW{id="attachmentslist" firststart="show" link="%MAKETEXT{"Show attachments"}%" imgleft="%ICONURLPATH{toggleopen}%"}%%TWISTYHIDE{id="attachmentslist" link="%MAKETEXT{"Hide attachments"}%" imgleft="%ICONURLPATH{toggleclose}%"}%<span class="twikiGrayText" id="attachTableAttachmentCount"></span>
%TWISTYTOGGLE{id="attachmentslist" mode="div" remember="on"}%%TMPL:END%
%{ Top table row definition for topic attachments and top table in attach screen }%
%TMPL:DEF{ATTACH:files:header(toprow)}%| *I* | *%MAKETEXT{"Attachment"}%* | *%MAKETEXT{"Action"}%* | *%MAKETEXT{"Size"}%* | *%MAKETEXT{"Date"}%* | *%MAKETEXT{"Who"}%* | *%MAKETEXT{"Comment"}%* |%TMPL:END%
%{ Header definition for topic attachments and top table in attach screen }%
%TMPL:DEF{ATTACH:files:header(basic)}%<div class="twikiAttachments">
%TMPL:P{context="TablePluginEnabled" then="ATTACH:files:tableformat"}%
%TMPL:P{ATTACH:files:header(toprow)}%%TMPL:END%
%{ A basic row definition, for attachment table and attach screen }%
%TMPL:DEF{ATTACH:files:row(basic)}%| %A_ICON%<span class="twikiHidden">%A_EXT%</span> | <a href="%A_URL%">%A_FILE%</a> | <a href="%SCRIPTURLPATH{"attach"}%/%WEB%/%TOPIC%?filename=%A_FILE%&revInfo=1" title='%MAKETEXT{"change, update, previous revisions, move, delete..."}%'rel='nofollow'>%MAKETEXT{"manage"}%</a> | %A_SIZE% | %A_DATE% | %A_USER% | %A_COMMENT% |%TMPL:END%
%{ Format definition for topic attachment table }%
%TMPL:DEF{ATTACH:files:tableformat}%%TABLE{%TMPL:P{"commonattachtableattributes"}%id="twikiAttachmentsTable" summary="%MAKETEXT{"Topic attachments"}%" caption="%MAKETEXT{"Topic attachments"}%"}%%TMPL:END%
%{ Header for topic attachment table }%
%TMPL:DEF{ATTACH:files:header}%<div class="twikiAttachments">
%TMPL:P{context="TablePluginEnabled" then="ATTACH:files:tableformat"}%
%TMPL:P{"topicattachmentwisty"}%
%TMPL:P{ATTACH:files:header(toprow)}%
%TMPL:END%
%{ Row for topic attachment table }%
%TMPL:DEF{ATTACH:files:row}%%TMPL:P{ATTACH:files:row(basic)}%
%TMPL:END%
%{ Footer for topic attachment table }%
%TMPL:DEF{ATTACH:files:footer}%%ENDTWISTYTOGGLE%</div><!--//twikiAttachments-->
<script type="text/javascript">
//<![CDATA[
var table = document.getElementById("twikiAttachmentsTable");
if (table) {
var count = table.getElementsByTagName("tr").length - 1;
var countStr = "(" + count + ")";
var showlink = document.getElementById('attachmentslistshow');
if (showlink != undefined) showlink.firstChild.innerHTML += " " + countStr;
var hidelink = document.getElementById('attachmentslisthide');
if (hidelink != undefined) hidelink.firstChild.innerHTML += " " + countStr;
}
//]]>
</script>
%TMPL:END%
%{ Header for table at top of attach screen }%
%TMPL:DEF{ATTACH:files:header:A}%%TMPL:P{ATTACH:files:header(basic)}% *%MAKETEXT{"Attribute"}%* |
%TMPL:END%
%{ Row for table at top of attach screen }%
%TMPL:DEF{ATTACH:files:row:A}%%TMPL:P{ATTACH:files:row(basic)}% %A_ATTRS% |
%TMPL:END%
%{ Footer for table at top of attach screen }%
%TMPL:DEF{ATTACH:files:footer:A}%</div>%TMPL:END%
%{ Header for versions table in attach screen }%
%TMPL:DEF{ATTACH:versions:header}%| *%MAKETEXT{"Version"}%* | *%MAKETEXT{"Action"}%* | *%MAKETEXT{"Date"}%* | *%MAKETEXT{"Who"}%* | *%MAKETEXT{"Comment"}%* |
%TMPL:END%
%{ Row for versions table in attach screen }%
%TMPL:DEF{ATTACH:versions:row}%| %A_REV% | <a href="%A_URL%">%MAKETEXT{"view"}%</a> | %A_DATE% | %A_USER% | %A_COMMENT% |
%TMPL:END%
%{ Footer for versions table in attach screen }%
%TMPL:DEF{ATTACH:versions:footer}%%TMPL:END%