moving add-icon(s) from header_right to header_row

This commit is contained in:
Ralf Becker 2014-03-12 10:12:29 +00:00
parent 6500d31815
commit 3c91753e80
5 changed files with 7 additions and 38 deletions

View File

@ -851,7 +851,7 @@ class infolog_ui
} }
} }
} }
$values['nm']['header_right'] = 'infolog.index.header_right'; $values['nm']['header_row'] = 'infolog.index.header_right';
if ($values['nm']['filter']=='bydate') if ($values['nm']['filter']=='bydate')
{ {
foreach (array_keys($values['nm']['col_filter']) as $colfk) foreach (array_keys($values['nm']['col_filter']) as $colfk)

View File

@ -105,8 +105,8 @@ class resources_ui
$content = array(); $content = array();
$content['msg'] = $msg ? $msg : $_GET['msg']; $content['msg'] = $msg ? $msg : $_GET['msg'];
$content['nm']['header_right'] = 'resources.show.nm_right'; $content['nm']['header_row'] = 'resources.show.nm_right';
$content['nm']['get_rows'] = 'resources.resources_bo.get_rows'; $content['nm']['get_rows'] = 'resources.resources_bo.get_rows';
$content['nm']['no_filter'] = False; $content['nm']['no_filter'] = False;
$content['nm']['filter_label'] = lang('Category'); $content['nm']['filter_label'] = lang('Category');
$content['nm']['filter2_label'] = 'Display'; $content['nm']['filter2_label'] = 'Display';
@ -535,7 +535,7 @@ class resources_ui
'long_description' => 'html' 'long_description' => 'html'
) )
); );
$sel_options['accessory_of'] = array(-1 => lang('none')) + (array)$this->bo->link_query('',$search_options); $sel_options['accessory_of'] = array(-1 => lang('none')) + (array)$this->bo->link_query('',$search_options);
if($res_id) unset($sel_options['accessory_of'][$res_id]); if($res_id) unset($sel_options['accessory_of'][$res_id]);

View File

@ -2,16 +2,7 @@
<!-- $Id$ --> <!-- $Id$ -->
<overlay> <overlay>
<template id="resources.show.nm_right" template="" lang="" group="0" version="1.9.002"> <template id="resources.show.nm_right" template="" lang="" group="0" version="1.9.002">
<grid> <buttononly label="Add" id="add" onclick="window.open(egw::link('/index.php','menuaction=resources.resources_ui.edit'),'','dependent=yes,width=800,height=600,location=no,menubar=no,toolbar=no,scrollbars=yes,status=yes'); return false; return false;"/>
<columns>
<column/>
</columns>
<rows>
<row>
<buttononly label="Add" id="add" onclick="window.open(egw::link('/index.php','menuaction=resources.resources_ui.edit'),'','dependent=yes,width=800,height=600,location=no,menubar=no,toolbar=no,scrollbars=yes,status=yes'); return false; return false;"/>
</row>
</rows>
</grid>
</template> </template>
<template id="resources.show.rows" template="" lang="" group="0" version="1.9.003"> <template id="resources.show.rows" template="" lang="" group="0" version="1.9.003">
<grid width="100%"> <grid width="100%">

View File

@ -700,17 +700,12 @@ class timesheet_ui extends timesheet_bo
$row['class'] = 'row'; $row['class'] = 'row';
if ($row['ts_id'] <= 0) // sums if ($row['ts_id'] <= 0) // sums
{ {
$readonlys["view[$row[ts_id]]"] = $readonlys["edit[$row[ts_id]]"] = $readonlys["delete[$row[ts_id]]"] = true;
$readonlys["checked[{$row[ts_id]}]"] = true;
$readonlys["document[{$row[ts_id]}]"] = true;
if ($query['sort'] == 'ASC') $row['ts_start'] -= 7200; // fix for DSL change if ($query['sort'] == 'ASC') $row['ts_start'] -= 7200; // fix for DSL change
switch($row['ts_id']) switch($row['ts_id'])
{ {
case 0: // day-sum case 0: // day-sum
$row['ts_title'] = lang('Sum %1:',lang(date('l',$row['ts_start'])).' '.common::show_date($row['ts_start'], $row['ts_title'] = lang('Sum %1:',lang(date('l',$row['ts_start'])).' '.common::show_date($row['ts_start'],
$GLOBALS['egw_info']['user']['preferences']['common']['dateformat'],false)); $GLOBALS['egw_info']['user']['preferences']['common']['dateformat'],false));
// For some reason day sum checkbox on the etemplate is checked[1] instead of checked[0]
$readonlys["checked[1]"] = true;
$row['ts_id'] = 'sum-day-'.$row['ts_start']; $row['ts_id'] = 'sum-day-'.$row['ts_start'];
break; break;
case -1: // week-sum case -1: // week-sum
@ -734,17 +729,14 @@ class timesheet_ui extends timesheet_bo
} }
if (!$this->check_acl(EGW_ACL_EDIT,$row)) if (!$this->check_acl(EGW_ACL_EDIT,$row))
{ {
$readonlys["edit[$row[ts_id]]"] = true;
$row['class'] .= ' rowNoEdit '; $row['class'] .= ' rowNoEdit ';
} }
if (!$this->check_statusForEditRights($row)) if (!$this->check_statusForEditRights($row))
{ {
$readonlys["edit[$row[ts_id]]"] = true;
$row['class'] .= ' rowNoEdit '; $row['class'] .= ' rowNoEdit ';
} }
if (!$this->check_acl(EGW_ACL_DELETE,$row)) if (!$this->check_acl(EGW_ACL_DELETE,$row))
{ {
$readonlys["delete[$row[ts_id]]"] = true;
$row['class'] .= ' rowNoDelete '; $row['class'] .= ' rowNoDelete ';
} }
if($row['ts_status'] != self::DELETED_STATUS) if($row['ts_status'] != self::DELETED_STATUS)
@ -767,7 +759,6 @@ class timesheet_ui extends timesheet_bo
} }
} }
} }
$readonlys["document[{$row['ts_id']}]"] = !$GLOBALS['egw_info']['user']['preferences']['timesheet']['default_document'];
if (!$query['filter2']) if (!$query['filter2'])
{ {
unset($row['ts_description']); unset($row['ts_description']);
@ -876,7 +867,7 @@ class timesheet_ui extends timesheet_bo
'order' => 'ts_start',// IO name of the column to sort after (optional for the sortheaders) 'order' => 'ts_start',// IO name of the column to sort after (optional for the sortheaders)
'sort' => 'DESC',// IO direction of the sort: 'ASC' or 'DESC' 'sort' => 'DESC',// IO direction of the sort: 'ASC' or 'DESC'
'header_left' => 'timesheet.index.dates', 'header_left' => 'timesheet.index.dates',
'header_right' => 'timesheet.index.add', 'header_row' => 'timesheet.index.add',
'filter_onchange' => "app.timesheet.filter_change();", 'filter_onchange' => "app.timesheet.filter_change();",
'filter2' => (int)$GLOBALS['egw_info']['user']['preferences'][TIMESHEET_APP]['show_details'], 'filter2' => (int)$GLOBALS['egw_info']['user']['preferences'][TIMESHEET_APP]['show_details'],
'row_id' => 'ts_id', 'row_id' => 'ts_id',

View File

@ -25,7 +25,6 @@
<column disabled="@no_owner_col"/> <column disabled="@no_owner_col"/>
<column disabled="@no_ts_status"/> <column disabled="@no_ts_status"/>
<column/> <column/>
<column/>
</columns> </columns>
<rows> <rows>
<row class="th"> <row class="th">
@ -66,10 +65,6 @@
<nextmatch-filterheader id="ts_owner" no_lang="1" options="User" class="$cont[ownerClass]"/> <nextmatch-filterheader id="ts_owner" no_lang="1" options="User" class="$cont[ownerClass]"/>
<nextmatch-filterheader id="ts_status" options="Status"/> <nextmatch-filterheader id="ts_status" options="Status"/>
<nextmatch-customfields id="customfields"/> <nextmatch-customfields id="customfields"/>
<hbox class="noPrint">
<nextmatch-header align="right" label="Actions" id="legacy_actions" class="noPrint"/>
<button statustext="Check all" label="Check all" id="check_all" needed="1" onclick="egw_globalObjectManager.getObjectById('timesheet.index.rows').toggleAllSelected(); return false;" image="check"/>
</hbox>
</row> </row>
<row class="$row_cont[cat_id] $row_cont[class]"> <row class="$row_cont[cat_id] $row_cont[class]">
<date-time id="${row}[ts_start]" readonly="true" options=",8"/> <date-time id="${row}[ts_start]" readonly="true" options=",8"/>
@ -92,19 +87,11 @@
<menupopup id="${row}[ts_status]" readonly="true"/> <menupopup id="${row}[ts_status]" readonly="true"/>
</menulist> </menulist>
<customfields-list id="$row" readonly="true"/> <customfields-list id="$row" readonly="true"/>
<hbox align="right" class="noPrint">
<button statustext="View this entry" label="View" id="view[$row_cont[ts_id]]" onclick="window.open(egw::link('/index.php','menuaction=timesheet.timesheet_ui.view&amp;ts_id=$row_cont[ts_id]'),'_blank','dependent=yes,width=600,height=400,scrollbars=yes,status=yes'); return false;" image="view"/>
<button statustext="Edit this entry" label="Edit" id="edit[$row_cont[ts_id]]" onclick="window.open(egw::link('/index.php','menuaction=timesheet.timesheet_ui.edit&amp;ts_id=$row_cont[ts_id]'),'_blank','dependent=yes,width=600,height=400,scrollbars=yes,status=yes'); return false;" image="edit"/>
<button label="Insert in document" id="document[$row_cont[ts_id]]" image="etemplate/merge" class="image16"/>
<button statustext="Delete this entry" label="Delete" id="delete[$row_cont[ts_id]]" onclick="et2_dialog.confirm(widget,'Delete this entry','Delete')" image="delete"/>
<checkbox statustext="Select multiple timeshhets for a further action" id="checked[]" options="$row_cont[ts_id]"/>
</hbox>
</row> </row>
</rows> </rows>
</grid> </grid>
</template> </template>
<template id="timesheet.index" template="" lang="" group="0" version="1.9.001"> <template id="timesheet.index" template="" lang="" group="0" version="1.9.001">
<description align="center" id="msg" no_lang="1" class="message"/> <nextmatch id="nm" options="timesheet.index.rows" header_left="timesheet.index.dates"/>
<nextmatch id="nm" options="timesheet.index.rows" header_left="timesheet.index.dates" header_right="timesheet.index.add"/>
</template> </template>
</overlay> </overlay>