Bug 11317: (follow-up) Add two-level entry to koha-conf and remove unwanted characters
authorRoch D'Amour <roch.damour@inlibro.com>
Mon, 23 Apr 2018 13:20:35 +0000 (09:20 -0400)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Thu, 3 May 2018 16:26:50 +0000 (13:26 -0300)
- Removed merge marker
- Changed include path in favor of using the Asset tt plugin (bug 20538)
- Changed access_dir to a two-level entry for clarity

Test plans stay the same, just make sure that the two-level configuration entry
work properly and everything pass QA.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

debian/templates/koha-conf-site.xml.in
etc/koha-conf.xml
koha-tmpl/intranet-tmpl/prog/en/modules/reports/reports-home.tt
koha-tmpl/intranet-tmpl/prog/en/modules/tools/access_files.tt
tools/access_files.pl

index 3c2aa46..0a4f02e 100644 (file)
@@ -297,7 +297,12 @@ __END_SRU_PUBLICSERVER__
  <api_secret_passphrase>__API_SECRET__</api_secret_passphrase>
 
  <!-- Accessible directory from the staff client, uncomment the following line and define a valid path to let the intranet user access it-->
- <!-- <access_dir></access_dir> -->
+ <!--
+ <access_dirs>
+     <access_dir></access_dir>
+     <access_dir></access_dir>
+ </access_dirs>
+ -->
 
  <!-- true type font mapping according to type from $font_types in C4/Creators/Lib.pm -->
  <ttf>
index 37b304c..1b50f77 100644 (file)
@@ -128,7 +128,12 @@ __PAZPAR2_TOGGLE_XML_POST__
  <api_secret_passphrase>CHANGEME</api_secret_passphrase>
 
  <!-- Accessible directory from the staff client, uncomment the following line and define a valid path to let the intranet user access it-->
- <!-- <access_dir></access_dir> -->
+ <!--
+ <access_dirs>
+     <access_dir></access_dir>
+     <access_dir></access_dir>
+ </access_dirs>
+ -->
 
  <!-- true type font mapping accoding to type from $font_types in C4/Creators/Lib.pm -->
  <ttf>
index 86d58ba..ea1d67b 100644 (file)
@@ -63,7 +63,6 @@
 
     </div>
 
-<<<<<<< 3dd4c261c3d9d152edb12ead6b10b71b44418eab
     <div class="col-xs-6"><h2>Top lists</h2>
         <ul>
             <li><a href="/cgi-bin/koha/reports/bor_issues_top.pl">Patrons with the most checkouts</a></li>
index 34e4922..3165098 100644 (file)
@@ -1,8 +1,9 @@
+[% USE Asset %]
 [% SET footerjs = 1 %]
 [% INCLUDE 'doc-head-open.inc' %]
 <title>Report/log files</title>
 [% INCLUDE 'doc-head-close.inc' %]
-<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables_[% KOHA_VERSION %].css" />
+[% Asset.css("css/datatables.css") %]
 </head>
 <body>
 [% INCLUDE 'header.inc' %]
@@ -52,7 +53,7 @@
 </div>
 
 [% MACRO jsinclude BLOCK %]
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/tools-menu_[% KOHA_VERSION %].js"></script>
+    [% Asset.js("js/tools-menu.js") %]
     [% INCLUDE 'datatables.inc' %]
     <script type="text/javascript">
     //<![CDATA[
index 4f58123..4175017 100755 (executable)
@@ -34,8 +34,19 @@ use Encode;
 
 my $input = new CGI;
 my $file_id = $input->param("id");
-my $access_dir = C4::Context->config('access_dir');
-my @directories = $access_dir ? (ref $access_dir ? @{$access_dir} : ($access_dir)) : ();
+my $access_dirs = C4::Context->config('access_dirs');
+
+my @directories;
+
+if ($access_dirs){
+    if (ref $access_dirs->{access_dir} ){
+        @directories = @{$access_dirs->{access_dir}};
+    } else {
+        @directories =($access_dirs->{access_dir});
+    }
+} else {
+    @directories = ();
+}
 
 my ($template, $borrowernumber, $cookie)
     = get_template_and_user({template_name => "tools/access_files.tt",