- icon linking to filemanager of entry

- configurable limit of height of describtion in list
This commit is contained in:
Ralf Becker 2009-05-08 16:01:33 +00:00
parent e5ffe827f6
commit 701fe5661b
8 changed files with 91 additions and 44 deletions

View File

@ -5,7 +5,7 @@
* @link http://www.egroupware.org
* @author Ralf Becker <RalfBecker-AT-outdoor-training.de>
* @package infolog
* @copyright (c) 2003-6 by Ralf Becker <RalfBecker-AT-outdoor-training.de>
* @copyright (c) 2003-9 by Ralf Becker <RalfBecker-AT-outdoor-training.de>
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
* @version $Id$
*/
@ -111,15 +111,17 @@ class infolog_hooks
}
/**
* populates $GLOBALS['settings'] for the preferences
* populates $settings for the preferences
*
* @return array
*/
static function settings()
{
/* Setup some values to fill the array of this app's settings below */
$ui = new infolog_ui(); // need some labels from
$info = new infolog_bo(); // need some labels from
$filters = $show_home = array();
$show_home[] = lang("DON'T show InfoLog");
foreach($ui->filters as $key => $label)
foreach($info->filters as $key => $label)
{
$show_home[$key] = $filters[$key] = lang($label);
}
@ -144,7 +146,7 @@ class infolog_hooks
);
/* Settings array for this app */
$GLOBALS['settings'] = array(
$settings = array(
'defaultFilter' => array(
'type' => 'select',
'label' => 'Default Filter for InfoLog',
@ -206,6 +208,15 @@ class infolog_hooks
'xmlrpc' => True,
'admin' => False
),
'limit_des_lines' => array(
'type' => 'input',
'size' => 5,
'label' => 'Limit number of description lines (default 5, 0 for no limit)',
'name' => 'limit_des_lines',
'help' => 'How many describtion lines should be directly visible. Further lines are available via a scrollbar.',
'xmlrpc' => True,
'admin' => False
),
'set_start' => array(
'type' => 'select',
'label' => 'Startdate for new entries',
@ -223,7 +234,7 @@ class infolog_hooks
'type' => 'multiselect',
'label' => 'Which types should the calendar show',
'name' => 'cal_show',
'values' => $ui->bo->enums['type'],
'values' => $info->enums['type'],
'help' => 'Can be used to show further InfoLog types in the calendar or limit it to show eg. only tasks.',
'xmlrpc' => True,
'admin' => False
@ -241,7 +252,7 @@ class infolog_hooks
);
// notification preferences
$GLOBALS['settings']['notify_creator'] = array(
$settings['notify_creator'] = array(
'type' => 'check',
'label' => 'Receive notifications about own items',
'name' => 'notify_creator',
@ -249,7 +260,7 @@ class infolog_hooks
'xmlrpc' => True,
'admin' => False,
);
$GLOBALS['settings']['notify_assigned'] = array(
$settings['notify_assigned'] = array(
'type' => 'select',
'label' => 'Receive notifications about items assigned to you',
'name' => 'notify_assigned',
@ -272,7 +283,7 @@ class infolog_hooks
'2d' => lang('%1 days in advance',2),
'3d' => lang('%1 days in advance',3),
);
$GLOBALS['settings']['notify_due_delegated'] = array(
$settings['notify_due_delegated'] = array(
'type' => 'select',
'label' => 'Receive notifications about due entries you delegated',
'name' => 'notify_due_delegated',
@ -281,7 +292,7 @@ class infolog_hooks
'xmlrpc' => True,
'admin' => False,
);
$GLOBALS['settings']['notify_due_responsible'] = array(
$settings['notify_due_responsible'] = array(
'type' => 'select',
'label' => 'Receive notifications about due entries you are responsible for',
'name' => 'notify_due_responsible',
@ -290,7 +301,7 @@ class infolog_hooks
'xmlrpc' => True,
'admin' => False,
);
$GLOBALS['settings']['notify_start_delegated'] = array(
$settings['notify_start_delegated'] = array(
'type' => 'select',
'label' => 'Receive notifications about starting entries you delegated',
'name' => 'notify_start_delegated',
@ -299,7 +310,7 @@ class infolog_hooks
'xmlrpc' => True,
'admin' => False,
);
$GLOBALS['settings']['notify_start_responsible'] = array(
$settings['notify_start_responsible'] = array(
'type' => 'select',
'label' => 'Receive notifications about starting entries you are responsible for',
'name' => 'notify_start_responsible',
@ -309,7 +320,7 @@ class infolog_hooks
'admin' => False,
);
return true; // otherwise prefs say it cant find the file ;-)
return $settings;
}
/**
@ -346,10 +357,7 @@ class infolog_hooks
if ($data['prefs']['notify_due_delegated'] || $data['prefs']['notify_due_responsible'] ||
$data['prefs']['notify_start_delegated'] || $data['prefs']['notify_start_responsible'])
{
require_once(EGW_API_INC.'/class.asyncservice.inc.php');
$async =& new asyncservice();
//$async->cancel_timer('infolog-async-notification');
if (!$async->read('infolog-async-notification'))
{

View File

@ -420,6 +420,9 @@ class infolog_ui
$GLOBALS['egw_info']['flags']['app_header'] .= ': '.$title;
}
}
// disable filemanager icon, if user has no access to it
$readonlys['filemanager/navbar'] = !isset($GLOBALS['egw_info']['user']['apps']['filemanager']);
return $query['total'];
}
@ -630,6 +633,13 @@ class infolog_ui
{
$values['css'] = '<style type="text/css">@import url('.$GLOBALS['egw_info']['server']['webserver_url'].'/infolog/templates/default/app.css);'."</style>";
}
// add scrollbar to long describtion, if user choose so in his prefs
if ($this->prefs['limit_des_lines'] > 0 || (string)$this->prefs['limit_des_lines'] == '')
{
$values['css'] .= '<style type="text/css">@media screen { .infoDes { max-height: '.
(($this->prefs['limit_des_lines'] ? $this->prefs['limit_des_lines'] : 5) * 1.35). // dono why em is not real lines
'em; overflow: auto; }}</style>';
}
return $this->tmpl->exec('infolog.infolog_ui.index',$values,array(
'info_type' => $this->bo->enums['type'],
),$readonlys,$persist,$return_html ? -1 : 0);

View File

@ -56,6 +56,7 @@ cancel infolog de Abbruch
cancelled infolog de abgesagt
categories infolog de Kategorien
category infolog de Kategorie
change history infolog de Änderungsverlauf
change the status of an entry, eg. close it infolog de Status eines Eintrags ändern, zB. ihn als erledigt markieren
charset of file infolog de Zeichensatz der Datei
check to set startday infolog de ankreutzen um Startdatum zu setzen
@ -150,9 +151,12 @@ from infolog de Von
general infolog de Allgemein
group owner for infolog de Gruppeneigentümer für
high infolog de hoch
history infolog de Historie
history logging infolog de Protokollierung der Historie
history logging and deleting of items infolog de Protokollierung der Historie und löschen von Einträgen
how many describtion lines should be directly visible. further lines are available via a scrollbar. infolog de Wieviele Zeilen der Beschreibung sollen direkt sichbar sein. Zusätzliche Zeilen können über einen Scrollbar erreicht werden.
id infolog de Id
id# infolog de Id#
if a type has a group owner, all entries of that type will be owned by the given group and not the user who created it! infolog de Wenn ein Typ einen Gruppeneigentümer hat, gehören alle Einträge dieses Typs der angegebenen Gruppe und NICHT dem Benutzer der sie angelegt hat!
if not set, the line with search and filters is hidden for less entries then "max matches per page" (as defined in your common preferences). infolog de Falls nicht gesetzt, wird die Suche und die Filter ausgeblendet für weniger Einträge als "maximale Treffer pro Seite" (in ihren allg. Einstellungen definiert).
import infolog de Import
@ -175,10 +179,12 @@ invalid filename infolog de Ungültiger Dateiname
label<br>helptext infolog de Beschriftung<br>Hilfetext
last changed infolog de letzte Änderung
last modified infolog de zuletzt geändert
leave blank to get the used time calculated by timesheet entries infolog de Leer lassen um die Zeit nach den Stundenzetteln zu bekommen
leave it empty infolog de leer lassen
leave without saveing the entry infolog de Abbruch ohne den Eintrag zu speichern
leaves without saveing infolog de Abbroch ohne speichern
leaves without saveing infolog de Abbruch ohne speichern
length<br>rows infolog de Länge<br />Zeilen
limit number of description lines (default 5, 0 for no limit) infolog de Begrenze Anzahl Beschreibungszeilen (Vorgabe 5, 0 für keine Grenze)
link infolog de Verknüpfung
links infolog de Verknüpfungen
links of this entry infolog de Verknüpfungen dieses Eintrags
@ -188,6 +194,7 @@ location infolog de Ort
longer textual description infolog de längere textliche Beschreibung
low infolog de niedrig
max length of the input [, length of the inputfield (optional)] infolog de max. Länge der Eingabe [, Länge des Eingabefeldes (optional)]
modifierer infolog de Geändert von
name must not be empty !!! infolog de Name darf nicht leer sein !!!
name of new type to create infolog de Name des neu anzulegenden Types
never hide search and filters infolog de Suche und Filter niemals ausblenden
@ -245,6 +252,8 @@ priority infolog de Priorität
private infolog de Privat
project infolog de Projekt
project settings: price, times infolog de Einstellungen zum Projekt: Preis, Zeiten
re-planned infolog de Umgeplant
re-planned time infolog de Umgeplante Zeit
re: infolog de Re:
read one record by passing its id. infolog de Einen Datensatz spezifiziert durch seine id lesen.
read rights (default) infolog de Leserechte (Vorgabe)
@ -339,6 +348,7 @@ urgent infolog de Dringend
used time infolog de benötigte Zeit
valid path on clientside<br>eg. \\server\share or e:\ infolog de gültiger Pfad clientseitig<br>zB. \\Server\Share oder e:\
valid path on clientside<br>eg. \servershare or e: infolog de gültiger Pfad clientseitig<br>zB. \\Server\Share oder e:\
valid path on clientside<br>eg. servershare or e: infolog de gültiger Pfad clientseitig<br>zB. \\Server\Share oder e:\
values for selectbox infolog de Werte für die Auswahlbox
view all subs of this entry infolog de alle Untereinträge dieses Eintrag anzeigen
view other subs infolog de andere Untereinträge anzeigen

View File

@ -41,7 +41,6 @@ add: infolog en Add:
all infolog en All
all links and attachments infolog en all links and attachments
allows to set the status of an entry, eg. set a todo to done if it's finished (values depend on entry-typ) infolog en allows to set the status of an entry, eg. set a ToDo to done if it's finished (values depend on entry-type)
applies the changes infolog en applies the changes
apply the changes infolog en Apply the changes
archive infolog en archive
are you shure you want to delete this entry ? infolog en Are you sure you want to delete this entry ?
@ -155,6 +154,7 @@ high infolog en high
history infolog en History
history logging infolog en History logging
history logging and deleting of items infolog en History logging and deleting of items
how many describtion lines should be directly visible. further lines are available via a scrollbar. infolog en How many describtion lines should be directly visible. Further lines are available via a scrollbar.
id infolog en Id
id# infolog en Id#
if a type has a group owner, all entries of that type will be owned by the given group and not the user who created it! infolog en If a type has a group owner, all entries of that type will be owned by the given group and NOT the user who created it!
@ -184,6 +184,7 @@ leave it empty infolog en leave it empty
leave without saveing the entry infolog en leave without saveing the entry
leaves without saveing infolog en leaves without saveing
length<br>rows infolog en Length<br>Rows
limit number of description lines (default 5, 0 for no limit) infolog en Limit number of description lines (default 5, 0 for no limit)
link infolog en Link
links infolog en Links
links of this entry infolog en Links of this entry
@ -251,7 +252,6 @@ priority infolog en Priority
private infolog en Private
project infolog en Project
project settings: price, times infolog en Project settings: price, times
projectmanager infolog en Projectmanager
re-planned infolog en Re-planned
re-planned time infolog en Re-planned time
re: infolog en Re:

File diff suppressed because one or more lines are too long

View File

@ -17,4 +17,5 @@ table.fullWidth { width: 100%; }
.fixedHeight { line-height: 12px; }
.noWrap { white-space: nowrap; }
.user_filter select { width: 100px; }
.inputFullWidth input { width: 100%; }
.inputFullWidth input { width: 100%; }
.image16 img { height: 16px; }

View File

@ -104,13 +104,13 @@
<description span="all" value="Custom status for typ" id="typ"/>
</row>
<row>
<template content="status" span="all" id="infolog.customfields.status"/>
<template content="status" span="all" id="status"/>
</row>
<row class="header">
<description span="all" value="Custom fields"/>
</row>
<row>
<template content="fields" span="all" id="infolog.customfields.fields"/>
<template content="fields" span="all" id="fields"/>
</row>
<row>
<hbox options="0,0" span="all">
@ -123,7 +123,7 @@
<row>
<hbox span="all">
<button label="Save" id="button[save]" statustext="saves the changes made and leaves"/>
<button label="Apply" id="button[apply]" statustext="applies the changes"/>
<button label="Apply" id="button[apply]" statustext="apply the changes"/>
<button label="Cancel" id="button[cancel]" statustext="leaves without saveing"/>
</hbox>
</row>

View File

@ -13,8 +13,8 @@
<button image="note" label="Note" id="add[note]" statustext="Add a new Note" onclick="window.open(egw::link('/index.php','menuaction=infolog.infolog_ui.edit&amp;type=note&amp;action=$cont[action]&amp;action_id=$cont[action_id]&amp;cat_id=$cont[cat_id]'),'_blank','dependent=yes,width=750,height=600,scrollbars=yes,status=yes'); return false;"/>
</hbox>
</template>
<template id="infolog.index.rows-noheader" template="" lang="" group="0" version="1.5.004">
<grid>
<template id="infolog.index.rows-noheader" template="" lang="" group="0" version="1.7.001">
<grid width="100%" class="my_form">
<columns>
<column width="2%"/>
<column/>
@ -123,16 +123,24 @@
<button image="parent.gif" label="View parent" align="center" id="view[$row_cont[info_id_parent]]" statustext="View the parent of this entry and all his subs"/>
<button image="timesheet" label="Add timesheet entry" id="timesheet[$row_cont[info_id]]" onclick="window.open(egw::link('/index.php','menuaction=timesheet.timesheet_ui.edit&amp;link_app[]=infolog&amp;link_id[]=$row_cont[info_id]$row_cont[extra_links]'),'_blank','dependent=yes,width=600,height=400,scrollbars=yes,status=yes'); return false;" align="center"/>
</vbox>
<hbox class="noPrint">
<button image="edit" label="Edit" id="edit[$row_cont[info_id]]" statustext="Edit this entry" onclick="window.open(egw::link('/index.php','menuaction=infolog.infolog_ui.edit&amp;info_id=$row_cont[info_id]'),'_blank','dependent=yes,width=750,height=600,scrollbars=yes,status=yes'); return false;"/>
<button image="delete" label="Delete" id="delete[$row_cont[info_id]]" statustext="Delete this entry" onclick="return $row_cont[info_anz_subs] || confirm('Delete this entry');"/>
<button image="done" label="Close" id="close[$row_cont[info_id]]" statustext="Sets the status of this entry and its subs to done"/>
</hbox>
<vbox class="noPrint">
<hbox options="0,0" class="noPrint" orient="0">
<button image="edit" label="Edit" id="edit[$row_cont[info_id]]" statustext="Edit this entry" onclick="window.open(egw::link('/index.php','menuaction=infolog.infolog_ui.edit&amp;info_id=$row_cont[info_id]'),'_blank','dependent=yes,width=750,height=600,scrollbars=yes,status=yes'); return false;"/>
<button image="delete" label="Delete" id="delete[$row_cont[info_id]]" statustext="Delete this entry" onclick="return $row_cont[info_anz_subs] || confirm('Delete this entry');"/>
</hbox>
<hbox options="0,0" class="noPrint" orient="0">
<button image="done" label="Close" id="close[$row_cont[info_id]]" statustext="Sets the status of this entry to done"/>
<button image="done_all" label="Close all" id="close_all[$row_cont[info_id]]" statustext="Sets the status of this entry and its subs to done"/>
<description/>
<description/>
</hbox>
<image src="filemanager/navbar" options="/index.php?menuaction=filemanager.filemanager_ui.index&amp;path=/apps/infolog/$row_cont[info_id]" class="image16" label="Filemanager"/>
</vbox>
</row>
</rows>
</grid>
</template>
<template id="infolog.index.rows" template="" lang="" group="0" version="1.5.004">
<template id="infolog.index.rows" template="" lang="" group="0" version="1.7.002">
<grid>
<columns>
<column width="2%"/>
@ -206,7 +214,9 @@
<description class="$row_cont[sub_class]" no_lang="1" id="${row}[info_subject]"/>
<description no_lang="1" align="right" id="{$row}[info_number]" class="infoId"/>
</hbox>
<description no_lang="1" id="${row}[info_des]" options=",,1"/>
<box class="infoDes">
<description no_lang="1" id="${row}[info_des]" options=",,1"/>
</box>
<link-string id="${row}[filelinks]"/>
</vbox>
<customfields-list class="customfields" id="$row"/>
@ -247,15 +257,21 @@
</vbox>
<vbox options="0" align="center" class="noPrint" orient="0">
<button image="new" label="Add sub" align="center" id="sp[$row_cont[info_id]]" statustext="Add a new sub-task, -note, -call to this entry" onclick="window.open(egw::link('/index.php','menuaction=infolog.infolog_ui.edit&amp;action=sp&amp;action_id=$row_cont[info_id]'),'_blank','dependent=yes,width=750,height=600,scrollbars=yes,status=yes'); return false;"/>
<button image="view.gif" label="View subs" align="center" id="view[$row_cont[info_id]]" statustext="View all subs of this entry"/>
<button image="parent.gif" label="View parent" align="center" id="view[$row_cont[info_id_parent]]" statustext="View the parent of this entry and all his subs"/>
<button image="view" label="View subs" align="center" id="view[$row_cont[info_id]]" statustext="View all subs of this entry"/>
<button image="parent" label="View parent" align="center" id="view[$row_cont[info_id_parent]]" statustext="View the parent of this entry and all his subs"/>
<button image="timesheet" label="Add timesheet entry" id="timesheet[$row_cont[info_id]]" onclick="window.open(egw::link('/index.php','menuaction=timesheet.timesheet_ui.edit&amp;link_app[]=infolog&amp;cat_id=$row_cont[info_cat]&amp;link_id[]=$row_cont[info_id]$row_cont[extra_links]'),'_blank','dependent=yes,width=600,height=400,scrollbars=yes,status=yes'); return false;" align="center"/>
</vbox>
<hbox class="noPrint">
<button image="edit" label="Edit" id="edit[$row_cont[info_id]]" statustext="Edit this entry" onclick="window.open(egw::link('/index.php','menuaction=infolog.infolog_ui.edit&amp;info_id=$row_cont[info_id]'),'_blank','dependent=yes,width=750,height=600,scrollbars=yes,status=yes'); return false;"/>
<button image="delete" label="Delete" id="delete[$row_cont[info_id]]" statustext="Delete this entry" onclick="return $row_cont[info_anz_subs] || confirm('Delete this entry');"/>
<button image="done" label="Close" id="close[$row_cont[info_id]]" statustext="Sets the status of this entry and its subs to done"/>
</hbox>
<vbox options="0" class="noPrint" orient="0">
<hbox options="0,0" class="noPrint" orient="0">
<button image="edit" label="Edit" id="edit[$row_cont[info_id]]" statustext="Edit this entry" onclick="window.open(egw::link('/index.php','menuaction=infolog.infolog_ui.edit&amp;info_id=$row_cont[info_id]'),'_blank','dependent=yes,width=750,height=600,scrollbars=yes,status=yes'); return false;"/>
<button image="delete" label="Delete" id="delete[$row_cont[info_id]]" statustext="Delete this entry" onclick="return $row_cont[info_anz_subs] || confirm('Delete this entry');"/>
</hbox>
<hbox options="0,0" class="noPrint" orient="0">
<button image="done" label="Close" id="close[$row_cont[info_id]]" statustext="Sets the status of this entry to done"/>
<button image="done_all" label="Close all" id="close_all[$row_cont[info_id]]" statustext="Sets the status of this entry and its subs to done"/>
</hbox>
<image src="filemanager/navbar" options="/index.php?menuaction=filemanager.filemanager_ui.index&amp;path=/apps/infolog/$row_cont[info_id]" class="image16" label="Filemanager"/>
</vbox>
</row>
</rows>
</grid>
@ -275,8 +291,8 @@
<description/>
</row>
<row disabled="1">
<template id="infolog.index.header_left"/>
<template id="infolog.index.header_right"/>
<template id="header_left"/>
<template id="header_right"/>
</row>
<row disabled="!@main">
<template content="main" span="all" id="infolog.index.rows-noheader"/>