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, feature/twig-template-engine has been updated
       via  496bbf3446aaad230852f769ab3653892b46ee12 (commit)
       via  c5094b3c3414c70a9c1408640b27ec11afb712bf (commit)
       via  1b6255ec7b818949367e0af6e14a51a305319a94 (commit)
      from  208097d6f8ef31d29444d86cc44203d1b8d9420a (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 -----------------------------------------------------------------
commit 496bbf3446aaad230852f769ab3653892b46ee12
Author: Roland Mas <[email protected]>
Date:   Thu Jun 11 16:59:11 2015 +0200

    Switch theme to Funky-Twig for admin user for most of the testsuite

diff --git a/tests/func/Testing/SeleniumForge.php 
b/tests/func/Testing/SeleniumForge.php
index 0cbd925..08c5843 100644
--- a/tests/func/Testing/SeleniumForge.php
+++ b/tests/func/Testing/SeleniumForge.php
@@ -169,6 +169,8 @@ class FForge_SeleniumTestCase extends 
PHPUnit_Extensions_SeleniumTestCase
        }
 
        protected function init() {
+               $this->switchUser (FORGE_ADMIN_USERNAME) ;
+               $this->changeTheme("Funky Twig");
                $this->createAndGoto('ProjectA');
        }
 

commit c5094b3c3414c70a9c1408640b27ec11afb712bf
Author: Roland Mas <[email protected]>
Date:   Thu Jun 11 17:21:59 2015 +0200

    Implement inner tabs with Twig

diff --git a/src/www/themes/funky-twig/Theme.class.php 
b/src/www/themes/funky-twig/Theme.class.php
index 49d3443..d79ce3c 100644
--- a/src/www/themes/funky-twig/Theme.class.php
+++ b/src/www/themes/funky-twig/Theme.class.php
@@ -240,13 +240,13 @@ class Theme extends Layout {
 
                        // invoke the 'alt_representations' hook to add 
potential 'alternate' links (useful for Linked Data)
                        // cf. http://www.w3.org/TR/cooluris/#linking
-                       $params = array('script_name' => $script_name,
-                                                       'php_self' => $php_self,
-                                                       'return' => array());
-
-                       plugin_hook_by_reference('alt_representations', 
$params);
+                       $p2 = array('script_name' => $script_name,
+                                               'php_self' => $php_self,
+                                               'return' => array());
+                       
+                       plugin_hook_by_reference('alt_representations', $p2);
 
-                       $vars['alt_representations'] = $params['return'];
+                       $vars['alt_representations'] = $p2['return'];
                }
                
                print $template->render($vars);
@@ -272,11 +272,12 @@ class Theme extends Layout {
        function bodyHeader($params){
                global $use_tooltips;
 
-               // TODO: innertabs
                $template = $this->twig->loadTemplate('bodyHeader.html');
 
                $vars = array();
                
+               $vars['use_tooltips'] = $use_tooltips;
+
                if (isset($params['h1'])) {
                        $vars['h1'] = $params['h1'];
                } elseif (isset($params['title'])) {
@@ -341,8 +342,8 @@ class Theme extends Layout {
                $vars['naventries'] = $naventries;
 
 
-               $menu = $this->navigation->getSiteMenu();
                $outertabsdata = array();
+               $menu = $this->navigation->getSiteMenu();
                for ($i = 0; $i < count($menu); $i++) {
                        $d = array('href' => $menu['urls'][$i],
                                           'id' => md5($menu['urls'][$i]),
@@ -356,8 +357,26 @@ class Theme extends Layout {
                        $outertabsdata[] = $d;
                }
                $vars['outertabsdata'] = $outertabsdata;
-               $vars['use_tooltips'] = $use_tooltips;
-               
+
+
+
+               $projecttabsdata = array();
+               if (isset($params['group']) && $params['group']) {
+                       $menu = 
$this->navigation->getProjectMenu($params['group'], $params['toptab']);
+                       for ($i = 0; $i < count($menu); $i++) {
+                               $d = array('href' => $menu['urls'][$i],
+                                                  'id' => 
md5($menu['urls'][$i]),
+                                                  'title' => 
$menu['titles'][$i],
+                                                  'tooltip' => 
$menu['tooltips'][$i]);
+                               if ($i == $menu['selected']) {
+                                       $d['selected'] = true;
+                               } else {
+                                       $d['selected'] = false;
+                               }
+                               $projecttabsdata[] = $d;
+                       }
+               }
+               $vars['projecttabsdata'] = $projecttabsdata;
 
                $vars['error_msg'] = $GLOBALS['error_msg'];
                $vars['warning_msg'] = $GLOBALS['warning_msg'];
diff --git a/src/www/themes/funky-twig/templates/bodyHeader.html 
b/src/www/themes/funky-twig/templates/bodyHeader.html
index 09f9a24..3c1aeae 100644
--- a/src/www/themes/funky-twig/templates/bodyHeader.html
+++ b/src/www/themes/funky-twig/templates/bodyHeader.html
@@ -29,10 +29,13 @@
 
 {% include 'Tabs.html' with { 'use_tooltips': use_tooltips, 'tabs': 
outertabsdata, 'total_width': '100%' } only %}
 
-      
-
-      <!-- TODO: Add outertabs and innertabs (projecttabs) -->
+      {% if projecttabsdata|length > 0 %}
+      <div class="innertabs">
+      {% include 'Tabs.html' with { 'use_tooltips': use_tooltips, 'tabs': 
projecttabsdata, 'total_width': '100%', 'nested': true } only %}
+      </div>
+      {% endif %}
 
+      
     <div id="maindiv">
 
       {% include 'errorMessage.html' %}

commit 1b6255ec7b818949367e0af6e14a51a305319a94
Author: Roland Mas <[email protected]>
Date:   Thu Jun 11 16:51:32 2015 +0200

    Implement outer tabs with Twig

diff --git a/src/www/themes/funky-twig/Theme.class.php 
b/src/www/themes/funky-twig/Theme.class.php
index c21525e..49d3443 100644
--- a/src/www/themes/funky-twig/Theme.class.php
+++ b/src/www/themes/funky-twig/Theme.class.php
@@ -51,15 +51,15 @@ class Theme extends Layout {
                $template = $this->twig->loadTemplate('Tabs.html');
 
                $vars = array('use_tooltips' => $use_tooltips,
-                             'nested' => $nested,
-                             'total_width' => $total_width);
+                                         'nested' => $nested,
+                                         'total_width' => $total_width);
 
                $tabs = array();
                for ($i = 0; $i < count($TABS_DIRS); $i++) {
                        $tab = array('href' => $TABS_DIRS[$i],
-                                    'id' => md5($TABS_DIRS[$i]),
-                                    'title' => $TABS_TITLES[$i],
-                                    'tooltip' => $TABS_TOOLTIPS[$i]
+                                                'id' => md5($TABS_DIRS[$i]),
+                                                'title' => $TABS_TITLES[$i],
+                                                'tooltip' => $TABS_TOOLTIPS[$i]
                                );
                        if ($i == $selected) {
                                $tab['selected'] = true;
@@ -270,7 +270,9 @@ class Theme extends Layout {
                print $template->render($vars);
        }
        function bodyHeader($params){
-               // TODO: tabs, navigation menu
+               global $use_tooltips;
+
+               // TODO: innertabs
                $template = $this->twig->loadTemplate('bodyHeader.html');
 
                $vars = array();
@@ -309,7 +311,11 @@ class Theme extends Layout {
 
                $vars['session_loggedin'] = session_loggedin();
 
-               $groups = session_get_user()->getGroups();
+               if (session_loggedin()) {
+                       $groups = session_get_user()->getGroups();
+               } else {
+                       $groups = array();
+               }
                sortProjectList($groups);
                
                $naventries = array();
@@ -334,6 +340,25 @@ class Theme extends Layout {
 
                $vars['naventries'] = $naventries;
 
+
+               $menu = $this->navigation->getSiteMenu();
+               $outertabsdata = array();
+               for ($i = 0; $i < count($menu); $i++) {
+                       $d = array('href' => $menu['urls'][$i],
+                                          'id' => md5($menu['urls'][$i]),
+                                          'title' => $menu['titles'][$i],
+                                          'tooltip' => $menu['tooltips'][$i]);
+                       if ($i == $menu['selected']) {
+                               $d['selected'] = true;
+                       } else {
+                               $d['selected'] = false;
+                       }
+                       $outertabsdata[] = $d;
+               }
+               $vars['outertabsdata'] = $outertabsdata;
+               $vars['use_tooltips'] = $use_tooltips;
+               
+
                $vars['error_msg'] = $GLOBALS['error_msg'];
                $vars['warning_msg'] = $GLOBALS['warning_msg'];
                $vars['feedback'] = $GLOBALS['feedback'];
diff --git a/src/www/themes/funky-twig/templates/bodyHeader.html 
b/src/www/themes/funky-twig/templates/bodyHeader.html
index 28f55f8..09f9a24 100644
--- a/src/www/themes/funky-twig/templates/bodyHeader.html
+++ b/src/www/themes/funky-twig/templates/bodyHeader.html
@@ -25,7 +25,11 @@
 
 {% endif %}      
 
-{% include 'ListTableBottom.html' only %}
+      {% include 'ListTableBottom.html' only %}
+
+{% include 'Tabs.html' with { 'use_tooltips': use_tooltips, 'tabs': 
outertabsdata, 'total_width': '100%' } only %}
+
+      
 
       <!-- TODO: Add outertabs and innertabs (projecttabs) -->
 
diff --git a/src/www/themes/funky-twig/templates/headerStart.html 
b/src/www/themes/funky-twig/templates/headerStart.html
index 58b3f37..602bbf2 100644
--- a/src/www/themes/funky-twig/templates/headerStart.html
+++ b/src/www/themes/funky-twig/templates/headerStart.html
@@ -25,7 +25,7 @@
     {% endfor %}
 
     {% for s in stylesheets %}
-    <link type="text/css" href="{{ s.url }}" {% if m %} media="{{ s.media }}" 
{% endif %} />
+    <link rel="stylesheet" type="text/css" href="{{ s.url }}" {% if m %} 
media="{{ s.media }}" {% endif %} />
     {% endfor %}
 
     <meta name="Forge-Identification" content="{{ software_name }}:{{ 
software_version }}" />

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

Summary of changes:
 src/www/themes/funky-twig/Theme.class.php          | 70 ++++++++++++++++++----
 .../themes/funky-twig/templates/bodyHeader.html    | 11 +++-
 .../themes/funky-twig/templates/headerStart.html   |  2 +-
 tests/func/Testing/SeleniumForge.php               |  2 +
 4 files changed, 69 insertions(+), 16 deletions(-)

diff --git a/src/www/themes/funky-twig/Theme.class.php 
b/src/www/themes/funky-twig/Theme.class.php
index c21525e..d79ce3c 100644
--- a/src/www/themes/funky-twig/Theme.class.php
+++ b/src/www/themes/funky-twig/Theme.class.php
@@ -51,15 +51,15 @@ class Theme extends Layout {
                $template = $this->twig->loadTemplate('Tabs.html');
 
                $vars = array('use_tooltips' => $use_tooltips,
-                             'nested' => $nested,
-                             'total_width' => $total_width);
+                                         'nested' => $nested,
+                                         'total_width' => $total_width);
 
                $tabs = array();
                for ($i = 0; $i < count($TABS_DIRS); $i++) {
                        $tab = array('href' => $TABS_DIRS[$i],
-                                    'id' => md5($TABS_DIRS[$i]),
-                                    'title' => $TABS_TITLES[$i],
-                                    'tooltip' => $TABS_TOOLTIPS[$i]
+                                                'id' => md5($TABS_DIRS[$i]),
+                                                'title' => $TABS_TITLES[$i],
+                                                'tooltip' => $TABS_TOOLTIPS[$i]
                                );
                        if ($i == $selected) {
                                $tab['selected'] = true;
@@ -240,13 +240,13 @@ class Theme extends Layout {
 
                        // invoke the 'alt_representations' hook to add 
potential 'alternate' links (useful for Linked Data)
                        // cf. http://www.w3.org/TR/cooluris/#linking
-                       $params = array('script_name' => $script_name,
-                                                       'php_self' => $php_self,
-                                                       'return' => array());
-
-                       plugin_hook_by_reference('alt_representations', 
$params);
+                       $p2 = array('script_name' => $script_name,
+                                               'php_self' => $php_self,
+                                               'return' => array());
+                       
+                       plugin_hook_by_reference('alt_representations', $p2);
 
-                       $vars['alt_representations'] = $params['return'];
+                       $vars['alt_representations'] = $p2['return'];
                }
                
                print $template->render($vars);
@@ -270,11 +270,14 @@ class Theme extends Layout {
                print $template->render($vars);
        }
        function bodyHeader($params){
-               // TODO: tabs, navigation menu
+               global $use_tooltips;
+
                $template = $this->twig->loadTemplate('bodyHeader.html');
 
                $vars = array();
                
+               $vars['use_tooltips'] = $use_tooltips;
+
                if (isset($params['h1'])) {
                        $vars['h1'] = $params['h1'];
                } elseif (isset($params['title'])) {
@@ -309,7 +312,11 @@ class Theme extends Layout {
 
                $vars['session_loggedin'] = session_loggedin();
 
-               $groups = session_get_user()->getGroups();
+               if (session_loggedin()) {
+                       $groups = session_get_user()->getGroups();
+               } else {
+                       $groups = array();
+               }
                sortProjectList($groups);
                
                $naventries = array();
@@ -334,6 +341,43 @@ class Theme extends Layout {
 
                $vars['naventries'] = $naventries;
 
+
+               $outertabsdata = array();
+               $menu = $this->navigation->getSiteMenu();
+               for ($i = 0; $i < count($menu); $i++) {
+                       $d = array('href' => $menu['urls'][$i],
+                                          'id' => md5($menu['urls'][$i]),
+                                          'title' => $menu['titles'][$i],
+                                          'tooltip' => $menu['tooltips'][$i]);
+                       if ($i == $menu['selected']) {
+                               $d['selected'] = true;
+                       } else {
+                               $d['selected'] = false;
+                       }
+                       $outertabsdata[] = $d;
+               }
+               $vars['outertabsdata'] = $outertabsdata;
+
+
+
+               $projecttabsdata = array();
+               if (isset($params['group']) && $params['group']) {
+                       $menu = 
$this->navigation->getProjectMenu($params['group'], $params['toptab']);
+                       for ($i = 0; $i < count($menu); $i++) {
+                               $d = array('href' => $menu['urls'][$i],
+                                                  'id' => 
md5($menu['urls'][$i]),
+                                                  'title' => 
$menu['titles'][$i],
+                                                  'tooltip' => 
$menu['tooltips'][$i]);
+                               if ($i == $menu['selected']) {
+                                       $d['selected'] = true;
+                               } else {
+                                       $d['selected'] = false;
+                               }
+                               $projecttabsdata[] = $d;
+                       }
+               }
+               $vars['projecttabsdata'] = $projecttabsdata;
+
                $vars['error_msg'] = $GLOBALS['error_msg'];
                $vars['warning_msg'] = $GLOBALS['warning_msg'];
                $vars['feedback'] = $GLOBALS['feedback'];
diff --git a/src/www/themes/funky-twig/templates/bodyHeader.html 
b/src/www/themes/funky-twig/templates/bodyHeader.html
index 28f55f8..3c1aeae 100644
--- a/src/www/themes/funky-twig/templates/bodyHeader.html
+++ b/src/www/themes/funky-twig/templates/bodyHeader.html
@@ -25,10 +25,17 @@
 
 {% endif %}      
 
-{% include 'ListTableBottom.html' only %}
+      {% include 'ListTableBottom.html' only %}
 
-      <!-- TODO: Add outertabs and innertabs (projecttabs) -->
+{% include 'Tabs.html' with { 'use_tooltips': use_tooltips, 'tabs': 
outertabsdata, 'total_width': '100%' } only %}
 
+      {% if projecttabsdata|length > 0 %}
+      <div class="innertabs">
+      {% include 'Tabs.html' with { 'use_tooltips': use_tooltips, 'tabs': 
projecttabsdata, 'total_width': '100%', 'nested': true } only %}
+      </div>
+      {% endif %}
+
+      
     <div id="maindiv">
 
       {% include 'errorMessage.html' %}
diff --git a/src/www/themes/funky-twig/templates/headerStart.html 
b/src/www/themes/funky-twig/templates/headerStart.html
index 58b3f37..602bbf2 100644
--- a/src/www/themes/funky-twig/templates/headerStart.html
+++ b/src/www/themes/funky-twig/templates/headerStart.html
@@ -25,7 +25,7 @@
     {% endfor %}
 
     {% for s in stylesheets %}
-    <link type="text/css" href="{{ s.url }}" {% if m %} media="{{ s.media }}" 
{% endif %} />
+    <link rel="stylesheet" type="text/css" href="{{ s.url }}" {% if m %} 
media="{{ s.media }}" {% endif %} />
     {% endfor %}
 
     <meta name="Forge-Identification" content="{{ software_name }}:{{ 
software_version }}" />
diff --git a/tests/func/Testing/SeleniumForge.php 
b/tests/func/Testing/SeleniumForge.php
index 0cbd925..08c5843 100644
--- a/tests/func/Testing/SeleniumForge.php
+++ b/tests/func/Testing/SeleniumForge.php
@@ -169,6 +169,8 @@ class FForge_SeleniumTestCase extends 
PHPUnit_Extensions_SeleniumTestCase
        }
 
        protected function init() {
+               $this->switchUser (FORGE_ADMIN_USERNAME) ;
+               $this->changeTheme("Funky Twig");
                $this->createAndGoto('ProjectA');
        }
 


hooks/post-receive
-- 
FusionForge

_______________________________________________
Fusionforge-commits mailing list
[email protected]
http://lists.fusionforge.org/cgi-bin/mailman/listinfo/fusionforge-commits

Reply via email to