ENHANCEMENT 'Select all' and 'Select none' checkboxes for CommentTableField for easier batch handling of comments, improved its styling in CommentAdmin (from r105271)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@112466 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Ingo Schommer 2010-10-15 01:49:20 +00:00
parent f305b7be61
commit 8b39c98248
3 changed files with 43 additions and 4 deletions

View File

@ -17,6 +17,12 @@ class CommentTableField extends ComplexTableField {
$this->Markable = true;
// Note: These keys have special behaviour associated through TableListField.js
$this->selectOptions = array(
'all' => _t('TableListField.ALL', 'All'),
'none' => _t('TableListField.NONE', 'None')
);
// search
$search = isset($_REQUEST['CommentSearch']) ? Convert::raw2sql($_REQUEST['CommentSearch']) : null;
if(!empty($_REQUEST['CommentSearch'])) {

View File

@ -1,3 +1,30 @@
#Form_EditForm{
overflow: scroll;
}
#Form_EditForm table{
width: 100%;
}
#Form_EditForm table td{
word-wrap:break-word !important;
}
#Form_EditForm table td.Comment{
width: 32%;
}
#Form_EditForm table td.URL{
width: 18%;
}
#Form_EditForm table td.Page{
width: 20%;
}
/* The following is not used anywhere, we should delete it. Because this file has not been
included in the template due to a bug since 29/09/08 (r63175), and we can't find a HTML element with the id 'CommentList'
#CommentList {
padding: 0;
margin: 0;
@ -13,4 +40,5 @@
margin-top: 3px;
font-size: 80%;
font-style: italic;
}
}
*/

View File

@ -2,7 +2,12 @@
<div class="CommentFilter filterBox">
$SearchForm
</div>
<% include TableListField_PageControls %>
<% if Print %><% else %>
<% if Markable %>
<% include TableListField_SelectControls %>
<% end_if %>
<% include TableListField_PageControls %>
<% end_if %>
<table class="data">
<thead>
<tr>
@ -39,9 +44,9 @@
<% if Items %>
<% control Items %>
<tr id="record-$Parent.id-$ID"<% if HighlightClasses %> class="$HighlightClasses"<% end_if %>>
<% if Markable %><td width="18" class="markingcheckbox">$MarkingCheckbox</td><% end_if %>
<% if Markable %><td width="18" class="$SelectionTags">$MarkingCheckbox</td><% end_if %>
<% control Fields %>
<td>$Value</td>
<td class="$Title">$Value</td>
<% end_control %>
<% if Can(edit) %>
<td width="18"><a class="popuplink editlink" href="$EditLink" target="_blank"><img src="cms/images/edit.gif" alt="<% _t('EDIT', 'edit') %>" /></a></td>