[Rt-commit] rt branch, 4.2/selfservice-topics, created. rt-4.2.10-222-gdfe7246

Alex Vandiver alexmv at bestpractical.com
Mon Mar 23 19:14:31 EDT 2015


The branch, 4.2/selfservice-topics has been created
        at  dfe7246d675a88985f8fae6e1d78f9694492ade0 (commit)

- Log -----------------------------------------------------------------
commit ca5b406c315074d0a4391c000a2f403cd0d738fb
Author: Kevin Falcone <falcone at bestpractical.com>
Date:   Tue Jan 27 14:57:32 2015 -0500

    Expose Article's Topics.html to SelfService
    
    Topics.html is pretty simple, so as long as permissions are set (needs
    SeeClass and ShowArticle) it will render just fine for an
    Unprivileged user.  As such, shim it into /SelfService/.
    
    Unfortunately, only one of the links in Topics.html was relative, but if
    you make the rest relative, it'll work great in the Privileged view
    *and* SelfService without copying anything.  It does mean Topics.html
    lives in /SelfService/ rather than /SelfService/Article/ but I think
    that's ok, especially given the /Articles/Article/ hierarchy found
    through the Privileged view.

diff --git a/share/html/Articles/Topics.html b/share/html/Articles/Topics.html
index 47bb23a..39c8a93 100644
--- a/share/html/Articles/Topics.html
+++ b/share/html/Articles/Topics.html
@@ -59,7 +59,7 @@
 <br />
 <h1><&|/l&>Browse by topic</&></h1>
 % if (defined $class) {
-<h2><a href="<% RT->Config->Get('WebPath') %>/Articles/Topics.html?class=<% $currclass_id %>"><% $currclass_name %></a></h2>
+<h2><a href="Topics.html?class=<% $currclass_id %>"><% $currclass_name %></a></h2>
 %     my $rtopic = RT::Topic->new( $session{'CurrentUser'} );
 %     $rtopic->Load($id);
 %     unless ( $rtopic->Id()
@@ -86,9 +86,9 @@
 % } else {
 <ul>
 %     while (my $c = $Classes->Next) {
-<li><h2><a href="<% RT->Config->Get('WebPath') %>/Articles/Topics.html?class=<% $c->Id %>"><% $c->Name %></a></h2></li>
+<li><h2><a href="Topics.html?class=<% $c->Id %>"><% $c->Name %></a></h2></li>
 %     }
-<li><h2><a href="<% RT->Config->Get('WebPath') %>/Articles/Topics.html?class=0"><&|/l&>Global Topics</&></a></h2></li>
+<li><h2><a href="Topics.html?class=0"><&|/l&>Global Topics</&></a></h2></li>
 </ul>
 % }
 
diff --git a/share/html/SelfService/Topics.html b/share/html/SelfService/Topics.html
new file mode 100644
index 0000000..3009672
--- /dev/null
+++ b/share/html/SelfService/Topics.html
@@ -0,0 +1,48 @@
+%# BEGIN BPS TAGGED BLOCK {{{
+%#
+%# COPYRIGHT:
+%#
+%# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC
+%#                                          <sales at bestpractical.com>
+%#
+%# (Except where explicitly superseded by other copyright notices)
+%#
+%#
+%# LICENSE:
+%#
+%# This work is made available to you under the terms of Version 2 of
+%# the GNU General Public License. A copy of that license should have
+%# been provided with this software, but in any event can be snarfed
+%# from www.gnu.org.
+%#
+%# This work is distributed in the hope that it will be useful, but
+%# WITHOUT ANY WARRANTY; without even the implied warranty of
+%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+%# General Public License for more details.
+%#
+%# You should have received a copy of the GNU General Public License
+%# along with this program; if not, write to the Free Software
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html.
+%#
+%#
+%# CONTRIBUTION SUBMISSION POLICY:
+%#
+%# (The following paragraph is not intended to limit the rights granted
+%# to you to modify and distribute this software under the terms of
+%# the GNU General Public License and is only of importance to you if
+%# you choose to contribute your changes and enhancements to the
+%# community by submitting them to Best Practical Solutions, LLC.)
+%#
+%# By intentionally submitting any modifications, corrections or
+%# derivatives to this work, or any other work intended for use with
+%# Request Tracker, to Best Practical Solutions, LLC, you confirm that
+%# you are the copyright holder for those contributions and you grant
+%# Best Practical Solutions,  LLC a nonexclusive, worldwide, irrevocable,
+%# royalty-free, perpetual, license to use, copy, create derivative
+%# works based on those contributions, and sublicense and distribute
+%# those contributions and any derivatives thereof.
+%#
+%# END BPS TAGGED BLOCK }}}
+<& /Articles/Topics.html, %ARGS &>

commit 20585b1aa4043cc8206e9fefc86535b5ed7be22a
Author: Kevin Falcone <falcone at bestpractical.com>
Date:   Tue Jan 27 15:24:20 2015 -0500

    Provide a link to Topics.html in SelfService
    
    It makes sense to me to link to Search here also, since the other Search
    widget only shows up if you have ShowArticle granted globally, rather
    than if you have permission on a few Classes.

diff --git a/docs/customizing/articles_introduction.pod b/docs/customizing/articles_introduction.pod
index 363a385..c20d33d 100644
--- a/docs/customizing/articles_introduction.pod
+++ b/docs/customizing/articles_introduction.pod
@@ -150,6 +150,10 @@ will get a Search box at the top of their interface.  This allows users
 to look through your Articles for answers to questions before creating
 a Ticket.
 
+If you grant Unprivileged users ShowArticlesMenu, they will get a
+dropdown menu that links to your Topics hierarchy page and the ability
+to search articles from a link off of that menu.
+
 =head1 Configuration Options
 
 =head2 ArticleOnTicketCreate
diff --git a/share/html/Elements/Tabs b/share/html/Elements/Tabs
index c6c6505..8b8bc8b 100644
--- a/share/html/Elements/Tabs
+++ b/share/html/Elements/Tabs
@@ -987,6 +987,12 @@ my $build_selfservice_nav = sub {
         PageWidgets->child( 'goto-article' => raw_html => $m->scomp('/SelfService/Elements/SearchArticle') );
     }
 
+    if ($session{'CurrentUser'}->HasRight( Right => 'ShowArticlesMenu', Object => RT->System )) {
+        my $articles = Menu->child( articles => title => loc('Articles'), path => "/SelfService/Article/Search.html");
+        $articles->child( topics   => title => loc('Topics'),   path => "/SelfService/Topics.html" );
+        $articles->child( search   => title => loc('Search'),   path => "/SelfService/Article/Search.html" );
+    }
+
     PageWidgets->child( goto => raw_html => $m->scomp('/SelfService/Elements/GotoTicket') );
 
     $m->callback( CallbackName => 'SelfService', Path => $request_path );

commit dfe7246d675a88985f8fae6e1d78f9694492ade0
Author: Kevin Falcone <falcone at bestpractical.com>
Date:   Tue Jan 27 15:24:57 2015 -0500

    Clarify that it's a global ShowArticle

diff --git a/docs/customizing/articles_introduction.pod b/docs/customizing/articles_introduction.pod
index c20d33d..5d0131a 100644
--- a/docs/customizing/articles_introduction.pod
+++ b/docs/customizing/articles_introduction.pod
@@ -145,7 +145,7 @@ The Class needs to be set up and Applied for the dropdown to appear
 
 =head2 SelfService Interface
 
-If you grant the Unprivileged user group the right ShowArticle, they
+If you grant the Unprivileged user group the right ShowArticle globally, they
 will get a Search box at the top of their interface.  This allows users
 to look through your Articles for answers to questions before creating
 a Ticket.

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


More information about the rt-commit mailing list