Commit ad0c715c authored by Jono Mingard's avatar Jono Mingard
Browse files

Rearranged table headers in Edit access (Bug #1262487)



Collapsed the two header rows into one, added hidden headers where
appropriate and added labels to the "Comments" checkboxes.

Change-Id: Ia34e8022beab2f056ba08a56b31d1b35134ef75c
Signed-off-by: default avatarJono Mingard <jonom@catalyst.net.nz>
parent 32edab99
......@@ -27,7 +27,6 @@ $string['userviewurltaken'] = 'This URL is already taken. Please choose an
$string['description'] = 'Page description';
$string['startdate'] = 'Access start date/time';
$string['stopdate'] = 'Access end date/time';
$string['accessdates'] = 'Access date/time';
$string['stopdatecannotbeinpast'] = 'Stop date cannot be in the past';
$string['startdatemustbebeforestopdate'] = 'Start date must be before stop date';
$string['newstopdatecannotbeinpast'] = 'The end date for \'%s\' access cannot be in the past.';
......
......@@ -2717,15 +2717,8 @@ fieldset#pagestoadd tr#addviews_submit_container td {
cursor: pointer;
}
/* added users */
.accesslist-head1 th {
.accesslist-head th {
border-bottom: none;
padding: 0 5px;
line-height: 1.25em;
}
.accesslist-head2 th {
padding-top: 0;
line-height: 1.25em;
font-size: .917em;
}
#accesslistitems td {
border-bottom: 1px dotted #D1D1D1;
......
......@@ -25,18 +25,13 @@
<table id="accesslisttable" class="fr hidden fullwidth">
<thead>
<tr class="accesslist-head1">
<th colspan="2">{{str tag=Added section=view}}</th>
<th colspan="2">{{str tag=accessdates section=view}}</th>
<th colspan="2" class="center comments{{if $allowcomments}} hidden{{/if}}">{{str tag=Comments section=artefact.comment}}</th>
<th></th>
</tr>
<tr class="accesslist-head2">
<th colspan="2"></th>
<th>{{str tag=From}}:</th>
<th>{{str tag=To}}:</th>
<th colspan="2" class="center comments{{if $allowcomments}} hidden{{/if}}">{{str tag=Allow section=artefact.comment}} {{str tag=Moderate section=artefact.comment}}</th>
<th></th>
<tr class="accesslist-head">
<th><span class="accessible-hidden">{{str tag=profileicon section=view}}</span></th>
<th>{{str tag=Added section=view}}</th>
<th>{{str tag=startdate section=view}}</th>
<th>{{str tag=stopdate section=view}}</th>
<th class="center comments{{if $allowcomments}} hidden{{/if}}">{{str tag=Comments section=artefact.comment}}</th>
<th><span class="accessible-hidden">{{str tag=edit}}</span></th>
</tr>
</thead>
<tbody id="accesslistitems">
......@@ -45,12 +40,9 @@
<table id="accesslisttabledefault" class="fr hidden fullwidth">
<thead>
<tr class="accesslist-head1">
<tr class="accesslist-head">
<th>{{str tag=Added section=view}}</th>
</tr>
<tr class="accesslist-head2">
<th>&nbsp;</th>
</tr>
</thead>
<tbody id="accesslistitems">
<tr>
......@@ -110,11 +102,13 @@ function renderAccessListItem(item) {
'name': 'accesslist[' + count + '][allowcomments]',
'id' : 'allowcomments' + count,
'value': 1});
var allowfdbklabel = LABEL({'for': 'allowcomments' + count}, get_string('Allow'));
var approvefdbk = INPUT({
'type': 'checkbox',
'name': 'accesslist[' + count + '][approvecomments]',
'id' : 'approvecomments' + count,
'value': 1});
var approvefdbklabel = LABEL({'for': 'approvecomments' + count}, get_string('Moderate'));
if (item['allowcomments']==1) {
setNodeAttribute(allowfdbk,'checked',true);
......@@ -164,8 +158,8 @@ function renderAccessListItem(item) {
TD({'class': 'accesslistname'}, name),
TD(null, makeCalendarInput(item, 'start', notpublicorallowed), makeCalendarLink(item, 'start', notpublicorallowed)),
TD(null, makeCalendarInput(item, 'stop', notpublicorallowed), makeCalendarLink(item, 'stop', notpublicorallowed)),
TD({'class': 'center comments' + (allowcomments ? ' hidden' : '')}, allowfdbk),
TD({'class': 'center comments' + (allowcomments ? ' hidden' : '')}, approvefdbk),
TD({'class': 'center comments' + (allowcomments ? ' hidden' : '')}
, allowfdbk, allowfdbklabel, ' ', approvefdbk, approvefdbklabel),
TD({'class': 'right removebutton'}, removeButton,
INPUT({
'type': 'hidden',
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment