[evolvis-commits] r12044: [#2875] bug fixed on renderExtraFields
mirabilos at evolvis.org
mirabilos at evolvis.org
Thu Feb 24 18:34:39 CET 2011
Author: mirabilos
Date: 2011-02-24 18:34:38 +0100 (Thu, 24 Feb 2011)
New Revision: 12044
Modified:
trunk/gforge_base/evolvisforge-5.1/gforge/www/tracker/include/ArtifactTypeHtml.class
Log:
[#2875] bug fixed on renderExtraFields
Modified: trunk/gforge_base/evolvisforge-5.1/gforge/www/tracker/include/ArtifactTypeHtml.class
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/gforge/www/tracker/include/ArtifactTypeHtml.class 2011-02-24 17:34:36 UTC (rev 12043)
+++ trunk/gforge_base/evolvisforge-5.1/gforge/www/tracker/include/ArtifactTypeHtml.class 2011-02-24 17:34:38 UTC (rev 12044)
@@ -45,27 +45,27 @@
$labels = array();
$links = array();
- $labels[] = $this->getName().': '._('Browse');
+ $labels[] = $this->getName().': '.$Language->getText('tracker_artifacttype','browse');
$links[] = '/tracker/?func=browse&group_id='.$group_id.'&atid='. $this->getID();
- $labels[] = _('Download .csv');
+ $labels[] = $Language->getText('tracker_artifacttype','csv');
$links[] = '/tracker/?func=downloadcsv&group_id='.$group_id.'&atid='. $this->getID();
if ($this->allowsAnon() || session_loggedin()) {
- $labels[] = _('Submit New');
+ $labels[] = $Language->getText('tracker_artifacttype','submit_new');
$links[] = '/tracker/?func=add&group_id='.$group_id.'&atid='. $this->getID();
}
if (session_loggedin()) {
- $labels[] = _('Reporting');
+ $labels[] = $Language->getText('tracker_artifacttype','reporting');
$links[] = '/tracker/reporting/?group_id='.$group_id.'&atid='. $this->getID();
if ($this->isMonitoring()) {
- $labels[] = _('Stop Monitor');
+ $labels[] = $Language->getText('tracker_monitor','monitorstop');
} else {
- $labels[] = _('Monitor');
+ $labels[] = $Language->getText('tracker_monitor','monitor');
}
$links[] = '/tracker/?group_id='.$group_id.'&atid='. $this->getID().'&func=monitor';
if ($this->userIsAdmin()) {
- $labels[] = _('Admin');
+ $labels[] = $Language->getText('tracker_artifacttype','admin');
$links[] = '/tracker/admin/?group_id='.$group_id.'&atid='.$this->getID();
}
}
@@ -83,22 +83,22 @@
$group_id= $this->Group->getID();
$links_arr[]='/tracker/admin/?group_id='.$group_id;
- $title_arr[]=_('New Tracker');
+ $title_arr[]=$Language->getText('tracker_admin','add_artifact_types');
$links_arr[]='/tracker/admin/?group_id='.$group_id.'&atid='.$this->getID().'&update_type=1';
- $title_arr[]=_('Update Settings');
+ $title_arr[]=$Language->getText('tracker_admin','update_artifact_types');
$links_arr[]='/tracker/admin/?group_id='.$group_id.'&atid='.$this->getID().'&add_extrafield=1';
- $title_arr[]=_('Manage Custom Fields');
+ $title_arr[]=$Language->getText('tracker_admin','manage_extrafield');
$links_arr[]='/tracker/admin/?group_id='.$group_id.'&atid='.$this->getID().'&clone_tracker=1';
- $title_arr[]=_('Clone Tracker');
+ $title_arr[]=$Language->getText('tracker_admin','clone_tracker');
$links_arr[]='/tracker/admin/?group_id='.$group_id.'&atid='.$this->getID().'&add_canned=1';
- $title_arr[]=_('Add Canned Responses');
+ $title_arr[]=$Language->getText('tracker_admin','add_canned');
$links_arr[]='/tracker/admin/?group_id='.$group_id.'&atid='.$this->getID().'&delete=1';
- $title_arr[]=_('Delete');
+ $title_arr[]=$Language->getText('tracker_admin','delete');
echo $HTML->printSubMenu($title_arr,$links_arr);
}
@@ -110,10 +110,8 @@
function renderExtraFields($selected=array(),$show_100=false,$text_100='none',$show_any=false,$text_any='Any',$filter='',$status_show_100=false,$mode='') {
$efarr = $this->getExtraFields($filter);
//each two columns, we'll reset this and start a new row
-
//TODO - add code for "display only" such as mod-limited and detail.php pages
$template = $this->getRenderHTML($filter);
-
if ($mode=='QUERY') {
$keys=array_keys($efarr);
for ($k=0; $k<count($keys); $k++) {
@@ -154,7 +152,9 @@
}
$template = str_replace('<!--'.$efarr[$i]['field_name'].'-->',$str,$template);
}
- echo $template;
+ if($template != NULL){
+ echo $template;
+ }
}
/**
@@ -274,7 +274,7 @@
function renderSelect ($extra_field_id,$checked='xzxz',$show_100=false,$text_100='none',$show_any=false,$text_any='Any') {
global $Language;
if ($text_100 == 'none'){
- $text_100=_('None');
+ $text_100=$Language->getText('tracker_artifacttype','none');
}
$arr =& $this->getExtraFieldElements($extra_field_id);
for ($i=0; $i<count($arr); $i++) {
@@ -314,7 +314,7 @@
function renderCheckbox ($extra_field_id,$checked=array(),$show_100=false,$text_100='none') {
global $Language;
if ($text_100 == 'none'){
- $text_100=_('None');
+ $text_100=$Language->getText('tracker_artifacttype','none');
}
if (!$checked || !is_array($checked)) {
$checked=array();
@@ -388,7 +388,7 @@
function technicianBox ($name='assigned_to[]',$checked='xzxz',$show_100=true,$text_100='none',$extra_id='-1',$extra_name='',$multiple=false) {
global $Language;
if ($text_100=='none'){
- $text_100=_('Nobody');
+ $text_100=$Language->getText('tracker_artifacttype','nobody');
}
$result = $this->getTechnicians();
// this was a bad hack to allow you to mass-update to unassigned, which is ID=100, which
@@ -422,7 +422,7 @@
function statusBox ($name='status_id',$checked='xzxz',$show_100=false,$text_100='none') {
global $Language;
if ($text_100=='none'){
- $text_100=_('None');
+ $text_100=$Language->getText('tracker_artifacttype','none');
}
return html_build_select_box($this->getStatuses(),$name,$checked,$show_100,$text_100);
}
More information about the evolvis-commits
mailing list