[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] ged/inc class.ged_dm.inc.php class.ged_ui.inc.php
From: |
Pascal Vilarem |
Subject: |
[Phpgroupware-cvs] ged/inc class.ged_dm.inc.php class.ged_ui.inc.php |
Date: |
Fri, 03 Aug 2007 13:35:46 +0000 |
CVSROOT: /sources/phpgroupware
Module name: ged
Changes by: Pascal Vilarem <maat> 07/08/03 13:35:45
Modified files:
inc : class.ged_dm.inc.php class.ged_ui.inc.php
Log message:
fixed : same behavior of select in update form / add form
fixed : if no place for default review docs then place them in current
folder
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/ged/inc/class.ged_dm.inc.php?cvsroot=phpgroupware&r1=1.42&r2=1.43
http://cvs.savannah.gnu.org/viewcvs/ged/inc/class.ged_ui.inc.php?cvsroot=phpgroupware&r1=1.44&r2=1.45
Patches:
Index: class.ged_dm.inc.php
===================================================================
RCS file: /sources/phpgroupware/ged/inc/class.ged_dm.inc.php,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -b -r1.42 -r1.43
--- class.ged_dm.inc.php 3 Aug 2007 09:39:17 -0000 1.42
+++ class.ged_dm.inc.php 3 Aug 2007 13:35:45 -0000 1.43
@@ -64,7 +64,8 @@
// TODO : find a better way to know what doc type
// TODO : should be used for comments ( cf reject and refuse
actions )
- $this->comment_file_type='fiche-relecture';
+ $this->internal_review_file_type='fiche-relecture-interne';
+ $this->external_review_file_type='fiche-relecture-externe';
if ( ! is_dir ( $this->datadir ))
mkdir ( $this->datadir);
@@ -2112,8 +2113,15 @@
{
$new_file=$comment_file;
-
$new_file['doc_type']=$this->comment_file_type;
-
$new_file['parent_id']=$this->get_type_place($new_file['doc_type'],$element['project_root']);
+ $new_place=null;
+
$new_place=$this->get_type_place($new_file['doc_type'],$element['project_root']);
+ if ( !isset($new_place))
+ {
+
$new_place=$element['parent_id'];
+ }
+
+
$new_file['doc_type']=$this->internal_review_file_type;
+ $new_file['parent_id']=$new_place;
$new_file['name']=$this->get_type_desc($new_file['doc_type'])." /
".$element['name'];
$new_file['description']=$comment;
$new_file['reference']=$this->get_next_available_reference($new_file['doc_type'],
$element['project_root'] );
@@ -2168,9 +2176,16 @@
if (isset($comment_file))
{
+ $new_place=null;
+
$new_place=$this->get_type_place($new_file['doc_type'],$element['project_root']);
+ if ( !isset($new_place))
+ {
+
$new_place=$element['parent_id'];
+ }
+
$new_file=$comment_file;
-
$new_file['doc_type']=$this->comment_file_type;
-
$new_file['parent_id']=$this->get_type_place($new_file['doc_type'],$element['project_root']);
+
$new_file['doc_type']=$this->external_review_file_type;
+ $new_file['parent_id']=$new_place;
$new_file['name']=$this->get_type_desc($new_file['doc_type'])." /
".$element['name'];
$new_file['description']=$comment;
$new_file['reference']=$this->get_next_available_reference($new_file['doc_type'],
$element['project_root'] );
@@ -3337,7 +3352,7 @@
$sql.="ged_versions.creation_date vcreation_date,
ged_elements.creator_id ecreator_id ";
$sql.="FROM ( ged_elements ";
$sql.="JOIN ged_doc_types ON
ged_elements.project_root=".(int)$project_root_id." ";
- $sql.="AND ged_elements.doc_type = ged_doc_types.type_id ) ";
+ $sql.="AND ged_elements.doc_type = ged_doc_types.type_id AND
ged_doc_types.type_chrono=1) ";
$sql.="JOIN ged_versions On ( ged_elements.element_id =
ged_versions.element_id) ";
$sql.="ORDER BY ged_versions.creation_date";
Index: class.ged_ui.inc.php
===================================================================
RCS file: /sources/phpgroupware/ged/inc/class.ged_ui.inc.php,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -b -r1.44 -r1.45
--- class.ged_ui.inc.php 2 Aug 2007 15:34:10 -0000 1.44
+++ class.ged_ui.inc.php 3 Aug 2007 13:35:45 -0000 1.45
@@ -1692,12 +1692,19 @@
$select_types_html="<select name=\"document_type\">\n";
foreach ($select_types as $select_type)
{
+ $selected="";
if ($select_type['type_id'] == $doc_type )
+ {
$selected=" selected ";
- else
- $selected="";
+ }
- $select_types_html.="<option
value=\"".$select_type['type_id']."\"".$selected.">".lang($select_type['type_desc'])."</option>\n";
+ $chrono_flag=$style="";
+ if ( $select_type['type_chrono']==1)
+ {
+ $chrono_flag=" [C]";
+ $style="style=\"font-weight: bold;\"";
+ }
+ $select_types_html.="<option ".$style."
value=\"".$select_type['type_id']."\"".$selected.">".lang($select_type['type_desc']).$chrono_flag."</option>\n";
}
$select_types_html.="</select>\n";
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] ged/inc class.ged_dm.inc.php class.ged_ui.inc.php,
Pascal Vilarem <=