[Bps-public-commit] RTx-RemoteLinks branch, master, updated. 0.01-2-g8b4393b

Thomas Sibley trs at bestpractical.com
Thu Apr 11 17:36:19 EDT 2013


The branch, master has been updated
       via  8b4393bd20139a8a7a0cfc58a593e3517e5a45f1 (commit)
       via  ff278a4cda784a95ba31b2ce0c4572e2f91e28d0 (commit)
      from  f8835f2dde65b3dcc0df35c2c6a4e4cbb2282b06 (commit)

Summary of changes:
 MANIFEST                                           |  1 +
 META.yml                                           |  3 ++-
 .../Elements/EditLinks/ExtraLinkInstructions       | 28 ++++++++++++++++++++++
 lib/RTx/RemoteLinks.pm                             |  2 +-
 4 files changed, 32 insertions(+), 2 deletions(-)
 create mode 100644 html/Callbacks/RTx-RemoteLinks/Elements/EditLinks/ExtraLinkInstructions

- Log -----------------------------------------------------------------
commit ff278a4cda784a95ba31b2ce0c4572e2f91e28d0
Author: Thomas Sibley <trs at bestpractical.com>
Date:   Thu Apr 11 14:34:53 2013 -0700

    Add discoverable doc in RT for which remotes are available

diff --git a/META.yml b/META.yml
index 9dc8435..15c44d4 100644
--- a/META.yml
+++ b/META.yml
@@ -16,6 +16,7 @@ meta-spec:
 name: RTx-RemoteLinks
 no_index:
   directory:
+    - html
     - inc
 resources:
   license: http://opensource.org/licenses/gpl-license.php
diff --git a/html/Callbacks/RTx-RemoteLinks/Elements/EditLinks/ExtraLinkInstructions b/html/Callbacks/RTx-RemoteLinks/Elements/EditLinks/ExtraLinkInstructions
new file mode 100644
index 0000000..29abbaf
--- /dev/null
+++ b/html/Callbacks/RTx-RemoteLinks/Elements/EditLinks/ExtraLinkInstructions
@@ -0,0 +1,28 @@
+<%init>
+my %remote = RT->Config->Get("RemoteLinks");
+return unless keys %remote;
+
+my $pretty_remote = sub {
+    my $alias  = shift or return;
+    my $remote = RTx::RemoteLinks->LookupRemote($alias)
+        or return;
+
+    my $uri = URI->new($remote)
+        or return $remote;
+
+    return $uri->can("host") ? $uri->host : $uri;
+};
+
+my @alias = keys %remote;
+</%init>
+<br />
+% if (@alias == 1) {
+<&|/l, $pretty_remote->($alias[0]), $alias[0] &>Enter links to remote RT tickets on [_1] as "[_2]:###", where ### is the ticket number.</&>
+% } else {
+<&|/l&>Enter links to remote RT tickets using the following forms:</&>
+<ul>
+%     foreach (@alias) {
+  <li><strong><% $_ %>:###</strong> for <% $pretty_remote->($_) %></li>
+%     }
+</ul>
+% }

commit 8b4393bd20139a8a7a0cfc58a593e3517e5a45f1
Author: Thomas Sibley <trs at bestpractical.com>
Date:   Thu Apr 11 14:35:22 2013 -0700

    Bump version

diff --git a/MANIFEST b/MANIFEST
index e51a2ad..43d9cdc 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -1,3 +1,4 @@
+html/Callbacks/RTx-RemoteLinks/Elements/EditLinks/ExtraLinkInstructions
 inc/Module/Install.pm
 inc/Module/Install/Base.pm
 inc/Module/Install/Can.pm
diff --git a/META.yml b/META.yml
index 15c44d4..212d78d 100644
--- a/META.yml
+++ b/META.yml
@@ -20,4 +20,4 @@ no_index:
     - inc
 resources:
   license: http://opensource.org/licenses/gpl-license.php
-version: 0.01
+version: 0.02
diff --git a/lib/RTx/RemoteLinks.pm b/lib/RTx/RemoteLinks.pm
index 29aee45..ee1d481 100644
--- a/lib/RTx/RemoteLinks.pm
+++ b/lib/RTx/RemoteLinks.pm
@@ -2,7 +2,7 @@ use strict;
 use warnings;
 package RTx::RemoteLinks;
 
-our $VERSION = '0.01';
+our $VERSION = '0.02';
 
 use List::Util 'first';
 

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



More information about the Bps-public-commit mailing list