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  18c52f355861fb8fca9d373de3ec3177a6e98277 (commit)
      from  2d30a79f3e17d8caa8ac9f56eca1a6d803d1d84d (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=18c52f355861fb8fca9d373de3ec3177a6e98277

commit 18c52f355861fb8fca9d373de3ec3177a6e98277
Author: Franck Villaume <franck.villa...@trivialdev.com>
Date:   Fri Sep 16 18:39:39 2016 +0200

    use tabs to display SCM access methods

diff --git a/src/plugins/scmgit/common/GitPlugin.class.php 
b/src/plugins/scmgit/common/GitPlugin.class.php
index be8bee7..5a6bca6 100644
--- a/src/plugins/scmgit/common/GitPlugin.class.php
+++ b/src/plugins/scmgit/common/GitPlugin.class.php
@@ -167,29 +167,40 @@ control over it to the project's administrator.");
 
                $b = '';
                $b .= html_e('h2', array(), _('Developer Access'));
+               $b .= html_e('p', array(),
+                               ngettext('Only project developers can access 
the Git repository via this method.',
+                               'Only project developers can access the Git 
repositories via this method.',
+                               count($repo_list)));
+               $b .= '<div id="tabber">';
+               $b .= '<ul>';
+               if (forge_get_config('use_ssh', 'scmgit')) {
+                       $b .= '<li><a href="#tabber-ssh">'._('via 
SSH').'</a></li>';
+                       $configuration = 1;
+               }
+               if (forge_get_config('use_smarthttp', 'scmgit')) {
+                       $b .= '<li><a href="#tabber-smarthttp">'._('via "smart 
HTTP"').'</a></li>';
+                       $configuration = 1;
+               }
+               $b .= '</ul>';
+               if (!isset($configuration)) {
+                       return $HTML->error_msg(_('Error')._(': ')._('No access 
protocol has been allowed for the Git plugin in scmgit.ini: use_ssh and 
use_smarthttp are disabled'));
+               }
                if (session_loggedin()) {
                        $u = user_get_object(user_getid());
                        $d = $u->getUnixName();
                        if (forge_get_config('use_ssh', 'scmgit')) {
-                               $b .= html_e('h3', array(), _('via SSH'));
-                               $b .= html_e('p', array(),
-                                       ngettext('Only project developers can 
access the Git repository via this method.',
-                                               'Only project developers can 
access the Git repositories via this method.',
-                                               count($repo_list)).
-                                       ' '. _('SSH must be installed on your 
client machine.'));
+                               $b .= '<div id="tabber-ssh" class="tabbertab" 
>';
+                               $b .= html_e('p', array(), _('SSH must be 
installed on your client machine.'));
                                $htmlRepo = '';
                                foreach ($repo_list as $repo_name) {
                                                $htmlRepo .= html_e('tt', 
array(), 'git clone git+ssh://'.$d.'@' . forge_get_config('scm_host') . 
forge_get_config('repos_path', 'scmgit') .'/'. $project->getUnixName() .'/'. 
$repo_name .'.git').html_e('br');
                                }
                                $b .= html_e('p', array(), $htmlRepo);
+                               $b .= '</div>';
                        }
                        if (forge_get_config('use_smarthttp', 'scmgit')) {
-                               $b .= html_e('h3', array(), _('via "smart 
HTTP"'));
-                               $b .= html_e('p', array(),
-                                       ngettext('Only project developers can 
access the Git repository via this method.',
-                                               'Only project developers can 
access the Git repositories via this method.',
-                                               count($repo_list)).
-                                       ' '. _('Enter your site password when 
prompted.'));
+                               $b .= '<div id="tabber-smarthttp" 
class="tabbertab" >';
+                               $b .= html_e('p', array(), _('Enter your site 
password when prompted.'));
                                $htmlRepo = '';
 
                                $protocol = forge_get_config('use_ssl', 
'scmgit') ? 'https' : 'http';
@@ -197,10 +208,11 @@ control over it to the project's administrator.");
                                        $htmlRepo .= '<tt>git clone 
'.$protocol.'://'.$d.'@' . 
forge_get_config('scm_host').'/authscm/'.$d.'/git/'.$project->getUnixName() 
.'/'. $repo_name .'.git</tt><br />';
                                }
                                $b .= html_e('p', array(), $htmlRepo);
+                               $b .= '</div>';
                        }
                } else {
                        if (forge_get_config('use_ssh', 'scmgit')) {
-                               $b .= html_e('h3', array(), _('via SSH'));
+                               $b .= '<div id="tabber-ssh" class="tabbertab" 
>';
                                $b .= html_e('p', array(),
                                        ngettext('Only project developers can 
access the Git repository via this method.',
                                                'Only project developers can 
access the Git repositories via this method.',
@@ -212,10 +224,11 @@ control over it to the project's administrator.");
                                        $htmlRepo .= html_e('tt', array(), 'git 
clone git+ssh://'.html_e('i', array(), _('developername'), true, false).'@' . 
forge_get_config('scm_host') . forge_get_config('repos_path', 'scmgit') .'/'. 
$project->getUnixName() .'/'. $repo_name .'.git').html_e('br');
                                }
                                $b .= html_e('p', array(), $htmlRepo);
+                               $b .= '</div>';
                        }
                        if (forge_get_config('use_smarthttp', 'scmgit')) {
                                $protocol = forge_get_config('use_ssl', 
'scmgit')? 'https' : 'http';
-                               $b .= html_e('h3', array(), _('via "smart 
HTTP"'));
+                               $b .= '<div id="tabber-smarthttp" 
class="tabbertab" >';
                                $b .= html_e('p', array(),
                                        ngettext('Only project developers can 
access the Git repository via this method.',
                                                'Only project developers can 
access the Git repositories via this method.',
@@ -226,12 +239,15 @@ control over it to the project's administrator.");
                                        $b .= '<tt>git clone 
'.$protocol.'://<i>'._('developername').'</i>@' . 
forge_get_config('scm_host').'/authscm/<i>'._('developername').'</i>/git/'.$project->getUnixName()
 .'/'. $repo_name .'.git</tt><br />';
                                }
                                $b .= html_e('p', array(), $htmlRepo);
+                               $b .= '</div>';
                        }
                }
-               if ($b == '') {
-                       $b .= $HTML->error_msg(_('Error')._(': ')._('No access 
protocol has been allowed for the Git plugin in scmgit.ini: use_ssh and 
use_smarthttp are disabled'));
-               }
-
+               $b .= '</div>';
+               $b .= '<script type="text/javascript">//<![CDATA[
+                       jQuery(document).ready(function() {
+                               jQuery("#tabber").tabs();
+                       });
+                       //]]></script>';
                if (session_loggedin()) {
                        $u = user_get_object(user_getid());
                        if ($u->getUnixStatus() == 'A') {
diff --git a/src/plugins/scmsvn/common/SVNPlugin.class.php 
b/src/plugins/scmsvn/common/SVNPlugin.class.php
index 7a34907..e718661 100644
--- a/src/plugins/scmsvn/common/SVNPlugin.class.php
+++ b/src/plugins/scmsvn/common/SVNPlugin.class.php
@@ -130,42 +130,43 @@ some control over it to the project's administrator.");
                $b = '';
 
                $module = $this->topModule($project);
-
+               $b .= sprintf(_('Only project developers can access the %s tree 
via this method.'), 'Subversion');
+               $b .= '<div id="tabber">';
+               $b .= '<ul>';
+               if (forge_get_config('use_ssh', 'scmsvn')) {
+                       $b .= '<li><a href="#tabber-ssh">'._('via 
SSH').'</a></li>';
+                       $configuration = 1;
+               }
+               if (forge_get_config('use_dav', 'scmsvn')) {
+                       $b .= '<li><a href="#tabber-dav">'._('via 
DAV').'</a></li>';
+                       $configuration = 1;
+               }
+               $b .= '</ul>';
                if (session_loggedin()) {
                        $u = user_get_object(user_getid());
                        $d = $u->getUnixName() ;
                        if (forge_get_config('use_ssh', 'scmsvn')) {
-                               $b .= '<h2>';
-                               $b .= sprintf(_('Developer %s Access via SSH'), 
'Subversion');
-                               $b .= '</h2>';
+                               $b .= '<div id="tabber-ssh" class="tabbertab" 
>';
                                $b .= '<p>';
-                               $b .= sprintf(_('Only project developers can 
access the %s tree via this method.'), 'Subversion');
-                               $b .= ' ';
                                $b .= _('SSH must be installed on your client 
machine.');
                                $b .= ' ';
                                $b .= _('Enter your site password when 
prompted.');
                                $b .= '</p>';
                                $b .= '<p><tt>svn checkout svn+ssh://'.$d.'@' . 
forge_get_config('scm_host') . $this->svn_root_fs .'/'. 
$project->getUnixName().$module.'</tt></p>' ;
+                               $b .= '</div>';
                        }
                        if (forge_get_config('use_dav', 'scmsvn')) {
-                               $b .= '<h2>';
-                               $b .= _('Developer Subversion Access via DAV');
-                               $b .= '</h2>';
+                               $b .= '<div id="tabber-dav" class="tabbertab" 
>';
                                $b .= '<p>';
-                               $b .= sprintf(_('Only project developers can 
access the %s tree via this method.'), 'Subversion');
-                               $b .= ' ';
                                $b .= _('Enter your site password when 
prompted.');
                                $b .= '</p>';
                                $b .= '<p><tt>svn checkout --username '.$d.' 
http'.((forge_get_config('use_ssl', 'scmsvn')) ? 's' : '').'://'. 
forge_get_config('scm_host'). 
'/authscm/'.$d.'/svn/'.$project->getUnixName().$module.'</tt></p>' ;
+                               $b .= '</div>';
                        }
                } else {
                        if (forge_get_config('use_ssh', 'scmsvn')) {
-                               $b .= '<h2>';
-                               $b .= sprintf(_('Developer %s Access via SSH'), 
'Subversion');
-                               $b .= '</h2>';
+                               $b .= '<div id="tabber-ssh" class="tabbertab" 
>';
                                $b .= '<p>';
-                               $b .= sprintf(_('Only project developers can 
access the %s tree via this method.'), 'Subversion');
-                               $b .= ' ';
                                $b .= _('SSH must be installed on your client 
machine.');
                                $b .= ' ';
                                $b .= _('Substitute <em>developername</em> with 
the proper value.');
@@ -173,21 +174,25 @@ some control over it to the project's administrator.");
                                $b .= _('Enter your site password when 
prompted.');
                                $b .= '</p>';
                                $b .= '<p><tt>svn checkout 
svn+ssh://<i>'._('developername').'</i>@' . forge_get_config('scm_host') . 
$this->svn_root_fs .'/'. $project->getUnixName().$module.'</tt></p>' ;
+                               $b .= '</div>';
                        }
                        if (forge_get_config('use_dav', 'scmsvn')) {
-                               $b .= '<h2>';
-                               $b .= _('Developer Subversion Access via DAV');
-                               $b .= '</h2>';
+                               $b .= '<div id="tabber-dav" class="tabbertab" 
>';
                                $b .= '<p>';
-                               $b .= sprintf(_('Only project developers can 
access the %s tree via this method.'), 'Subversion');
-                               $b .= ' ';
                                $b .= _('Substitute <em>developername</em> with 
the proper value.');
                                $b .= ' ';
                                $b .= _('Enter your site password when 
prompted.');
                                $b .= '</p>';
                                $b .= '<p><tt>svn checkout --username 
<i>'._('developername').'</i> http'.((forge_get_config('use_ssl', 'scmsvn')) ? 
's' : '').'://'. forge_get_config('scm_host'). 
'/authscm/<i>'._('developername').'</i>/svn/'.$project->getUnixName().$module.'</tt></p>'
 ;
+                               $b .= '</div>';
                        }
                }
+               $b .= '</div>';
+               $b .= '<script type="text/javascript">//<![CDATA[
+                       jQuery(document).ready(function() {
+                               jQuery("#tabber").tabs();
+                       });
+                       //]]></script>';
                return $b;
        }
 

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

Summary of changes:
 src/plugins/scmgit/common/GitPlugin.class.php | 52 +++++++++++++++++----------
 src/plugins/scmsvn/common/SVNPlugin.class.php | 47 +++++++++++++-----------
 2 files changed, 60 insertions(+), 39 deletions(-)


hooks/post-receive
-- 
FusionForge

_______________________________________________
Fusionforge-commits mailing list
Fusionforge-commits@lists.fusionforge.org
http://lists.fusionforge.org/cgi-bin/mailman/listinfo/fusionforge-commits

Reply via email to