[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] ged templates/base/folder.tpl inc/class.ged_ui....
From: |
Pascal Vilarem |
Subject: |
[Phpgroupware-cvs] ged templates/base/folder.tpl inc/class.ged_ui.... |
Date: |
Mon, 30 Jul 2007 17:12:51 +0000 |
CVSROOT: /sources/phpgroupware
Module name: ged
Changes by: Pascal Vilarem <maat> 07/07/30 17:12:51
Modified files:
templates/base : folder.tpl
inc : class.ged_ui.inc.php
Log message:
Added : display of file version status in folder view
Fixed : A few TODO -> DONE in comments
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/ged/templates/base/folder.tpl?cvsroot=phpgroupware&r1=1.1.1.1&r2=1.2
http://cvs.savannah.gnu.org/viewcvs/ged/inc/class.ged_ui.inc.php?cvsroot=phpgroupware&r1=1.39&r2=1.40
Patches:
Index: templates/base/folder.tpl
===================================================================
RCS file: /sources/phpgroupware/ged/templates/base/folder.tpl,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -b -r1.1.1.1 -r1.2
--- templates/base/folder.tpl 30 Mar 2006 12:29:23 -0000 1.1.1.1
+++ templates/base/folder.tpl 30 Jul 2007 17:12:51 -0000 1.2
@@ -10,13 +10,13 @@
<h2>Subdirs{lang_Subdirs}</h2>
<ul>
<!-- BEGIN subfolders_list -->
-<li><a class="info" href="{folder_link}" title="{folder_reference} -
{folder_description}">{folder_name}</a> - {folder_owner}</li>
+<li class="{tr_class}"><a class="info" href="{folder_link}"
title="{folder_reference} - {folder_description}">{folder_name}</a> -
{folder_owner}</li>
<!-- END subfolders_list -->
</ul>
<h2>{lang_documents}</h2>
<ul>
<!-- BEGIN files_list -->
-<li><a class="filelist" href="{file_link}" title="{file_reference} -
{file_description}">{file_name}</a> - {file_owner}</li>
+<li class="{tr_class}"><a class="filelist" href="{file_link}"
title="{file_reference} - {file_description}"><img src="{file_status_image}" />
{file_name}</a> - {file_owner}</li>
<!-- END files_list -->
</ul>
</div>
\ No newline at end of file
Index: inc/class.ged_ui.inc.php
===================================================================
RCS file: /sources/phpgroupware/ged/inc/class.ged_ui.inc.php,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -b -r1.39 -r1.40
--- inc/class.ged_ui.inc.php 26 Jul 2007 18:25:29 -0000 1.39
+++ inc/class.ged_ui.inc.php 30 Jul 2007 17:12:51 -0000 1.40
@@ -781,11 +781,14 @@
$this->t->set_var('name',
$this->truncate($element_info['name']));
$this->t->set_var('creation_date',
$GLOBALS['phpgw']->common->show_date($element_info['creation_date']));
+ $sub_folders=null;
$sub_folders=$this->ged_dm->list_elements($element_id,
'folder');
- if ($sub_folders)
- {
$this->t->set_block('folder_tpl', 'subfolders_list',
'subfolders_list_handle');
+ $this->t->set_var('subfolders_list_handle', "");
+
+ if (isset($sub_folders))
+ {
$tr_class='';
foreach ($sub_folders as $subfolder)
{
@@ -810,11 +813,14 @@
}
}
+ $files=null;
$files=$this->ged_dm->list_elements($element_id, 'file');
- if ($files)
- {
$this->t->set_block('folder_tpl', 'files_list',
'files_list_handle');
+ $this->t->set_var('files_list_handle','');
+
+ if (isset($files))
+ {
$tr_class='row_off';
foreach ($files as $file)
{
@@ -823,12 +829,23 @@
else
$tr_class='row_off';
+ $file_version=null;
+ if ( $this->ged_dm->admin ||
$this->ged_dm->can_write($file['element_id']))
+ {
+
$file_version=$this->ged_dm->get_last_version($file['element_id']);
+ }
+ else
+ {
+
$file_version=$this->ged_dm->get_current_or_pending_for_acceptation_version($file['element_id']);
+ }
+
$this->t->set_var('tr_class', $tr_class);
$this->t->set_var('file_name',
$this->truncate($file['name']));
$this->t->set_var('file_reference',
$file['reference']);
$this->t->set_var('file_description',
$file['description']);
$this->t->set_var('file_owner',
$GLOBALS['phpgw']->common->grab_owner_name($file['owner_id']));
+ $this->t->set_var('file_status_image',
$GLOBALS['phpgw']->common->image('ged', $file_version['status']."-16"));
$link_data=null;
$link_data['menuaction']='ged.ged_ui.browse';
@@ -2547,7 +2564,7 @@
$this->t->set_block('chrono_tpl', 'type_block',
'type_block_handle');
$this->t->set_block('type_block', 'chrono_block',
'chrono_block_handle');
- // TODO : use the project name instead of root id
+ // DONE : use the project name instead of root id
$this->t->set_var('lang_chrono_title', lang('Chronos for
project')." ".$this->ged_dm->get_project_name($project_root));
$chronos=$this->ged_dm->list_chronos($project_root);
@@ -2556,12 +2573,12 @@
{
$this->t->set_var('chrono_block_handle', "");
- //TODO : Use the detailed label of type
+ //DONE : Use the detailed label of type
$this->t->set_var('doc_type', $type_id);
$row_class="row_off";
foreach ( $type_chronos as $chrono)
{
- // TODO : set up the needed template variables
+ // DONE : set up the needed template variables
$this->t->set_var('name', $chrono['name']);
$this->t->set_var('date',
$GLOBALS['phpgw']->common->show_date($chrono['date']));
$this->t->set_var('author',
$GLOBALS['phpgw']->common->grab_owner_name($chrono['creator_id']));
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] ged templates/base/folder.tpl inc/class.ged_ui....,
Pascal Vilarem <=