airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ndo...@apache.org
Subject [1/2] airavata-php-gateway git commit: JIRA issue collector capability moved to portal level. Pga_config will need to be updated.
Date Tue, 03 Nov 2015 20:48:27 GMT
Repository: airavata-php-gateway
Updated Branches:
  refs/heads/master ff17e7afe -> 6aae243f3


JIRA issue collector capability moved to portal level.
Pga_config will need to be updated.


Project: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/commit/5e910ed5
Tree: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/tree/5e910ed5
Diff: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/diff/5e910ed5

Branch: refs/heads/master
Commit: 5e910ed5aa68c61a483f374c906375514a19ae29
Parents: ff17e7a
Author: Nipun Doshi <Nipun Doshi>
Authored: Tue Nov 3 15:17:09 2015 -0500
Committer: Nipun Doshi <Nipun Doshi>
Committed: Tue Nov 3 15:17:09 2015 -0500

----------------------------------------------------------------------
 app/config/pga_config.php.template       | 25 ++++++++++++++++++++++++-
 app/libraries/CommonUtilities.php        | 19 ++++++++++++++-----
 app/views/layout/fixed-scripts.blade.php | 15 ++++++++++-----
 3 files changed, 48 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/5e910ed5/app/config/pga_config.php.template
----------------------------------------------------------------------
diff --git a/app/config/pga_config.php.template b/app/config/pga_config.php.template
index b33173b..54ee652 100644
--- a/app/config/pga_config.php.template
+++ b/app/config/pga_config.php.template
@@ -200,6 +200,29 @@ return array(
         /**
          * SMTP server port on which the portal should connect
          */
-        'portal-smtp-server-port' => '587'
+        'portal-smtp-server-port' => '587',
+
+        /**
+         * Set JIRA Issue Collector scripts here.
+         */
+        'jira-help' => 
+        [
+            /**
+             * Report Issue Script issued for your app by Atlassian JIRA
+             */
+            'report-issue-script' => '',
+            /**
+             * Collector id at the end of the above script
+             */
+            'report-issue-collector-id' => '',
+            /**
+             * Create Report Script issued for your app by Atlassian JIRA
+             */
+            'request-feature-script' => '',
+            /**
+             * Collector id at the end of the above script
+             */
+            'request-feature-collector-id' => ''
+        ]
     ]
 );
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/5e910ed5/app/libraries/CommonUtilities.php
----------------------------------------------------------------------
diff --git a/app/libraries/CommonUtilities.php b/app/libraries/CommonUtilities.php
index edb45d9..f8f96fb 100644
--- a/app/libraries/CommonUtilities.php
+++ b/app/libraries/CommonUtilities.php
@@ -129,12 +129,21 @@ class CommonUtilities
 //                );
 //            }
 
-            $menus['Help'] = array
-            (
-                array('label' => 'Report Issue', 'url' => '#', "nav-active", ""),
-                array('label' => 'Request Feature', 'url' => '#', "nav-active", "")
+            $menus['Help'] = array();
+            if( Config::get('pga_config.portal')['jira-help']['report-issue-script'] != ''

+                && Config::get('pga_config.portal')['jira-help']['report-issue-collector-id']
!= '')
+            {
+                $menus['Help'][] = array('label' => 'Report Issue', 'url' => '#', "nav-active",
"");
+            }  
 //                array('label' => 'Forgot Password?', 'url' => URL::to('/') . '/forgot-password',
"nav-active" => "")
-            );
+            if( Config::get('pga_config.portal')['jira-help']['request-feature-script'] !=
'' 
+                && Config::get('pga_config.portal')['jira-help']['request-feature-collector-id']
!= '')
+            {
+                $menus['Help'][] = array('label' => 'Request Feature', 'url' => '#',
"nav-active", "");
+            }
+
+            if( count( $menus['Help'] ) == 0 )
+                unset( $menus['Help']);
         }
 
         echo '<nav class="navbar navbar-inverse navbar-static-top" role="navigation">

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/5e910ed5/app/views/layout/fixed-scripts.blade.php
----------------------------------------------------------------------
diff --git a/app/views/layout/fixed-scripts.blade.php b/app/views/layout/fixed-scripts.blade.php
index b245d97..e4963a3 100644
--- a/app/views/layout/fixed-scripts.blade.php
+++ b/app/views/layout/fixed-scripts.blade.php
@@ -3,17 +3,19 @@
 <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
 <script src="//netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js"></script>
 
+<!-- Jira Issue Collector - Request Feature -->
+
 <script type="text/javascript"
-        src="https://gateways.atlassian.net/s/31280375aecc888d5140f63e1dc78a93-T/en_USmlc07/6328/46/1.4.13/_/download/batch/com.atlassian.jira.collector.plugin.jira-issue-collector-plugin:issuecollector/com.atlassian.jira.collector.plugin.jira-issue-collector-plugin:issuecollector.js?locale=en-US&collectorId=b1572922"></script>
+        src="{{ Config::get('pga_config.portal')['jira-help']['report-issue-script'] }}"></script>
+
 
-<!-- Jira Issue Collector - Request Feature -->
 <script type="text/javascript"
-        src="https://gateways.atlassian.net/s/31280375aecc888d5140f63e1dc78a93-T/en_USmlc07/6328/46/1.4.13/_/download/batch/com.atlassian.jira.collector.plugin.jira-issue-collector-plugin:issuecollector/com.atlassian.jira.collector.plugin.jira-issue-collector-plugin:issuecollector.js?locale=en-US&collectorId=674243b0"></script>
+        src="{{ Config::get('pga_config.portal')['jira-help']['request-feature-script'] }}"></script>
 
 
 <script type="text/javascript">
     window.ATL_JQ_PAGE_PROPS = $.extend(window.ATL_JQ_PAGE_PROPS, {
-        "b1572922": {
+        "{{ Config::get('pga_config.portal')['jira-help']['report-issue-collector-id'] }}":
{
             "triggerFunction": function (showCollectorDialog) {
                 //Requries that jQuery is available!
                 jQuery("#report-issue").click(function (e) {
@@ -25,7 +27,7 @@
                 fullname : fullName !== 'undefined' ? fullName : ""
             }
         },
-        "674243b0": {
+        "{{ Config::get('pga_config.portal')['jira-help']['request-feature-collector-id']
}}": {
             "triggerFunction": function (showCollectorDialog) {
                 //Requries that jQuery is available!
                 jQuery("#request-feature").click(function (e) {
@@ -38,6 +40,9 @@
             }
         }
     });
+</script>
+
+<script type="text/javascript">
 
     var highest = null;
     $(".nav-tabs a").each(function () {  //find the height of your highest link


Mime
View raw message