[Fusionforge-commits] FusionForge branch master updated. 6.0.4-808-gaebe857

Franck Villaume nerville at libremir.placard.fr.eu.org
Sat Aug 27 17:55:09 CEST 2016


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "FusionForge".

The branch, master has been updated
       via  aebe8575821b75a072347e09c1eee5f64b95fade (commit)
       via  527de482ec35cb95eb063288dc32ede58159e8ba (commit)
       via  454708deff56e7a2dc2a49f22f4e6e9f7c1303d4 (commit)
      from  01982e275ae4be249a3ab8a3b08f2d52b07570be (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
https://scm.fusionforge.org/anonscm/gitweb/?p=fusionforge/fusionforge.git;a=commitdiff;h=aebe8575821b75a072347e09c1eee5f64b95fade

commit aebe8575821b75a072347e09c1eee5f64b95fade
Author: Franck Villaume <franck.villaume at trivialdev.com>
Date:   Sat Aug 27 17:54:44 2016 +0200

    PHP syntax

diff --git a/src/www/include/Layout.class.php b/src/www/include/Layout.class.php
index 04fb560..4ddfcce 100644
--- a/src/www/include/Layout.class.php
+++ b/src/www/include/Layout.class.php
@@ -237,7 +237,7 @@ class Layout extends FFError {
 	function getButtons() {
 		$code = '';
 		if ($this->buttons) {
-			$code .= html_ao('p', array('class' => 'buttonsbar');
+			$code .= html_ao('p', array('class' => 'buttonsbar'));
 			foreach ($this->buttons as $b) {
 				$text = $b['text'];
 				$link = $b['link'];

https://scm.fusionforge.org/anonscm/gitweb/?p=fusionforge/fusionforge.git;a=commitdiff;h=527de482ec35cb95eb063288dc32ede58159e8ba

commit 527de482ec35cb95eb063288dc32ede58159e8ba
Author: Franck Villaume <franck.villaume at trivialdev.com>
Date:   Sat Aug 27 17:52:23 2016 +0200

    use HTML helpers

diff --git a/src/common/tracker/views/form-adminroadmap.php b/src/common/tracker/views/form-adminroadmap.php
index 6d1ad8d..7d61358 100644
--- a/src/common/tracker/views/form-adminroadmap.php
+++ b/src/common/tracker/views/form-adminroadmap.php
@@ -219,19 +219,19 @@ if ($set_roadmap_failed ||
 				if (array_key_exists($artifact_type->getID(), $roadmap_list)) {
 					$field_id = $roadmap_list[$artifact_type->getID()];
 				}
-
-				echo '<tr>';
-				echo '<td>' . $artifact_type->getName() . '</td>'."\n";
-				echo '<td><select name="roadmap_list['.$artifact_type->getID().']">'."\n";
-				echo '<option value="0"'.(! $field_id ? ' selected="selected"' : '').' >'._('Not used').'</option>'."\n";
+				$cells = array();
+				$cells[][] = $artifact_type->getName();
+				$content = '<select name="roadmap_list['.$artifact_type->getID().']">'."\n";
+				$content .= '<option value="0"'.(! $field_id ? ' selected="selected"' : '').' >'._('Not used').'</option>'."\n";
 				$extra_fields = $ath->getExtraFields(array(ARTIFACT_EXTRAFIELD_FILTER_INT));
 				foreach ($extra_fields as $extra_field) {
 					if ($extra_field['field_type'] != ARTIFACT_EXTRAFIELDTYPE_CHECKBOX) {
-						echo '<option value="'.$extra_field['extra_field_id'].'"'.($extra_field['extra_field_id'] == $field_id ? ' selected="selected"' : '').' >'.$extra_field['field_name'].'</option>'."\n";
+						$content .= '<option value="'.$extra_field['extra_field_id'].'"'.($extra_field['extra_field_id'] == $field_id ? ' selected="selected"' : '').' >'.$extra_field['field_name'].'</option>'."\n";
 					}
 				}
-				echo '</select></td>'."\n";
-				echo '</tr>'."\n";
+				$content .= '</select>';
+				$cells[][] = $content;
+				echo $HTML->multiTableRow(array(), $cells);
 			}
 		}
 		echo $HTML->listTableBottom();
diff --git a/src/www/include/Layout.class.php b/src/www/include/Layout.class.php
index 588afbb..04fb560 100644
--- a/src/www/include/Layout.class.php
+++ b/src/www/include/Layout.class.php
@@ -237,9 +237,7 @@ class Layout extends FFError {
 	function getButtons() {
 		$code = '';
 		if ($this->buttons) {
-			$code .= "\n";
-			$code .= '<p class="buttonsbar">';
-			$code .= "\n";
+			$code .= html_ao('p', array('class' => 'buttonsbar');
 			foreach ($this->buttons as $b) {
 				$text = $b['text'];
 				$link = $b['link'];
@@ -248,9 +246,9 @@ class Layout extends FFError {
 					unset($b['icon']);
 				}
 				unset($b['text'], $b['link'], $b['icon']);
-				$code .= '<span class="buttons">'.util_make_link($link, $text, $b).'</span>'."\n";
+				$code .= html_e('span', array('class' => 'buttons'), util_make_link($link, $text, $b));
 			}
-			$code .= '</p>';
+			$code .= html_ac(html_ap() -1);
 			$this->buttons = array();
 		}
 		return $code;

https://scm.fusionforge.org/anonscm/gitweb/?p=fusionforge/fusionforge.git;a=commitdiff;h=454708deff56e7a2dc2a49f22f4e6e9f7c1303d4

commit 454708deff56e7a2dc2a49f22f4e6e9f7c1303d4
Author: Franck Villaume <franck.villaume at trivialdev.com>
Date:   Sat Aug 27 17:42:55 2016 +0200

    use HTML helpers

diff --git a/src/common/tracker/views/form-adminroadmap.php b/src/common/tracker/views/form-adminroadmap.php
index 666d999..6d1ad8d 100644
--- a/src/common/tracker/views/form-adminroadmap.php
+++ b/src/common/tracker/views/form-adminroadmap.php
@@ -80,7 +80,7 @@ if (getStringFromRequest('set_roadmap')) {
 				$feedback .= sprintf(_('Roadmap %s created'), $roadmap_name);
 			}
 			else {
-				$error_msg .= _("Cannot create roadmap: ").$roadmap->getErrorMessage();
+				$error_msg .= _("Cannot create roadmap")._(': ').$roadmap->getErrorMessage();
 			}
 		}
 		else {
@@ -91,14 +91,14 @@ if (getStringFromRequest('set_roadmap')) {
 					$feedback .= sprintf(_('Roadmap %s renamed to %s'), $old_roadmap_name, $roadmap_name);
 				}
 				else {
-					$error_msg .= _("Cannot rename roadmap: ").$roadmap->getErrorMessage();
+					$error_msg .= _("Cannot rename roadmap")._(': ').$roadmap->getErrorMessage();
 				}
 			}
 		}
 		if (! $error_msg && is_array($roadmap_list) && ! empty($roadmap_list)) {
 			$result = $roadmap->setList($roadmap_list);
 			if (! $result) {
-				$error_msg .= _("Cannot set roadmap: ").$roadmap->getErrorMessage();
+				$error_msg .= _("Cannot set roadmap")._(': ').$roadmap->getErrorMessage();
 			}
 		}
 	}
@@ -122,11 +122,11 @@ elseif (getStringFromRequest('set_roadmap_state')) {
 		} else {
 			$result = $roadmap->setState((array_key_exists($roadmap->getID(), $roadmap_states) ? 1 : 0));
 			if (! $result) {
-				$error_msg .= _("Cannot set roadmap state: ").$roadmap->getErrorMessage();
+				$error_msg .= _("Cannot set roadmap state")._(': ').$roadmap->getErrorMessage();
 			}
 			$result = $roadmap->isDefault(($default_roadmap == $roadmap->getID() ? 1 : 0));
 			if (! $result) {
-				$error_msg .= _("Cannot set default value: ").$roadmap->getErrorMessage();
+				$error_msg .= _("Cannot set default value")._(': ').$roadmap->getErrorMessage();
 			}
 			if (! $error_msg && $updated === false) {
 				$feedback .= _('Roadmap configuration is updated');
@@ -144,7 +144,7 @@ elseif (getStringFromRequest('delete_roadmap_sure')) {
 		$feedback .= sprintf(_('Roadmap %s is deleted'), $roadmap->getName());
 	}
 	else {
-		$error_msg .= _("Cannot delete roadmap: ").$roadmap->getErrorMessage();
+		$error_msg .= _("Cannot delete roadmap")._(': ').$roadmap->getErrorMessage();
 	}
 }
 
@@ -198,11 +198,15 @@ if ($set_roadmap_failed ||
 		echo $HTML->information(_('No trackers have been set up.'));
 	} else {
 		echo $HTML->openForm(array('action' => '/tracker/admin/?group_id='.$group_id.'&admin_roadmap=1', 'method' => 'post'));
-		echo '<p>'._('Name'). _(': ') . '<input required="required" type="text" name="roadmap_name" value="'.$roadmap->getName().'" size="40" /></p>';
 		if ($roadmap_id) {
 			echo '<input type="hidden" name="roadmap_id" value="'.$roadmap_id.'" />';
 		}
-		echo '<table>'."\n";
+		echo $HTML->listTableTop();
+		$cells = array();
+		$cells[][] = _('Name')._(':');
+		$cells[][] = html_e('input', array('required' => 'required', 'type' => 'text', 'name' => 'roadmap_name', 'value' => $roadmap->getName(), 'size' => 40));
+		echo $HTML->multiTableRow(array(), $cells);
+
 		foreach ($at_arr as $artifact_type) {
 			if (!is_object($artifact_type)) {
 				//just skip it
@@ -220,7 +224,7 @@ if ($set_roadmap_failed ||
 				echo '<td>' . $artifact_type->getName() . '</td>'."\n";
 				echo '<td><select name="roadmap_list['.$artifact_type->getID().']">'."\n";
 				echo '<option value="0"'.(! $field_id ? ' selected="selected"' : '').' >'._('Not used').'</option>'."\n";
-				$extra_fields = $ath->getExtraFields( array(ARTIFACT_EXTRAFIELD_FILTER_INT));
+				$extra_fields = $ath->getExtraFields(array(ARTIFACT_EXTRAFIELD_FILTER_INT));
 				foreach ($extra_fields as $extra_field) {
 					if ($extra_field['field_type'] != ARTIFACT_EXTRAFIELDTYPE_CHECKBOX) {
 						echo '<option value="'.$extra_field['extra_field_id'].'"'.($extra_field['extra_field_id'] == $field_id ? ' selected="selected"' : '').' >'.$extra_field['field_name'].'</option>'."\n";
@@ -230,7 +234,7 @@ if ($set_roadmap_failed ||
 				echo '</tr>'."\n";
 			}
 		}
-		echo '</table>'."\n";
+		echo $HTML->listTableBottom();
 		echo '<p>
 			<input type="submit" name="set_roadmap" value="'._('Submit').'" />
 			<input type="submit" name="cancel" formnovalidate="formnovalidate" value="'._('Cancel').'" />
@@ -281,7 +285,7 @@ if (getIntFromRequest('manage_release') ||
 					$feedback .= _('Release(s) order updated');
 				}
 				else {
-					$error_msg .= _("Cannot modify release order: ").$selected_roadmap->getErrorMessage();
+					$error_msg .= _("Cannot modify release order")._(': ').$selected_roadmap->getErrorMessage();
 				}
 			}
 			elseif (getStringFromRequest('release_auto_order')) {
@@ -368,7 +372,7 @@ if (getIntFromRequest('manage_release') ||
 				$feedback .= _('Release(s) order updated');
 			}
 			else {
-				$error_msg .= _("Cannot modify release order: ").$selected_roadmap->getErrorMessage();
+				$error_msg .= _("Cannot modify release order")._(': ').$selected_roadmap->getErrorMessage();
 			}
 		}
 
@@ -393,7 +397,7 @@ if (getIntFromRequest('manage_release') ||
 		if (! empty($rows)) {
 			?>
 			<p>
-			<strong><?php echo sprintf(_('Set order of releases for %s roadmap:'), $selected_roadmap->getName()) ?></strong>
+			<strong><?php echo sprintf(_('Set order of releases for %s roadmap')._(': '), $selected_roadmap->getName()) ?></strong>
 			</p>
 			<?php
 			echo $HTML->openForm(array('action' => '/tracker/admin/?group_id='.$group_id.'&admin_roadmap=1', 'method' => 'post'));
@@ -402,7 +406,7 @@ if (getIntFromRequest('manage_release') ||
 			<?php
 			$title_arr = array();
 			$title_arr[] = _('Releases');
-			$title_arr[] = _('Current / New positions');
+			$title_arr[] = _('Current/New positions');
 			$title_arr[] = _('Up/Down positions');
 
 			echo $HTML->listTableTop($title_arr, false, ' ');

-----------------------------------------------------------------------

Summary of changes:
 src/common/tracker/views/form-adminroadmap.php | 48 ++++++++++++++------------
 src/www/include/Layout.class.php               |  8 ++---
 2 files changed, 29 insertions(+), 27 deletions(-)


hooks/post-receive
-- 
FusionForge



More information about the Fusionforge-commits mailing list