silverstripe-framework/templates/TableField.ss
Ingo Schommer ebf0255189 Merged revisions 46229 via svnmerge from
svn://svn.silverstripe.com/silverstripe/modules/sapphire/branches/2.2.1-nzct

................
  r46229 | ischommer | 2007-12-03 21:33:00 +1300 (Mon, 03 Dec 2007) | 9 lines
  
  Merged revisions 33209 via svnmerge from 
  svn://svn.silverstripe.com/silverstripe/modules/sapphire/branches/2.0-nzct-postaudit
  
  ........
    r33209 | hsmith | 2007-04-03 17:01:42 +1200 (Tue, 03 Apr 2007) | 1 line
    
    Added message element to template.
  ........
................


git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@52783 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-04-15 09:33:50 +00:00

67 lines
2.3 KiB
Scheme
Executable File

<div id="$id" class="$Classes">
<% include TableListField_PageControls %>
<% if Message %>
<p id="{$id}_error" class="message $MessageType">$Message</p>
<% else %>
<p id="{$id}_error" class="message $MessageType" style="display: none"></p>
<% end_if %>
<table class="data">
<thead>
<tr>
<% control Headings %>
<th class="$Name $Class" scope="col">$Title</th>
<% end_control %>
<th style="display: none"></th>
<% if Can(delete) %><th width="18">&nbsp;</th><% end_if %>
</tr>
</thead>
<tfoot>
<% if HasSummary %>
<tr class="summary">
<td><i>$SummaryTitle</i></td>
<% control SummaryFields %>
<td<% if Function %> class="$Function"<% end_if %>>$SummaryValue</td>
<% end_control %>
<th style="display: none"></th>
<% if Can(delete) %><td width="18">&nbsp;</td><% end_if %>
</tr>
<% end_if %>
<% if Can(add) %>
<tr>
<td colspan="$ItemCount">
<a href="#" class="addrow" title="<% _t('ADD', 'Add a new row') %>"><img src="cms/images/add.gif" alt="<% _t('ADD') %>" /> <% _t('ADDITEM') %> $Title</a>
</td>
<td style="display: none"></td>
<% if Can(delete) %><td width="18">&nbsp;</td><% end_if %>
</tr>
<% end_if %>
</tfoot>
<tbody>
<% if Items %>
<% control Items %>
<tr id="record-$Parent.id-$ID" class="row<% if HighlightClasses %> $HighlightClasses<% end_if %>">
<% control Fields %>
<td class="$FieldClass $extraClass $ClassName $Title tablecolumn">$Field</td>
<% end_control %>
<td style="display: none">$ExtraData</td>
<% if Can(delete) %><td width="18"><a class="deletelink" href="$DeleteLink" title="<% _t('DELETEROW') %>"><img src="cms/images/delete.gif" alt="<% _t('DELETE') %>" /></a></td><% end_if %>
</tr>
<% end_control %>
<% else %>
<tr class="notfound">
<% if Markable %><th width="18">&nbsp;</th><% end_if %>
<td colspan="$Headings.Count"><i><% _t('NOITEMSFOUND') %></i></td>
<% if Can(delete) %><td width="18">&nbsp;</td><% end_if %>
</tr>
<% end_if %>
</tbody>
</table>
<div class="utility">
<% if Can(export) %>
<a href="$ExportLink" target="_blank"><% _t('CSVEXPORT', 'Export to CSV' ) %></a>
<% end_if %>
</div>
<% if Message %>
<span class="message $MessageType">$Message</span>
<% end_if %>
</div>