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 bf21bfe5ccc056a7b4ce79b668c60e95a8773f3a (commit)
via 0c97589a8488ccb8f439d64dcaa74b8fe3edcb0a (commit)
from 4e05a96a4ed3902e4611bbe6e492e6e4c7f1ca78 (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=bf21bfe5ccc056a7b4ce79b668c60e95a8773f3a
commit bf21bfe5ccc056a7b4ce79b668c60e95a8773f3a
Author: Marc-Etienne Vargenau <[email protected]>
Date: Mon Jun 20 18:07:00 2016 +0200
New functions: addButtons(), getButtons()
diff --git a/src/www/include/Layout.class.php b/src/www/include/Layout.class.php
index 34cf125..e38eae8 100644
--- a/src/www/include/Layout.class.php
+++ b/src/www/include/Layout.class.php
@@ -112,6 +112,7 @@ class Layout extends FFError {
var $css = array();
var $css_min = array();
var $stylesheets = array();
+ var $buttons = array();
function __construct() {
parent::__construct();
@@ -229,6 +230,32 @@ class Layout extends FFError {
return $code;
}
+ function addButtons($link, $text, $options = array()) {
+ $this->buttons[] = array_merge( array('link' => $link, 'text'
=> $text), $options);
+ }
+
+ function getButtons() {
+ $code = '';
+ if ($this->buttons) {
+ $code .= "\n";
+ $code .= '<p class="buttonsbar">';
+ $code .= "\n";
+ foreach ($this->buttons as $b) {
+ $text = $b['text'];
+ $link = $b['link'];
+ if (isset($b['icon'])) {
+ $text = $b['icon'].' '.$text;
+ unset($b['icon']);
+ }
+ unset($b['text'], $b['link'], $b['icon']);
+ $code .= '<span
class="buttons">'.util_make_link($link, $text, $b).'</span>'."\n";
+ }
+ $code .= '</p>';
+ $this->buttons = array();
+ }
+ return $code;
+ }
+
/**
* header() - generates the complete header of page by calling
* headerStart() and bodyHeader().
https://scm.fusionforge.org/anonscm/gitweb/?p=fusionforge/fusionforge.git;a=commitdiff;h=0c97589a8488ccb8f439d64dcaa74b8fe3edcb0a
commit 0c97589a8488ccb8f439d64dcaa74b8fe3edcb0a
Author: Marc-Etienne Vargenau <[email protected]>
Date: Mon Jun 20 17:52:19 2016 +0200
Whitespace
diff --git a/src/plugins/projects-hierarchy/view/admin_project_link.php
b/src/plugins/projects-hierarchy/view/admin_project_link.php
index 3212aae..9707153 100644
--- a/src/plugins/projects-hierarchy/view/admin_project_link.php
+++ b/src/plugins/projects-hierarchy/view/admin_project_link.php
@@ -35,7 +35,7 @@ if (sizeof($parent)) {
$parentGroup = group_get_object($parent[0]);
echo $HTML->openForm(array('method' => 'post', 'action' =>
'/plugins/'.$projectsHierarchy->name.'/?type=group&action=removeParent&id='.$group_id.'&parent_id='.$parentGroup->getID()));
echo
util_make_link('/projects/'.$parentGroup->getUnixName(),$parentGroup->getPublicName(),array('title'=>_('Browse
this project')));
- echo ' <input type="submit" value="'._('Remove parent project').'">';
+ echo '<input type="submit" value="'._('Remove parent project').'">';
echo $HTML->closeForm();
}
@@ -46,7 +46,7 @@ if (sizeof($childs)) {
$childGroup = group_get_object($child);
echo $HTML->openForm(array('method' => 'post', 'action' =>
'/plugins/'.$projectsHierarchy->name.'/?type=group&action=removeChild&id='.$group_id.'&child_id='.$childGroup->getID()));
echo
util_make_link('/projects/'.$childGroup->getUnixName(),$childGroup->getPublicName(),array('title'=>_('Browse
this project')));
- echo ' <input type="submit" value="'._('Remove child
project').'">';
+ echo '<input type="submit" value="'._('Remove child
project').'">';
echo $HTML->closeForm();
}
}
@@ -58,7 +58,7 @@ if (sizeof($childs)) {
$childGroup = group_get_object($child);
echo $HTML->openForm(array('method' => 'post', 'action' =>
'/plugins/'.$projectsHierarchy->name.'/?type=group&action=removeChild&id='.$group_id.'&child_id='.$childGroup->getID()));
echo
util_make_link('/projects/'.$childGroup->getUnixName(),$childGroup->getPublicName(),array('title'=>_('Browse
this project')));
- echo ' <input type="submit" value="'._('Remove child
project').'">';
+ echo '<input type="submit" value="'._('Remove child
project').'">';
echo $HTML->closeForm();
}
}
@@ -74,7 +74,7 @@ if (sizeof($pendingParent)) {
echo '<input type="hidden" name="validation_id"
value="'.$pendingParent[0].'" />';
echo _('Validate parent').'
'.util_make_link('/projects/'.$pendingParentGroup->getUnixName(),
$pendingParentGroup->getPublicName(), array('title'=>_('Browse this project')));
echo html_build_select_box_from_arrays(array(1,0), array(_('Yes'),
_('No')), 'validation_status', 'xzxz', false);
- echo ' <input type="submit" value="'. _('Send') .'" />';
+ echo '<input type="submit" value="'. _('Send') .'" />';
echo $HTML->closeForm();
}
-----------------------------------------------------------------------
Summary of changes:
.../projects-hierarchy/view/admin_project_link.php | 8 +++----
src/www/include/Layout.class.php | 27 ++++++++++++++++++++++
2 files changed, 31 insertions(+), 4 deletions(-)
hooks/post-receive
--
FusionForge
_______________________________________________
Fusionforge-commits mailing list
[email protected]
http://lists.fusionforge.org/cgi-bin/mailman/listinfo/fusionforge-commits