Bug 21526: Use the 'url' filter when needed
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / admin / branches.tt
index d8c5b5c..4c23852 100644 (file)
@@ -1,18 +1,16 @@
+[% USE raw %]
+[% USE Asset %]
 [% SET footerjs = 1 %]
 [% INCLUDE 'doc-head-open.inc' %]
-<title>Koha &rsaquo; Administration &rsaquo; Libraries and groups
-[% IF op == 'editcategory' %]
-    &rsaquo; [% IF category.categorycode %] Edit group [% category.categorycode%] [% ELSE %] New group [% END %]
-[% ELSIF op == 'delete_confirm_category' %]
-    &rsaquo; Confirm deletion of group [% category.categorycode %]
-[% ELSIF op == 'add_form' %]
-    &rsaquo; [% IF library %] Modify library [% library.branchcode | html %] [% ELSE %] New library [% END %]
+<title>Koha &rsaquo; Administration &rsaquo; Libraries
+[% IF op == 'add_form' %]
+    &rsaquo;[% IF library %]Modify library[% ELSE %]New library [% library.branchcode | html %][% END %]
 [% ELSIF op == 'delete_confirm' %]
     &rsaquo; Confirm deletion of library '[% library.branchcode | html %]'
 [% END %]
 </title>
 [% INCLUDE 'doc-head-close.inc' %]
-<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" />
+[% Asset.css("css/datatables.css") | $raw %]
 </head>
 
 <body id="admin_branches" class="admin">
 <div id="breadcrumbs">
     <a href="/cgi-bin/koha/mainpage.pl">Home</a>
 &rsaquo; <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a>
-&rsaquo; <a href="/cgi-bin/koha/admin/branches.pl">Libraries and groups</a>
-[% IF op == 'add_form_category' %]
-&rsaquo; [% IF category.categorycode %] Edit group [% category.categorycode %] [% ELSE %] New group [% END %]
-[% ELSIF op == 'delete_confirm_category' %]
-&rsaquo; Confirm deletion of group [% category.categorycode %]
-[% ELSIF op == 'add_form'  %]
-&rsaquo; [% IF library %] Modify library [% library.branchcode | html %] [% ELSE %] New library [% END %]
+&rsaquo; <a href="/cgi-bin/koha/admin/branches.pl">Libraries</a>
+[% IF op == 'add_form'  %]
+&rsaquo; [% IF library %]Modify library[% ELSE %]New library [% library.branchcode | html %][% END %]
 [% ELSIF op == 'delete_confirm' %]
 &rsaquo; Confirm deletion of library '[% library.branchcode | html %]'
 [% END %]
 </div>
 
-<div id="doc3" class="yui-t2">
-
-   <div id="bd">
-    <div id="yui-main">
-    <div class="yui-b">
+<div class="main container-fluid">
+    <div class="row">
+        <div class="col-sm-10 col-sm-push-2">
+            <main>
 
 [% FOREACH m IN messages %]
-    <div class="dialog [% m.type %]">
+    <div class="dialog [% m.type | html %]">
         [% SWITCH m.code %]
         [% CASE 'error_on_update' %]
             An error occurred when updating this library. Perhaps it already exists.
         [% CASE 'cannot_delete_library' %]
             This library cannot be deleted. Patrons or items are still using it
             [% IF m.data.patrons_count and m.data.items_count %]
-                ([% m.data.patrons_count %] patrons and [% m.data.items_count %] items).
+                ([% m.data.patrons_count | html %] patrons and [% m.data.items_count | html %] items).
             [% ELSIF m.data.patrons_count %]
-                ([% m.data.patrons_count %] patrons).
+                ([% m.data.patrons_count | html %] patrons).
             [% ELSIF m.data.items_count %]
-                ([% m.data.items_count %] items).
+                ([% m.data.items_count | html %] items).
             [% END %]
         [% CASE 'error_on_update_category' %]
             An error occurred when updating this library category. Perhaps it already exists.
@@ -77,9 +70,9 @@
         [% CASE 'success_on_delete_category' %]
             Library category deleted successfully.
         [% CASE 'cannot_delete_category' %]
-            This library category cannot be deleted. [% m.data.libraries_count %] libraries are still using it.
+            This library category cannot be deleted. [% m.data.libraries_count | html %] libraries are still using it.
         [% CASE %]
-            [% m.code %]
+            [% m.code | html %]
         [% END %]
     </div>
 [% END %]
@@ -87,7 +80,6 @@
 [% IF op == 'list' %]
     <div id="toolbar" class="btn-toolbar">
         <a class="btn btn-default btn-sm" id="newbranch" href="/cgi-bin/koha/admin/branches.pl?op=add_form"><i class="fa fa-plus"></i> New library</a>
-        <a class="btn btn-default btn-sm" id="newcategory" href="/cgi-bin/koha/admin/branches.pl?op=add_form_category"><i class="fa fa-plus"></i> New group</a>
     </div>
 [% END %]
 
                 <li>
                     [% IF library %]
                         <span class="label">Library code: </span>
-                        <input type="hidden" name="branchcode" value="[% library.branchcode |html %]" />
+                        <input type="hidden" name="branchcode" value="[% library.branchcode | html %]" />
                         [% library.branchcode | html %]
                     [% ELSE %]
                         <label for="branchcode" class="required">Library code: </label>
-                        <input type="text" name="branchcode" id="branchcode" size="10" maxlength="10" value="[% library.branchcode |html %]" class="required" required="required" />
+                        <input type="text" name="branchcode" id="branchcode" size="10" maxlength="10" value="[% library.branchcode | html %]" class="required" required="required" />
                         <span class="required">Required</span>
                     [% END %]
                 </li>
                 <li>
                     <label for="branchname" class="required">Name: </label>
-                    <input type="text" name="branchname" id="branchname" size="80" value="[% library.branchname |html %]" class="required" required="required" />
+                    <input type="text" name="branchname" id="branchname" size="80" value="[% library.branchname | html %]" class="required" required="required" />
                     <span class="required">Required</span>
                 </li>
             </ol>
                 <ol>
                     [% FOREACH category IN categories %]
                         <li>
-                            <label for="[% category.categorycode %]">[% category.categoryname |html %]: </label>
+                            <label for="[% category.categorycode | html %]">[% category.categoryname | html %]: </label>
                             [% IF category and selected_categorycodes.grep(category.categorycode).size %]
-                                <input type="checkbox" id="[% category.categorycode %]" name="selected_categorycode_[% category.categorycode %]" checked="checked" />
+                                <input type="checkbox" id="[% category.categorycode | html %]" name="selected_categorycode_[% category.categorycode | html %]" checked="checked" />
                             [% ELSE %]
-                                <input type="checkbox" id="[% category.categorycode %]" name="selected_categorycode_[% category.categorycode %]" />
+                                <input type="checkbox" id="[% category.categorycode | html %]" name="selected_categorycode_[% category.categorycode | html %]" />
                             [% END %]
-                            <span class="hint">[% category.codedescription |html %]</span>
+                            <span class="hint">[% category.codedescription | html %]</span>
                         </li>
                     [% END %]
                 </ol>
         [% END %]
         <fieldset class="rows">
             <ol>
-                <li><label for="branchaddress1">Address line 1: </label><input type="text" name="branchaddress1" id="branchaddress1" size="60" value="[% library.branchaddress1 |html %]" /></li>
-                <li><label for="branchaddress2">Address line 2: </label><input type="text" name="branchaddress2" id="branchaddress2" size="60" value="[% library.branchaddress2 |html %]" /></li>
-                <li><label for="branchaddress3">Address line 3: </label><input type="text" name="branchaddress3" id="branchaddress3" size="60" value="[% library.branchaddress3 |html %]" /></li>
-                <li><label for="branchcity">City: </label><input type="text" name="branchcity" id="branchcity" size="60" value="[% library.branchcity |html %]" /></li>
-                <li><label for="branchstate">State: </label><input type="text" name="branchstate" id="branchstate" size="60" value="[% library.branchstate |html %]" /></li>
-                <li><label for="branchzip">ZIP/Postal code: </label><input type="text" name="branchzip" id="branchzip"  size="25" maxlength="25" value="[% library.branchzip |html %]" /></li>
-                <li><label for="branchcountry">Country: </label><input type="text" name="branchcountry" id="branchcountry" size="60" value="[% library.branchcountry |html %]" /></li>
-                <li><label for="branchphone">Phone: </label><input type="text" name="branchphone" id="branchphone" size="60" value="[% library.branchphone |html %]" /></li>
-                <li><label for="branchfax">Fax: </label><input type="text" name="branchfax" id="branchfax" size="60" value="[% library.branchfax |html %]" /></li>
-                <li><label for="branchemail">Email: </label><input type="text" name="branchemail" id="branchemail" class="email"  size="80" value="[% library.branchemail |html %]" /></li>
-                <li><label for="branchreplyto">Reply-To: </label> <input type="text" name="branchreplyto" id="branchreplyto" class="email"  size="80" value="[% library.branchreplyto |html %]" /><br /><span class="hint">Default: ReplyToDefault system preference</span></li>
-                <li><label for="branchreturnpath">Return-Path: </label> <input type="text" name="branchreturnpath" id="branchreturnpath" class="email"  size="80" value="[% library.branchreturnpath |html %]" /><br /><span class="hint">Default: ReturnpathDefault system preference</span></li>
-                <li><label for="branchurl">URL: </label><input type="text" name="branchurl" id="branchurl"  size="80" value="[% library.branchurl |html %]" class="url" /></li>
-                <li><label for="opac_info">OPAC info: </label><textarea name="opac_info" id="opac_info">[% library.opac_info |html %]</textarea></li>
-                <li><label for="branchip">IP: </label><input type="text" name="branchip" id="branchip"  size="15" maxlength="15" value="[% library.branchip |html %]" /> <span class="hint">Can be entered as a single IP, or a subnet such as 192.168.1.*</span></li>
-                <li><label for="marcorgccode">MARC organization code</label> <input type="text" name="marcorgcode" id="marcorgcode" size="16" value="[% library.marcorgcode |html %]" /> <span class="hint">If not filled in defaults to system preference MARCOrgCode. You can obtain your code from <a href="http://www.loc.gov/marc/organizations/orgshome.html" target="_blank">Library of Congress</a>.</span>
-                <li><label for="branchnotes">Notes: </label><input type="text" name="branchnotes" id="branchnotes" size="80" value="[% library.branchnotes |html %]" /></li>
+                <li><label for="branchaddress1">Address line 1: </label><input type="text" name="branchaddress1" id="branchaddress1" size="60" value="[% library.branchaddress1 | html %]" /></li>
+                <li><label for="branchaddress2">Address line 2: </label><input type="text" name="branchaddress2" id="branchaddress2" size="60" value="[% library.branchaddress2 | html %]" /></li>
+                <li><label for="branchaddress3">Address line 3: </label><input type="text" name="branchaddress3" id="branchaddress3" size="60" value="[% library.branchaddress3 | html %]" /></li>
+                <li><label for="branchcity">City: </label><input type="text" name="branchcity" id="branchcity" size="60" value="[% library.branchcity | html %]" /></li>
+                <li><label for="branchstate">State: </label><input type="text" name="branchstate" id="branchstate" size="60" value="[% library.branchstate | html %]" /></li>
+                <li><label for="branchzip">ZIP/Postal code: </label><input type="text" name="branchzip" id="branchzip"  size="25" maxlength="25" value="[% library.branchzip | html %]" /></li>
+                <li><label for="branchcountry">Country: </label><input type="text" name="branchcountry" id="branchcountry" size="60" value="[% library.branchcountry | html %]" /></li>
+                <li><label for="branchphone">Phone: </label><input type="text" name="branchphone" id="branchphone" size="60" value="[% library.branchphone | html %]" /></li>
+                <li><label for="branchfax">Fax: </label><input type="text" name="branchfax" id="branchfax" size="60" value="[% library.branchfax | html %]" /></li>
+                <li><label for="branchemail">Email: </label><input type="text" name="branchemail" id="branchemail" class="email"  size="80" value="[% library.branchemail | html %]" /></li>
+                <li><label for="branchreplyto">Reply-To: </label> <input type="text" name="branchreplyto" id="branchreplyto" class="email"  size="80" value="[% library.branchreplyto | html %]" /><br /><span class="hint">Default: ReplyToDefault system preference</span></li>
+                <li><label for="branchreturnpath">Return-Path: </label> <input type="text" name="branchreturnpath" id="branchreturnpath" class="email"  size="80" value="[% library.branchreturnpath | html %]" /><br /><span class="hint">Default: ReturnpathDefault system preference</span></li>
+                <li><label for="branchurl">URL: </label><input type="text" name="branchurl" id="branchurl"  size="80" value="[% library.branchurl | html %]" class="url" /></li>
+                <li><label for="opac_info">OPAC info: </label><textarea name="opac_info" id="opac_info">[% library.opac_info | $raw %]</textarea></li>
+                <li><label for="branchip">IP: </label><input type="text" name="branchip" id="branchip"  size="15" maxlength="15" value="[% library.branchip | html %]" /> <span class="hint">Can be entered as a single IP, or a subnet such as 192.168.1.*</span></li>
+                <li><label for="marcorgccode">MARC organization code</label> <input type="text" name="marcorgcode" id="marcorgcode" size="16" value="[% library.marcorgcode | html %]" /> <span class="hint">If not filled in defaults to system preference MARCOrgCode. You can obtain your code from <a href="http://www.loc.gov/marc/organizations/orgshome.html" target="_blank">Library of Congress</a>.</span>
+                <li><label for="branchnotes">Notes: </label><input type="text" name="branchnotes" id="branchnotes" size="80" value="[% library.branchnotes | html %]" /></li>
+                <li><label for="pickup_location">Pickup location: </label>
+                    <select name="pickup_location" id="pickup_location">
+                        [% IF !library || library.pickup_location == 1 %]
+                        <option value="1" selected="selected">Yes</option>
+                        <option value="0">No</option>
+                        [% ELSE %]
+                        <option value="1">Yes</option>
+                        <option value="0" selected="selected">No</option>
+                        [% END %]
+                    </select>
+                </li>
             </ol>
         </fieldset>
         <fieldset class="action">
 [% IF op == 'delete_confirm' and not ( items_count or patrons_count )%]
     <div class="dialog alert">
         <form action="/cgi-bin/koha/admin/branches.pl" method="post">
-            <h3>Are you sure you want to delete [% library.branchname |html %] ([% library.branchcode | html %])?</h3>
+            <h3>Are you sure you want to delete [% library.branchname | html %] ([% library.branchcode | html %])?</h3>
             <input type="hidden" name="op" value="delete_confirmed" />
-            <input type="hidden" name="branchcode" value="[% library.branchcode |html %]" />
-            <input type="hidden" name="branchname" value="[% library.branchname |html %]">
+            <input type="hidden" name="branchcode" value="[% library.branchcode | html %]" />
+            <input type="hidden" name="branchname" value="[% library.branchname | html %]">
             <button type="submit" class="approve"><i class="fa fa-fw fa-check"></i> Yes, delete</button>
         </form>
         <form action="/cgi-bin/koha/admin/branches.pl" method="get">
                     <th>Name</th>
                     <th>Code</th>
                     <th>Address</th>
-                    <th>Properties</th>
                     <th>MARC organization code</th>
                     <th>IP</th>
+                    <th>Pickup location</th>
                     <th>Actions</th>
                 </tr>
             </thead>
             <tbody>
                 [% FOREACH library IN libraries %]
                     <tr>
-                        <td>[% library.branchname |html %]</td>
-                        <td>[% library.branchcode |html %]</td>
+                        <td>[% library.branchname | html %]</td>
+                        <td>[% library.branchcode | html %]</td>
                         <td>
                             [% IF library.branchaddress1 %]
-                                [% library.branchaddress1 |html %][% END %]
+                                [% library.branchaddress1 | html %][% END %]
                             [% IF library.branchaddress2 %]
-                                <br />[% library.branchaddress2 |html %][% END %]
+                                <br />[% library.branchaddress2 | html %][% END %]
                             [% IF library.branchaddress3 %]
-                                <br />[% library.branchaddress3 |html %][% END %]
+                                <br />[% library.branchaddress3 | html %][% END %]
                             [% IF library.branchcity %]
-                                <br />[% library.branchcity |html %][% END %][% IF ( library.branchstate ) %],
-                                [% library.branchstate |html %][% END %]
+                                <br />[% library.branchcity | html %][% END %][% IF ( library.branchstate ) %],
+                                [% library.branchstate | html %][% END %]
                             [% IF library.branchzip %]
-                                [% library.branchzip |html %][% END %]
+                                [% library.branchzip | html %][% END %]
                             [% IF library.branchcountry %]
-                                <br />[% library.branchcountry |html %][% END %]
+                                <br />[% library.branchcountry | html %][% END %]
                             [% IF library.branchphone %]
-                                <br />Ph: [% library.branchphone |html %][% END %]
+                                <br />Ph: [% library.branchphone | html %][% END %]
                             [% IF library.branchfax %]
-                                <br />Fax: [% library.branchfax |html %][% END %]
+                                <br />Fax: [% library.branchfax | html %][% END %]
                             [% IF library.branchemail %]
-                                <br /><a href="mailto:[% library.branchemail %]">[% library.branchemail |html %]</a>[% END %]
+                                <br /><a href="mailto:[% library.branchemail | uri %]">[% library.branchemail | html %]</a>[% END %]
                             [% IF library.branchurl %]
-                                <br /><a href="[% library.branchurl %]">[% library.branchurl |html %]</a>[% END %]
+                                <br /><a href="[% library.branchurl | url %]">[% library.branchurl | html %]</a>[% END %]
                             [% IF library.opac_info %]
-                                <br />OPAC Info: <div>[% library.opac_info %]</div>[% END %]
+                                <br />OPAC Info: <div>[% library.opac_info | $raw %]</div>[% END %]
                             [% IF library.branchnotes %]
-                                <br />Notes: [% library.branchnotes |html %][% END %]
-                        </td>
-                        <td>
-                            [% FOREACH category IN library.get_categories %]
-                                [% category.categoryname |html %]<br />
-                            [% END %]
+                                <br />Notes: [% library.branchnotes | html %][% END %]
                         </td>
-                        <td>[% library.marcorgcode %]</td>
-                        <td>[% library.branchip %]</td>
+                        <td>[% library.marcorgcode | html %]</td>
+                        <td>[% library.branchip | html %]</td>
+                        <td>[% IF library.pickup_location %]Yes[% ELSE %]No[% END %]</td>
                         <td class="actions">
                             <a class="btn btn-default btn-xs" href="/cgi-bin/koha/admin/branches.pl?op=add_form&amp;branchcode=[% library.branchcode |uri %]"><i class="fa fa-pencil"></i> Edit</a>
                             <form action="/cgi-bin/koha/admin/branches.pl" method="post">
-                                <input type="hidden" name="branchcode" value="[% library.branchcode |html %]" />
+                                <input type="hidden" name="branchcode" value="[% library.branchcode | html %]" />
                                 <input type="hidden" name="op" value="delete_confirm" />
-                                <button type="submit" class="btn btn-default btn-xs"><i class="fa fa-trash"></i> Delete</button>
+                                <button type="submit" id="delete_library_[% library.branchcode | html %]" class="btn btn-default btn-xs"><i class="fa fa-trash"></i> Delete</button>
                             </form>
                         </td>
                     </tr>
     [% ELSE %]
         <div class="dialog message">There are no libraries defined. <a href="/cgi-bin/koha/admin/branches.pl?op=add_form">Start defining libraries</a>.</div>
     [% END %]
-
-    [% IF group_types %]
-        [% FOREACH group_type IN group_types %]
-            <h3>[% IF group_type.categorytype == 'properties' %]Properties[% ELSIF group_type.categorytype == 'searchdomain' %]Search domain[% END %]</h3>
-            [% IF group_type.categories.size %]
-                <table>
-                    <thead>
-                        <tr>
-                            <th>Name</th>
-                            <th>Code</th>
-                            <th>Description</th>
-                            <th>Actions</th>
-                        </tr>
-                    </thead>
-                    <tbody>
-                        [% FOREACH category IN group_type.categories %]
-                            <tr>
-                                <td>[% category.categoryname |html %]</td>
-                                <td>[% category.categorycode %]</td>
-                                <td>[% category.codedescription |html %]</td>
-                                <td class="actions">
-                                  <a class="btn btn-default btn-xs" href="/cgi-bin/koha/admin/branches.pl?categorycode=[% category.categorycode %]&amp;op=add_form_category"><i class="fa fa-pencil"></i> Edit</a>
-                                  <a class="btn btn-default btn-xs" href="/cgi-bin/koha/admin/branches.pl?categorycode=[% category.categorycode %]&amp;op=delete_confirm_category"><i class="fa fa-trash"></i> Delete</a>
-                                </td>
-                            </tr>
-                        [% END %]
-                    </tbody>
-                </table>
-            [% ELSE %]
-                [% IF group_type.categorytype == 'properties' %]
-                    No properties defined.
-                [% ELSIF group_type.categorytype == 'searchdomain' %]
-                    No search domain defined.
-                [% END %]
-                <a href="/cgi-bin/koha/admin/branches.pl?op=add_form_category">Add a new group</a>.
-            [% END %]
-        [% END %]
-    [% ELSE %]
-        <p>No groups defined.</p>
-    [% END %]
-[% END %]
-
-[% IF op == 'add_form_category' %]
-    <h3>[% IF category.categorycode %]Edit group [% category.categorycode %][% ELSE %]Add group[% END %]</h3>
-    <form action="/cgi-bin/koha/admin/branches.pl" name="Aform" method="post" class="validated">
-        <input type="hidden" name="op" value="add_validate_category" />
-        [% IF category.categorycode %]
-            <input type="hidden" name="is_a_modif" value="1" />
-        [% END %]
-        <fieldset class="rows">
-            <ol>
-                <li>
-                    [% IF category.categorycode %]
-                        <span class="label">Category code: </span>
-                        <input type="hidden" name="categorycode" id="categorycode" value="[% category.categorycode |html %]" />
-                        [% category.categorycode %]
-                    [% ELSE %]
-                        <label for="categorycode" class="required">Category code:</label>
-                        <input type="text" name="categorycode" id="categorycode" size="10" maxlength="10" class="required" required="required" />
-                        <span class="required">Required</span>
-                    [% END %]
-                </li>
-                <li>
-                    <label for="categoryname" class="required">Name: </label>
-                    <input type="text" name="categoryname" id="categoryname" size="32" maxlength="32" value="[% category.categoryname |html %]" class="required" required="required" />
-                    <span class="required">Required</span>
-                </li>
-                <li>
-                    <label for="codedescription">Description: </label>
-                    <input type="text" name="codedescription" id="codedescription" size="70" value="[% category.codedescription |html %]" />
-                </li>
-                <li>
-                    <label for="categorytype">Category type: </label>
-                    <select id="categorytype" name="categorytype">
-                        [% IF category.categorytype == 'properties' %]
-                            <option value="searchdomain">Search domain</option>
-                            <option value="properties" selected="selected">Properties</option>
-                        [% ELSE %]
-                            <option value="searchdomain">Search domain</option>
-                            <option value="properties">Properties</option>
-
-                        [% END %]
-                    </select>
-                </li>
-                <li>
-                    <label for="show_in_pulldown">Show in search pulldown: </label>
-                    [% IF category.show_in_pulldown %]
-                        <input type="checkbox" name="show_in_pulldown" id="show_in_pulldown" checked="checked"/>
-                    [% ELSE %]
-                        <input type="checkbox" name="show_in_pulldown" id="show_in_pulldown" />
-                    [% END %]
-                </li>
-            </ol>
-        </fieldset>
-        <fieldset class="action">
-            <input type="submit" value="Submit" />
-            <a href="/cgi-bin/koha/admin/branches.pl" class="cancel">Cancel</a>
-        </fieldset>
-    </form>
 [% END %]
 
-[% IF op == 'delete_confirm_category' %]
-    <div class="dialog alert">
-    <h3>Are you sure you want to delete the group '[% category.codedescription |html %]' ([% category.categorycode %])?</h3>
-    <form action="/cgi-bin/koha/admin/branches.pl" method="post">
-        <input type="hidden" name="op" value="delete_confirmed_category" />
-        <input type="hidden" name="categorycode" value="[% category.categorycode |html %]" />
-        <button type="submit" class="approve"><i class="fa fa-fw fa-check"></i> Yes, delete</button>
-    </form>
-    <form action="/cgi-bin/koha/admin/branches.pl" method="get">
-        <button type="submit" class="deny"><i class="fa fa-fw fa-remove"></i> No, do not delete</button>
-    </form>
-    </div>
-[% END %]
+            </main>
+        </div> <!-- /.col-sm-10.col-sm-push-2 -->
 
-</div>
-</div>
-<div class="yui-b">
-[% INCLUDE 'admin-menu.inc' %]
-</div>
-</div>
+        <div class="col-sm-2 col-sm-pull-10">
+            <aside>
+                [% INCLUDE 'admin-menu.inc' %]
+            </aside>
+        </div> <!-- /.col-sm-2.col-sm-pull-10 -->
+     </div> <!-- /.row -->
 
 [% MACRO jsinclude BLOCK %]
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/admin-menu.js"></script>
+    [% Asset.js("js/admin-menu.js") | $raw %]
     [% INCLUDE 'datatables.inc' %]
-    <script type="text/javascript" src="[% interface %]/lib/tiny_mce/tiny_mce.js"></script>
-    <script type="text/javascript">
+    [% Asset.js("lib/tiny_mce/tiny_mce.js") | $raw %]
+    <script>
         $(document).ready(function() {
             $("#branchest").dataTable($.extend(true, {}, dataTablesDefaults, {
                 "aoColumnDefs": [
                 });
             [% END %]
         });
+        tinyMCE.baseURL = "[% interface | html %]/lib/tiny_mce";
         tinyMCE.init({
             mode : "textareas",
             theme : "advanced",
-            content_css : "[% interface %]/[% theme %]/css/tinymce.css",
+            content_css : "[% interface | html %]/[% theme | html %]/css/tinymce.css",
             plugins : "table,save,advhr,advlink,contextmenu",
             theme_advanced_buttons1 : "save,|,bold,italic,|,cut,copy,paste,|,justifyleft,justifycenter,justifyright,justifyfull,|,formatselect,|,link,unlink,anchor,cleanup,help,code,advhr,",
             theme_advanced_buttons2 : "tablecontrols,|,bullist,numlist,|,outdent,indent,|,undo,redo,|,removeformat,|,visualaid,|,sub,sup,|,charmap",