[Rt-commit] rt branch, 5.0/add-self-service-article-components2, created. rt-5.0.0-137-ga6ac433090

Jim Brandt jbrandt at bestpractical.com
Fri Dec 11 09:57:27 EST 2020


The branch, 5.0/add-self-service-article-components2 has been created
        at  a6ac4330900c59c26e2016bd9bcaa9a4ce1bb752 (commit)

- Log -----------------------------------------------------------------
commit d4ca219dbe3776c7f3ae148b2873f982e532d687
Author: Jim Brandt <jbrandt at bestpractical.com>
Date:   Thu Dec 10 11:05:16 2020 -0500

    Add Top and Newest Articles portlets for self service

diff --git a/share/html/Elements/SelfServiceNewestArticles b/share/html/Elements/SelfServiceNewestArticles
new file mode 100644
index 0000000000..3237f398e4
--- /dev/null
+++ b/share/html/Elements/SelfServiceNewestArticles
@@ -0,0 +1,48 @@
+%# BEGIN BPS TAGGED BLOCK {{{
+%#
+%# COPYRIGHT:
+%#
+%# This software is Copyright (c) 1996-2020 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 }}}
+<& /Elements/SelfServiceShowArticles &>
diff --git a/share/html/Elements/SelfServiceShowArticles b/share/html/Elements/SelfServiceShowArticles
new file mode 100644
index 0000000000..c3cd059bb1
--- /dev/null
+++ b/share/html/Elements/SelfServiceShowArticles
@@ -0,0 +1,75 @@
+%# BEGIN BPS TAGGED BLOCK {{{
+%#
+%# COPYRIGHT:
+%#
+%# This software is Copyright (c) 1996-2020 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 }}}
+<&| /Widgets/TitleBox, title => $title, class => 'article-listing', content_class => 'mx-auto' &>
+<div class="container article-listing-container">
+<dl class="row">
+% while (my $article = $articles->Next) {
+  <dt class="col-md-5">
+    <a href="<% RT->Config->Get('WebPath') %>/SelfService/Article/Display.html?id=<%$article->Id%>"><%$article->Name || loc('(no name)')%></a>
+  </dt>
+  <dd class="col-md-7">
+    <% $article->Summary %>
+  </dd>
+% }
+</dl>
+</div>
+</&>
+<%INIT>
+
+my $articles = RT::Articles->new($session{'CurrentUser'});
+$articles->UnLimit;
+$articles->OrderBy(FIELD => $orderby_field, ORDER => $sortorder);
+$articles->RowsPerPage($rows);
+
+</%INIT>
+<%ARGS>
+$orderby_field => 'LastUpdated'
+$sortorder     => 'Desc'
+$rows          => 5
+$title         => loc("[_1] Newest Articles", $rows)
+</%ARGS>
diff --git a/share/html/Elements/SelfServiceTopArticles b/share/html/Elements/SelfServiceTopArticles
new file mode 100644
index 0000000000..1e152df8f6
--- /dev/null
+++ b/share/html/Elements/SelfServiceTopArticles
@@ -0,0 +1,48 @@
+%# BEGIN BPS TAGGED BLOCK {{{
+%#
+%# COPYRIGHT:
+%#
+%# This software is Copyright (c) 1996-2020 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 }}}
+<& /Elements/SelfServiceShowArticles, orderby_field => 'SortOrder', sortorder => 'Desc', title => loc('[_1] Top Articles', 10), rows => 10 &>
diff --git a/share/static/css/elevator-light/articles.css b/share/static/css/elevator-light/articles.css
index 7e4a0f8a3f..c2d25e3c37 100644
--- a/share/static/css/elevator-light/articles.css
+++ b/share/static/css/elevator-light/articles.css
@@ -21,3 +21,8 @@
 #comp-Articles .form-row.article-summary {
     border-bottom: 1px solid #dee2e6;
 }
+
+/* Possibly remove or adjust if titlebox is updated */
+.article-listing-container {
+    margin-top: 10px;
+}
diff --git a/share/static/css/elevator-light/base.css b/share/static/css/elevator-light/base.css
index dd86c5cd38..5938f2977b 100644
--- a/share/static/css/elevator-light/base.css
+++ b/share/static/css/elevator-light/base.css
@@ -5,3 +5,12 @@ a {
 a:visited {
     color: #666
 }
+
+dl {
+    font-size: 1.05rem;
+    margin-block-end: 0;
+}
+
+dd {
+    margin-bottom: .6rem;
+}

commit 118f9b55b1f0ebabb9cb72599e4123a4a816b4c3
Author: Dianne Skoll <dianne at bestpractical.com>
Date:   Thu Dec 10 11:06:40 2020 -0500

    Clear user portlets as defaults for self service dashboard
    
    The components added in 47c40241e3 can't be used by most
    self service users because they require the rights and
    access of a privileged user.

diff --git a/etc/RT_Config.pm.in b/etc/RT_Config.pm.in
index 2539240f4d..fbe942e1d9 100644
--- a/etc/RT_Config.pm.in
+++ b/etc/RT_Config.pm.in
@@ -2970,7 +2970,6 @@ If this is not set at all, then $HomepageComponents is used instead.
 Set(
     $SelfServicePageComponents,
     [
-        qw(QuickCreate QueueList MyAdminQueues MySupportQueues MyReminders RefreshHomepage Dashboards SavedSearches FindUser MyAssets FindAsset FindGroup) # loc_qw
     ]
 );
 

commit a6ac4330900c59c26e2016bd9bcaa9a4ce1bb752
Author: Dianne Skoll <dianne at bestpractical.com>
Date:   Thu Dec 10 11:09:11 2020 -0500

    Add new article portlets to the available self service components

diff --git a/etc/RT_Config.pm.in b/etc/RT_Config.pm.in
index fbe942e1d9..2fc459c4dd 100644
--- a/etc/RT_Config.pm.in
+++ b/etc/RT_Config.pm.in
@@ -2969,8 +2969,7 @@ If this is not set at all, then $HomepageComponents is used instead.
 
 Set(
     $SelfServicePageComponents,
-    [
-    ]
+    [qw(SelfServiceTopArticles SelfServiceNewestArticles)]
 );
 
 =back

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


More information about the rt-commit mailing list