From e2128493c8f0f540a6610e631d1e21d51cd79b1c Mon Sep 17 00:00:00 2001
From: Chris Hallberg <crhallberg@gmail.com>
Date: Mon, 10 Aug 2015 14:45:58 -0400
Subject: [PATCH] Basic right-to-left support for bootstrap3/bootprint3.

---
 config/vufind/config.ini                      |  5 ++
 module/VuFind/src/VuFind/Bootstrapper.php     |  4 ++
 .../View/Helper/AbstractLayoutClass.php       |  7 +--
 .../VuFind/View/Helper/Bootstrap3/Factory.php |  5 +-
 .../View/Helper/Bootstrap3/LayoutClass.php    |  4 +-
 .../css/vendor/bootstrap-rtl.min.css          | 54 +++++++++++++++++++
 themes/bootstrap3/less/bootstrap.less         |  6 +--
 .../templates/Recommend/AuthorInfo.phtml      |  2 +-
 .../templates/Recommend/FavoriteFacets.phtml  |  2 +-
 .../templates/Recommend/RandomRecommend.phtml |  2 +-
 .../templates/Recommend/SideFacets.phtml      |  4 +-
 .../RecordDriver/SolrDefault/core.phtml       |  2 +-
 .../RecordDriver/SolrDefault/list-entry.phtml |  2 +-
 .../templates/RecordTab/collectionlist.phtml  |  4 +-
 themes/bootstrap3/templates/browse/home.phtml |  6 +--
 themes/bootstrap3/templates/cart/cart.phtml   |  2 +-
 .../templates/combined/results-list.phtml     |  4 +-
 .../templates/confirm/confirm.phtml           |  2 +-
 .../templates/devtools/language.phtml         |  2 +-
 themes/bootstrap3/templates/header.phtml      |  2 +-
 .../bootstrap3/templates/layout/layout.phtml  |  4 ++
 .../templates/myresearch/checkedout.phtml     |  6 +--
 .../templates/myresearch/illrequests.phtml    |  2 +-
 .../templates/myresearch/menu.phtml           | 26 ++++-----
 .../templates/myresearch/mylist.phtml         |  6 +--
 .../myresearch/storageretrievalrequests.phtml |  2 +-
 .../templates/search/advanced/layout.phtml    |  8 +--
 .../templates/search/reservessearch.phtml     |  4 +-
 .../templates/search/searchbox.phtml          |  4 +-
 .../bootstrap3/templates/vudl/techinfo.phtml  |  4 +-
 30 files changed, 129 insertions(+), 58 deletions(-)
 create mode 100644 themes/bootstrap3/css/vendor/bootstrap-rtl.min.css

diff --git a/config/vufind/config.ini b/config/vufind/config.ini
index a7ad4a8ab1b..9d99cbd009e 100644
--- a/config/vufind/config.ini
+++ b/config/vufind/config.ini
@@ -953,6 +953,11 @@ da          = "Danish"
 sl          = "Slovene"
 ar          = "Arabic"
 
+; This section contains special cases for languages such as right-to-left support
+[LanguageSettings]
+; Comma-separated list of languages to display in right-to-left mode
+rtl_langs = "ar,he"
+
 ; This section controls the behavior of the Browse module.  The result_limit
 ; setting controls the maximum number of results that may display in any given
 ; result box on the Browse screen.  You can set to -1 for no limit; however,
diff --git a/module/VuFind/src/VuFind/Bootstrapper.php b/module/VuFind/src/VuFind/Bootstrapper.php
index 4c80683c42c..5343f254bc5 100644
--- a/module/VuFind/src/VuFind/Bootstrapper.php
+++ b/module/VuFind/src/VuFind/Bootstrapper.php
@@ -342,6 +342,10 @@ class Bootstrapper
             $viewModel = $sm->get('viewmanager')->getViewModel();
             $viewModel->setVariable('userLang', $language);
             $viewModel->setVariable('allLangs', $config->Languages);
+            $rtlLangs = array_map(
+                'trim', explode(',', $config->LanguageSettings->rtl_langs)
+            );
+            $viewModel->setVariable('rtl', in_array($language, $rtlLangs));
         };
         $this->events->attach('dispatch.error', $callback, 10000);
         $this->events->attach('dispatch', $callback, 10000);
diff --git a/module/VuFind/src/VuFind/View/Helper/AbstractLayoutClass.php b/module/VuFind/src/VuFind/View/Helper/AbstractLayoutClass.php
index 3b924d77738..633c8b222b3 100644
--- a/module/VuFind/src/VuFind/View/Helper/AbstractLayoutClass.php
+++ b/module/VuFind/src/VuFind/View/Helper/AbstractLayoutClass.php
@@ -56,11 +56,12 @@ abstract class AbstractLayoutClass extends \Zend\View\Helper\AbstractHelper
      * Constructor
      *
      * @param bool $left      Does the sidebar go on the left?
-     * @param bool $offcanvas Offcanvas config setting
+     * @param bool $offcanvas Is offcanvas menu active?
+     * @param bool $rtl       Are we displaying right-to-left?
      */
-    public function __construct($left = false, $offcanvas = false)
+    public function __construct($left = false, $offcanvas = false, $rtl = false)
     {
-        $this->left = $left;
+        $this->left = (bool) $left ^ (bool) $rtl;
         $this->offcanvas = $offcanvas;
     }
 
diff --git a/module/VuFind/src/VuFind/View/Helper/Bootstrap3/Factory.php b/module/VuFind/src/VuFind/View/Helper/Bootstrap3/Factory.php
index 19ef6ebd4aa..ab8a50bbc03 100644
--- a/module/VuFind/src/VuFind/View/Helper/Bootstrap3/Factory.php
+++ b/module/VuFind/src/VuFind/View/Helper/Bootstrap3/Factory.php
@@ -69,6 +69,9 @@ class Factory
             ? false : $config->Site->sidebarOnLeft;
         $offcanvas = !isset($config->Site->offcanvas)
             ? false : $config->Site->offcanvas;
-        return new LayoutClass($left, $offcanvas);
+        // The right-to-left setting is injected into the layout by the Bootstrapper;
+        // pull it back out here to avoid duplicate effort.
+        $layout = $sm->getServiceLocator()->get('viewmanager')->getViewModel();
+        return new LayoutClass($left, $offcanvas, $layout->rtl);
     }
 }
\ No newline at end of file
diff --git a/module/VuFind/src/VuFind/View/Helper/Bootstrap3/LayoutClass.php b/module/VuFind/src/VuFind/View/Helper/Bootstrap3/LayoutClass.php
index 2d419a19bd4..518d4bcffa5 100644
--- a/module/VuFind/src/VuFind/View/Helper/Bootstrap3/LayoutClass.php
+++ b/module/VuFind/src/VuFind/View/Helper/Bootstrap3/LayoutClass.php
@@ -65,8 +65,8 @@ class LayoutClass extends \VuFind\View\Helper\AbstractLayoutClass
                 return "";
             }
             return $this->left
-                ? 'offcanvas offcanvas-left'
-                : 'offcanvas offcanvas-right';
+                ? 'offcanvas offcanvas-left flip'
+                : 'offcanvas offcanvas-right flip';
         }
     }
 }
diff --git a/themes/bootstrap3/css/vendor/bootstrap-rtl.min.css b/themes/bootstrap3/css/vendor/bootstrap-rtl.min.css
new file mode 100644
index 00000000000..d8dd55d497b
--- /dev/null
+++ b/themes/bootstrap3/css/vendor/bootstrap-rtl.min.css
@@ -0,0 +1,54 @@
+/*******************************************************************************
+ *              bootstrap-rtl (version 3.3.1)
+ *      Author: Morteza Ansarinia (http://github.com/morteza)
+ *  Created on: January 21,2015
+ *     Project: bootstrap-rtl
+ *   Copyright: Unlicensed Public Domain
+ *******************************************************************************/
+
+html{direction:rtl}body{direction:rtl}.list-unstyled{padding-right:0;padding-left:initial}.list-inline{padding-right:0;padding-left:initial;margin-right:-5px;margin-left:0}dd{margin-right:0;margin-left:initial}@media (min-width:768px){.dl-horizontal dt{float:right;clear:right;text-align:left}.dl-horizontal dd{margin-right:180px;margin-left:0}}blockquote{border-right:5px solid #eee;border-left:0}.blockquote-reverse,blockquote.pull-left{padding-left:15px;padding-right:0;border-left:5px solid #eee;border-right:0;text-align:left}.col-xs-1,.col-sm-1,.col-md-1,.col-lg-1,.col-xs-2,.col-sm-2,.col-md-2,.col-lg-2,.col-xs-3,.col-sm-3,.col-md-3,.col-lg-3,.col-xs-4,.col-sm-4,.col-md-4,.col-lg-4,.col-xs-5,.col-sm-5,.col-md-5,.col-lg-5,.col-xs-6,.col-sm-6,.col-md-6,.col-lg-6,.col-xs-7,.col-sm-7,.col-md-7,.col-lg-7,.col-xs-8,.col-sm-8,.col-md-8,.col-lg-8,.col-xs-9,.col-sm-9,.col-md-9,.col-lg-9,.col-xs-10,.col-sm-10,.col-md-10,.col-lg-10,.col-xs-11,.col-sm-11,.col-md-11,.col-lg-11,.col-xs-12,.col-sm-12,.col-md-12,.col-lg-12{position:relative;min-height:1px;padding-left:15px;padding-right:15px}.col-xs-1,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9,.col-xs-10,.col-xs-11,.col-xs-12{float:right}.col-xs-12{width:100%}.col-xs-11{width:91.66666667%}.col-xs-10{width:83.33333333%}.col-xs-9{width:75%}.col-xs-8{width:66.66666667%}.col-xs-7{width:58.33333333%}.col-xs-6{width:50%}.col-xs-5{width:41.66666667%}.col-xs-4{width:33.33333333%}.col-xs-3{width:25%}.col-xs-2{width:16.66666667%}.col-xs-1{width:8.33333333%}.col-xs-pull-12{left:100%;right:auto}.col-xs-pull-11{left:91.66666667%;right:auto}.col-xs-pull-10{left:83.33333333%;right:auto}.col-xs-pull-9{left:75%;right:auto}.col-xs-pull-8{left:66.66666667%;right:auto}.col-xs-pull-7{left:58.33333333%;right:auto}.col-xs-pull-6{left:50%;right:auto}.col-xs-pull-5{left:41.66666667%;right:auto}.col-xs-pull-4{left:33.33333333%;right:auto}.col-xs-pull-3{left:25%;right:auto}.col-xs-pull-2{left:16.66666667%;right:auto}.col-xs-pull-1{left:8.33333333%;right:auto}.col-xs-pull-0{left:auto;right:auto}.col-xs-push-12{right:100%;left:0}.col-xs-push-11{right:91.66666667%;left:0}.col-xs-push-10{right:83.33333333%;left:0}.col-xs-push-9{right:75%;left:0}.col-xs-push-8{right:66.66666667%;left:0}.col-xs-push-7{right:58.33333333%;left:0}.col-xs-push-6{right:50%;left:0}.col-xs-push-5{right:41.66666667%;left:0}.col-xs-push-4{right:33.33333333%;left:0}.col-xs-push-3{right:25%;left:0}.col-xs-push-2{right:16.66666667%;left:0}.col-xs-push-1{right:8.33333333%;left:0}.col-xs-push-0{right:auto;left:0}.col-xs-offset-12{margin-right:100%;margin-left:0}.col-xs-offset-11{margin-right:91.66666667%;margin-left:0}.col-xs-offset-10{margin-right:83.33333333%;margin-left:0}.col-xs-offset-9{margin-right:75%;margin-left:0}.col-xs-offset-8{margin-right:66.66666667%;margin-left:0}.col-xs-offset-7{margin-right:58.33333333%;margin-left:0}.col-xs-offset-6{margin-right:50%;margin-left:0}.col-xs-offset-5{margin-right:41.66666667%;margin-left:0}.col-xs-offset-4{margin-right:33.33333333%;margin-left:0}.col-xs-offset-3{margin-right:25%;margin-left:0}.col-xs-offset-2{margin-right:16.66666667%;margin-left:0}.col-xs-offset-1{margin-right:8.33333333%;margin-left:0}.col-xs-offset-0{margin-right:0;margin-left:0}@media (min-width:768px){.col-sm-1,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-sm-10,.col-sm-11,.col-sm-12{float:right}.col-sm-12{width:100%}.col-sm-11{width:91.66666667%}.col-sm-10{width:83.33333333%}.col-sm-9{width:75%}.col-sm-8{width:66.66666667%}.col-sm-7{width:58.33333333%}.col-sm-6{width:50%}.col-sm-5{width:41.66666667%}.col-sm-4{width:33.33333333%}.col-sm-3{width:25%}.col-sm-2{width:16.66666667%}.col-sm-1{width:8.33333333%}.col-sm-pull-12{left:100%;right:auto}.col-sm-pull-11{left:91.66666667%;right:auto}.col-sm-pull-10{left:83.33333333%;right:auto}.col-sm-pull-9{left:75%;right:auto}.col-sm-pull-8{left:66.66666667%;right:auto}.col-sm-pull-7{left:58.33333333%;right:auto}.col-sm-pull-6{left:50%;right:auto}.col-sm-pull-5{left:41.66666667%;right:auto}.col-sm-pull-4{left:33.33333333%;right:auto}.col-sm-pull-3{left:25%;right:auto}.col-sm-pull-2{left:16.66666667%;right:auto}.col-sm-pull-1{left:8.33333333%;right:auto}.col-sm-pull-0{left:auto;right:auto}.col-sm-push-12{right:100%;left:0}.col-sm-push-11{right:91.66666667%;left:0}.col-sm-push-10{right:83.33333333%;left:0}.col-sm-push-9{right:75%;left:0}.col-sm-push-8{right:66.66666667%;left:0}.col-sm-push-7{right:58.33333333%;left:0}.col-sm-push-6{right:50%;left:0}.col-sm-push-5{right:41.66666667%;left:0}.col-sm-push-4{right:33.33333333%;left:0}.col-sm-push-3{right:25%;left:0}.col-sm-push-2{right:16.66666667%;left:0}.col-sm-push-1{right:8.33333333%;left:0}.col-sm-push-0{right:auto;left:0}.col-sm-offset-12{margin-right:100%;margin-left:0}.col-sm-offset-11{margin-right:91.66666667%;margin-left:0}.col-sm-offset-10{margin-right:83.33333333%;margin-left:0}.col-sm-offset-9{margin-right:75%;margin-left:0}.col-sm-offset-8{margin-right:66.66666667%;margin-left:0}.col-sm-offset-7{margin-right:58.33333333%;margin-left:0}.col-sm-offset-6{margin-right:50%;margin-left:0}.col-sm-offset-5{margin-right:41.66666667%;margin-left:0}.col-sm-offset-4{margin-right:33.33333333%;margin-left:0}.col-sm-offset-3{margin-right:25%;margin-left:0}.col-sm-offset-2{margin-right:16.66666667%;margin-left:0}.col-sm-offset-1{margin-right:8.33333333%;margin-left:0}.col-sm-offset-0{margin-right:0;margin-left:0}}@media (min-width:992px){.col-md-1,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-md-10,.col-md-11,.col-md-12{float:right}.col-md-12{width:100%}.col-md-11{width:91.66666667%}.col-md-10{width:83.33333333%}.col-md-9{width:75%}.col-md-8{width:66.66666667%}.col-md-7{width:58.33333333%}.col-md-6{width:50%}.col-md-5{width:41.66666667%}.col-md-4{width:33.33333333%}.col-md-3{width:25%}.col-md-2{width:16.66666667%}.col-md-1{width:8.33333333%}.col-md-pull-12{left:100%;right:auto}.col-md-pull-11{left:91.66666667%;right:auto}.col-md-pull-10{left:83.33333333%;right:auto}.col-md-pull-9{left:75%;right:auto}.col-md-pull-8{left:66.66666667%;right:auto}.col-md-pull-7{left:58.33333333%;right:auto}.col-md-pull-6{left:50%;right:auto}.col-md-pull-5{left:41.66666667%;right:auto}.col-md-pull-4{left:33.33333333%;right:auto}.col-md-pull-3{left:25%;right:auto}.col-md-pull-2{left:16.66666667%;right:auto}.col-md-pull-1{left:8.33333333%;right:auto}.col-md-pull-0{left:auto;right:auto}.col-md-push-12{right:100%;left:0}.col-md-push-11{right:91.66666667%;left:0}.col-md-push-10{right:83.33333333%;left:0}.col-md-push-9{right:75%;left:0}.col-md-push-8{right:66.66666667%;left:0}.col-md-push-7{right:58.33333333%;left:0}.col-md-push-6{right:50%;left:0}.col-md-push-5{right:41.66666667%;left:0}.col-md-push-4{right:33.33333333%;left:0}.col-md-push-3{right:25%;left:0}.col-md-push-2{right:16.66666667%;left:0}.col-md-push-1{right:8.33333333%;left:0}.col-md-push-0{right:auto;left:0}.col-md-offset-12{margin-right:100%;margin-left:0}.col-md-offset-11{margin-right:91.66666667%;margin-left:0}.col-md-offset-10{margin-right:83.33333333%;margin-left:0}.col-md-offset-9{margin-right:75%;margin-left:0}.col-md-offset-8{margin-right:66.66666667%;margin-left:0}.col-md-offset-7{margin-right:58.33333333%;margin-left:0}.col-md-offset-6{margin-right:50%;margin-left:0}.col-md-offset-5{margin-right:41.66666667%;margin-left:0}.col-md-offset-4{margin-right:33.33333333%;margin-left:0}.col-md-offset-3{margin-right:25%;margin-left:0}.col-md-offset-2{margin-right:16.66666667%;margin-left:0}.col-md-offset-1{margin-right:8.33333333%;margin-left:0}.col-md-offset-0{margin-right:0;margin-left:0}}@media (min-width:1200px){.col-lg-1,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-lg-10,.col-lg-11,.col-lg-12{float:right}.col-lg-12{width:100%}.col-lg-11{width:91.66666667%}.col-lg-10{width:83.33333333%}.col-lg-9{width:75%}.col-lg-8{width:66.66666667%}.col-lg-7{width:58.33333333%}.col-lg-6{width:50%}.col-lg-5{width:41.66666667%}.col-lg-4{width:33.33333333%}.col-lg-3{width:25%}.col-lg-2{width:16.66666667%}.col-lg-1{width:8.33333333%}.col-lg-pull-12{left:100%;right:auto}.col-lg-pull-11{left:91.66666667%;right:auto}.col-lg-pull-10{left:83.33333333%;right:auto}.col-lg-pull-9{left:75%;right:auto}.col-lg-pull-8{left:66.66666667%;right:auto}.col-lg-pull-7{left:58.33333333%;right:auto}.col-lg-pull-6{left:50%;right:auto}.col-lg-pull-5{left:41.66666667%;right:auto}.col-lg-pull-4{left:33.33333333%;right:auto}.col-lg-pull-3{left:25%;right:auto}.col-lg-pull-2{left:16.66666667%;right:auto}.col-lg-pull-1{left:8.33333333%;right:auto}.col-lg-pull-0{left:auto;right:auto}.col-lg-push-12{right:100%;left:0}.col-lg-push-11{right:91.66666667%;left:0}.col-lg-push-10{right:83.33333333%;left:0}.col-lg-push-9{right:75%;left:0}.col-lg-push-8{right:66.66666667%;left:0}.col-lg-push-7{right:58.33333333%;left:0}.col-lg-push-6{right:50%;left:0}.col-lg-push-5{right:41.66666667%;left:0}.col-lg-push-4{right:33.33333333%;left:0}.col-lg-push-3{right:25%;left:0}.col-lg-push-2{right:16.66666667%;left:0}.col-lg-push-1{right:8.33333333%;left:0}.col-lg-push-0{right:auto;left:0}.col-lg-offset-12{margin-right:100%;margin-left:0}.col-lg-offset-11{margin-right:91.66666667%;margin-left:0}.col-lg-offset-10{margin-right:83.33333333%;margin-left:0}.col-lg-offset-9{margin-right:75%;margin-left:0}.col-lg-offset-8{margin-right:66.66666667%;margin-left:0}.col-lg-offset-7{margin-right:58.33333333%;margin-left:0}.col-lg-offset-6{margin-right:50%;margin-left:0}.col-lg-offset-5{margin-right:41.66666667%;margin-left:0}.col-lg-offset-4{margin-right:33.33333333%;margin-left:0}.col-lg-offset-3{margin-right:25%;margin-left:0}.col-lg-offset-2{margin-right:16.66666667%;margin-left:0}.col-lg-offset-1{margin-right:8.33333333%;margin-left:0}.col-lg-offset-0{margin-right:0;margin-left:0}}caption{text-align:right}th{text-align:right}@media screen and (max-width:767px){.table-responsive>.table-bordered{border:0}.table-responsive>.table-bordered>thead>tr>th:first-child,.table-responsive>.table-bordered>tbody>tr>th:first-child,.table-responsive>.table-bordered>tfoot>tr>th:first-child,.table-responsive>.table-bordered>thead>tr>td:first-child,.table-responsive>.table-bordered>tbody>tr>td:first-child,.table-responsive>.table-bordered>tfoot>tr>td:first-child{border-right:0;border-left:initial}.table-responsive>.table-bordered>thead>tr>th:last-child,.table-responsive>.table-bordered>tbody>tr>th:last-child,.table-responsive>.table-bordered>tfoot>tr>th:last-child,.table-responsive>.table-bordered>thead>tr>td:last-child,.table-responsive>.table-bordered>tbody>tr>td:last-child,.table-responsive>.table-bordered>tfoot>tr>td:last-child{border-left:0;border-right:initial}}.radio label,.checkbox label{padding-right:20px;padding-left:initial}.radio input[type=radio],.radio-inline input[type=radio],.checkbox input[type=checkbox],.checkbox-inline input[type=checkbox]{margin-right:-20px;margin-left:auto}.radio-inline,.checkbox-inline{padding-right:20px;padding-left:0}.radio-inline+.radio-inline,.checkbox-inline+.checkbox-inline{margin-right:10px;margin-left:0}.has-feedback .form-control{padding-left:42.5px;padding-right:12px}.form-control-feedback{left:0;right:auto}@media (min-width:768px){.form-inline label{padding-right:0;padding-left:initial}.form-inline .radio input[type=radio],.form-inline .checkbox input[type=checkbox]{margin-right:0;margin-left:auto}}@media (min-width:768px){.form-horizontal .control-label{text-align:left}}.form-horizontal .has-feedback .form-control-feedback{left:15px;right:auto}.caret{margin-right:2px;margin-left:0}.dropdown-menu{right:0;left:auto;float:left;text-align:right}.dropdown-menu.pull-right{left:0;right:auto;float:right}.dropdown-menu-right{left:auto;right:0}.dropdown-menu-left{left:0;right:auto}@media (min-width:768px){.navbar-right .dropdown-menu{left:auto;right:0}.navbar-right .dropdown-menu-left{left:0;right:auto}}.btn-group>.btn,.btn-group-vertical>.btn{float:right}.btn-group .btn+.btn,.btn-group .btn+.btn-group,.btn-group .btn-group+.btn,.btn-group .btn-group+.btn-group{margin-right:-1px;margin-left:0}.btn-toolbar{margin-right:-5px;margin-left:0}.btn-toolbar .btn-group,.btn-toolbar .input-group{float:right}.btn-toolbar>.btn,.btn-toolbar>.btn-group,.btn-toolbar>.input-group{margin-right:5px;margin-left:0}.btn-group>.btn:first-child{margin-right:0}.btn-group>.btn:first-child:not(:last-child):not(.dropdown-toggle){border-top-right-radius:4px;border-bottom-right-radius:4px;border-bottom-left-radius:0;border-top-left-radius:0}.btn-group>.btn:last-child:not(:first-child),.btn-group>.dropdown-toggle:not(:first-child){border-top-left-radius:4px;border-bottom-left-radius:4px;border-bottom-right-radius:0;border-top-right-radius:0}.btn-group>.btn-group{float:right}.btn-group.btn-group-justified>.btn,.btn-group.btn-group-justified>.btn-group{float:none}.btn-group>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group>.btn-group:first-child>.btn:last-child,.btn-group>.btn-group:first-child>.dropdown-toggle{border-top-right-radius:4px;border-bottom-right-radius:4px;border-bottom-left-radius:0;border-top-left-radius:0}.btn-group>.btn-group:last-child>.btn:first-child{border-top-left-radius:4px;border-bottom-left-radius:4px;border-bottom-right-radius:0;border-top-right-radius:0}.btn .caret{margin-right:0}.btn-group-vertical>.btn+.btn,.btn-group-vertical>.btn+.btn-group,.btn-group-vertical>.btn-group+.btn,.btn-group-vertical>.btn-group+.btn-group{margin-top:-1px;margin-right:0}.input-group .form-control{float:right}.input-group .form-control:first-child,.input-group-addon:first-child,.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group>.btn,.input-group-btn:first-child>.dropdown-toggle,.input-group-btn:last-child>.btn:not(:last-child):not(.dropdown-toggle),.input-group-btn:last-child>.btn-group:not(:last-child)>.btn{border-bottom-right-radius:4px;border-top-right-radius:4px;border-bottom-left-radius:0;border-top-left-radius:0}.input-group-addon:first-child{border-right-width:1px;border-right-style:solid;border-left:0}.input-group .form-control:last-child,.input-group-addon:last-child,.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group>.btn,.input-group-btn:last-child>.dropdown-toggle,.input-group-btn:first-child>.btn:not(:first-child),.input-group-btn:first-child>.btn-group:not(:first-child)>.btn{border-bottom-left-radius:4px;border-top-left-radius:4px;border-bottom-right-radius:0;border-top-right-radius:0}.input-group-addon:last-child{border-left-width:1px;border-left-style:solid;border-right:0}.input-group-btn>.btn+.btn{margin-right:-1px;margin-left:auto}.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group{margin-left:-1px;margin-right:auto}.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group{margin-right:-1px;margin-left:auto}.nav{padding-right:0;padding-left:initial}.nav-tabs>li{float:right}.nav-tabs>li>a{margin-left:auto;margin-right:-2px;border-radius:4px 4px 0 0}.nav-pills>li{float:right}.nav-pills>li>a{border-radius:4px}.nav-pills>li+li{margin-right:2px;margin-left:auto}.nav-stacked>li{float:none}.nav-stacked>li+li{margin-right:0;margin-left:auto}.nav-justified>.dropdown .dropdown-menu{right:auto}.nav-tabs-justified>li>a{margin-left:0;margin-right:auto}@media (min-width:768px){.nav-tabs-justified>li>a{border-radius:4px 4px 0 0}}@media (min-width:768px){.navbar-header{float:right}}.navbar-collapse{padding-right:15px;padding-left:15px}.navbar-brand{float:right}@media (min-width:768px){.navbar>.container .navbar-brand,.navbar>.container-fluid .navbar-brand{margin-right:-15px;margin-left:auto}}.navbar-toggle{float:left;margin-left:15px;margin-right:auto}@media (max-width:767px){.navbar-nav .open .dropdown-menu>li>a,.navbar-nav .open .dropdown-menu .dropdown-header{padding:5px 25px 5px 15px}}@media (min-width:768px){.navbar-nav{float:right}.navbar-nav>li{float:right}}@media (min-width:768px){.navbar-left.flip{float:right!important}.navbar-right:last-child{margin-left:-15px;margin-right:auto}.navbar-right.flip{float:left!important;margin-left:-15px;margin-right:auto}.navbar-right .dropdown-menu{left:0;right:auto}}@media (min-width:768px){.navbar-text{float:right}.navbar-text.navbar-right:last-child{margin-left:0;margin-right:auto}}.pagination{padding-right:0}.pagination>li>a,.pagination>li>span{float:right;margin-right:-1px;margin-left:0}.pagination>li:first-child>a,.pagination>li:first-child>span{margin-left:0;border-bottom-right-radius:4px;border-top-right-radius:4px;border-bottom-left-radius:0;border-top-left-radius:0}.pagination>li:last-child>a,.pagination>li:last-child>span{margin-right:-1px;border-bottom-left-radius:4px;border-top-left-radius:4px;border-bottom-right-radius:0;border-top-right-radius:0}.pager{padding-right:0;padding-left:initial}.pager .next>a,.pager .next>span{float:left}.pager .previous>a,.pager .previous>span{float:right}.nav-pills>li>a>.badge{margin-left:0;margin-right:3px}.list-group-item>.badge{float:left}.list-group-item>.badge+.badge{margin-left:5px;margin-right:auto}.alert-dismissable,.alert-dismissible{padding-left:35px;padding-right:15px}.alert-dismissable .close,.alert-dismissible .close{right:auto;left:-21px}.progress-bar{float:right}.media>.pull-left{margin-right:10px}.media>.pull-left.flip{margin-right:0;margin-left:10px}.media>.pull-right{margin-left:10px}.media>.pull-right.flip{margin-left:0;margin-right:10px}.media-right,.media>.pull-right{padding-right:10px;padding-left:initial}.media-left,.media>.pull-left{padding-left:10px;padding-right:initial}.media-list{padding-right:0;padding-left:initial;list-style:none}.list-group{padding-right:0;padding-left:initial}.panel>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table:first-child>thead:first-child>tr:first-child th:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:first-child{border-top-right-radius:3px;border-top-left-radius:0}.panel>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table:first-child>thead:first-child>tr:first-child th:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:last-child{border-top-left-radius:3px;border-top-right-radius:0}.panel>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:first-child{border-bottom-left-radius:3px;border-top-right-radius:0}.panel>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:last-child{border-bottom-right-radius:3px;border-top-left-radius:0}.panel>.table-bordered>thead>tr>th:first-child,.panel>.table-responsive>.table-bordered>thead>tr>th:first-child,.panel>.table-bordered>tbody>tr>th:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:first-child,.panel>.table-bordered>tfoot>tr>th:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:first-child,.panel>.table-bordered>thead>tr>td:first-child,.panel>.table-responsive>.table-bordered>thead>tr>td:first-child,.panel>.table-bordered>tbody>tr>td:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:first-child,.panel>.table-bordered>tfoot>tr>td:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:first-child{border-right:0;border-left:none}.panel>.table-bordered>thead>tr>th:last-child,.panel>.table-responsive>.table-bordered>thead>tr>th:last-child,.panel>.table-bordered>tbody>tr>th:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:last-child,.panel>.table-bordered>tfoot>tr>th:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:last-child,.panel>.table-bordered>thead>tr>td:last-child,.panel>.table-responsive>.table-bordered>thead>tr>td:last-child,.panel>.table-bordered>tbody>tr>td:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:last-child,.panel>.table-bordered>tfoot>tr>td:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:last-child{border-right:none;border-left:0}.embed-responsive .embed-responsive-item,.embed-responsive iframe,.embed-responsive embed,.embed-responsive object{right:0;left:auto}.close{float:left}.modal-footer{text-align:left}.modal-footer .btn+.btn{margin-left:auto;margin-right:5px}.modal-footer .btn-group .btn+.btn{margin-right:-1px;margin-left:auto}.modal-footer .btn-block+.btn-block{margin-right:0;margin-left:auto}.popover{left:auto;text-align:right}.popover.top>.arrow{right:50%;left:auto;margin-right:-11px;margin-left:auto}.popover.top>.arrow:after{margin-right:-10px;margin-left:auto}.popover.bottom>.arrow{right:50%;left:auto;margin-right:-11px;margin-left:auto}.popover.bottom>.arrow:after{margin-right:-10px;margin-left:auto}.carousel-control{right:0;bottom:0}.carousel-control.left{right:auto;left:0;background-image:-webkit-linear-gradient(left,color-stop(rgba(0,0,0,.5)0),color-stop(rgba(0,0,0,.0001)100%));background-image:-o-linear-gradient(left,rgba(0,0,0,.5)0,rgba(0,0,0,.0001)100%);background-image:linear-gradient(to right,rgba(0,0,0,.5)0,rgba(0,0,0,.0001)100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#80000000', endColorstr='#00000000', GradientType=1)}.carousel-control.right{left:auto;right:0;background-image:-webkit-linear-gradient(left,color-stop(rgba(0,0,0,.0001)0),color-stop(rgba(0,0,0,.5)100%));background-image:-o-linear-gradient(left,rgba(0,0,0,.0001)0,rgba(0,0,0,.5)100%);background-image:linear-gradient(to right,rgba(0,0,0,.0001)0,rgba(0,0,0,.5)100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#80000000', GradientType=1)}.carousel-control .icon-prev,.carousel-control .glyphicon-chevron-left{left:50%;right:auto;margin-right:-10px}.carousel-control .icon-next,.carousel-control .glyphicon-chevron-right{right:50%;left:auto;margin-left:-10px}.carousel-indicators{right:50%;left:0;margin-right:-30%;margin-left:0;padding-left:0}@media screen and (min-width:768px){.carousel-control .glyphicon-chevron-left,.carousel-control .icon-prev{margin-left:0;margin-right:-15px}.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next{margin-left:0;margin-right:-15px}.carousel-caption{left:20%;right:20%;padding-bottom:30px}}.pull-right.flip{float:left!important}.pull-left.flip{float:right!important}
+
+/* Customization for offcanvas */
+@media screen and (max-width: 767px) {
+  body.offcanvas.flip .offcanvas-toggle .fa.fa-chevron-left:before {content: "\f054";}
+  body.offcanvas.flip .offcanvas-toggle .fa.fa-chevron-right:before {content: "\f053";}
+
+  body.offcanvas.offcanvas-left.flip {padding-right: 18px;}
+  body.offcanvas.offcanvas-left.flip .sidebar {right: -75%; left: auto;}
+  body.offcanvas.offcanvas-left.flip .offcanvas-overlay {left: -100%; right: auto;}
+  body.offcanvas.offcanvas-left.flip .offcanvas-toggle {
+    border-radius: 3px 0 0 3px;
+    left: auto;
+    right: 0;
+  }
+  body.offcanvas.offcanvas-left.flip.active {
+    margin-left: -75%;
+    margin-right: 75%;
+  }
+  body.offcanvas.offcanvas-left.flip.active .sidebar {right: 0; left: auto;}
+  body.offcanvas.offcanvas-left.flip.active .offcanvas-overlay {left: -75%; right: auto;}
+  body.offcanvas.offcanvas-left.flip.active .offcanvas-toggle {right: 75%; left: auto;}
+
+  body.offcanvas.offcanvas-right.flip {padding-left: 18px;}
+  body.offcanvas.offcanvas-right.flip .sidebar {left: -75%; right: auto;}
+  body.offcanvas.offcanvas-right.flip .offcanvas-overlay {right: -100%; left: auto;}
+  body.offcanvas.offcanvas-right.flip .offcanvas-toggle {
+    border-radius: 0 3px 3px 0;
+    left: 0;
+    right: auto;
+  }
+  body.offcanvas.offcanvas-right.flip.active {
+    margin-left: 75%;
+    margin-right: -75%;
+  }
+  body.offcanvas.offcanvas-right.flip.active .sidebar {left: 0; right: auto;}
+  body.offcanvas.offcanvas-right.flip.active .offcanvas-overlay {right: -75%; left: auto;}
+  body.offcanvas.offcanvas-right.flip.active .offcanvas-toggle {left: 75%; right: auto;}
+}
+
+/* Customization for sidebar */
+.sidebar .list-group:not(.filters) .title:after {float: left;}
+
+/* Customization for typeahead */
+span.twitter-typeahead,
+.search-query {direction: RTL !important;}
\ No newline at end of file
diff --git a/themes/bootstrap3/less/bootstrap.less b/themes/bootstrap3/less/bootstrap.less
index 5adc1c9d4c1..2cdaa4b9e5f 100644
--- a/themes/bootstrap3/less/bootstrap.less
+++ b/themes/bootstrap3/less/bootstrap.less
@@ -572,7 +572,7 @@ li.jstree-facet ul {padding-left: 20px;}
       padding-right: 0;
       overflow-y: auto;
       h4 {padding-left: @padding-base-horizontal;}
-      .checkbox {margin-left: calc(20px + @padding-base-horizontal);}
+      .checkbox {margin-left: 20px + @padding-base-horizontal;}
       .list-group, .list-group-item {
         border-left: 0;
         border-right: 0;
@@ -581,7 +581,7 @@ li.jstree-facet ul {padding-left: 20px;}
     }
     &.active {overflow-y: hidden;}
     &.offcanvas-left {
-      padding-left: calc(@offcanvas-padding - @grid-gutter-width/2);
+      padding-left: @offcanvas-padding - @grid-gutter-width/2;
       & .main {background: #FFF;}
       &.active {
         margin-left: @offcanvas-offset;
@@ -598,7 +598,7 @@ li.jstree-facet ul {padding-left: 20px;}
       }
     }
     &.offcanvas-right {
-      padding-right: calc(@offcanvas-padding - @grid-gutter-width/2);
+      padding-right: @offcanvas-padding - @grid-gutter-width/2;
       & .main > .container {background: #FFF;}
       &.active {
         margin-left: -@offcanvas-offset;
diff --git a/themes/bootstrap3/templates/Recommend/AuthorInfo.phtml b/themes/bootstrap3/templates/Recommend/AuthorInfo.phtml
index e684ffb9e29..dd7f09e4cf1 100644
--- a/themes/bootstrap3/templates/Recommend/AuthorInfo.phtml
+++ b/themes/bootstrap3/templates/Recommend/AuthorInfo.phtml
@@ -4,7 +4,7 @@
   <h2><?=$this->info['name'] ?></h2>
 
   <? if (isset($this->info['image'])): ?>
-    <img class="pull-left" src="<?=$this->info['image'] ?>" alt="<?=$this->escapeHtmlAttr($this->info['altimage']) ?>" width="150px"/>
+    <img class="pull-left flip" src="<?=$this->info['image'] ?>" alt="<?=$this->escapeHtmlAttr($this->info['altimage']) ?>" width="150px"/>
   <? endif; ?>
 
   <?=preg_replace('/___baseurl___/', $this->url('search-results'), $this->info['description']) ?>
diff --git a/themes/bootstrap3/templates/Recommend/FavoriteFacets.phtml b/themes/bootstrap3/templates/Recommend/FavoriteFacets.phtml
index 4ebd891f7ad..8ae7abb8163 100644
--- a/themes/bootstrap3/templates/Recommend/FavoriteFacets.phtml
+++ b/themes/bootstrap3/templates/Recommend/FavoriteFacets.phtml
@@ -11,7 +11,7 @@
       <? foreach ($tagFilterList as $filter): ?>
         <? $removeLink = $this->currentPath().$results->getUrlQuery()->removeFacet($filter['field'], $filter['value']); ?>
         <a class="list-group-item active" href="<?=$removeLink?>">
-          <span class="pull-right"><i class="fa fa-minus-circle"></i></span>
+          <span class="pull-right flip"><i class="fa fa-minus-circle"></i></span>
           <?=$this->escapeHtml($filter['displayText'])?>
         </a>
       <? endforeach; ?>
diff --git a/themes/bootstrap3/templates/Recommend/RandomRecommend.phtml b/themes/bootstrap3/templates/Recommend/RandomRecommend.phtml
index a0482f039e2..4b3fc494bc8 100644
--- a/themes/bootstrap3/templates/Recommend/RandomRecommend.phtml
+++ b/themes/bootstrap3/templates/Recommend/RandomRecommend.phtml
@@ -16,7 +16,7 @@
         <a href="<?=$this->recordLink()->getUrl($driver)?>" class="title <?=$this->record($driver)->getFormatClass($format)?> clearfix">
           <?=$this->record($driver)->getTitleHtml()?>
           <? $summAuthor = $driver->getPrimaryAuthor(); ?>
-          <span class="small<? if (!empty($summAuthor)): ?> pull-right<? endif; ?>">
+          <span class="small<? if (!empty($summAuthor)): ?> pull-right flip<? endif; ?>">
             <? $summDate = $driver->getPublicationDates(); ?>
             <? if (!empty($summDate)): ?>
               <?=$this->transEsc('Published')?>: (<?=$this->escapeHtml($summDate[0])?>)
diff --git a/themes/bootstrap3/templates/Recommend/SideFacets.phtml b/themes/bootstrap3/templates/Recommend/SideFacets.phtml
index e9bba39e2a5..cc091f5386f 100644
--- a/themes/bootstrap3/templates/Recommend/SideFacets.phtml
+++ b/themes/bootstrap3/templates/Recommend/SideFacets.phtml
@@ -44,7 +44,7 @@
           }
         ?>
         <a class="list-group-item active" href="<?=$removeLink?>">
-          <span class="pull-right"><i class="fa fa-times"></i></span>
+          <span class="pull-right flip"><i class="fa fa-times"></i></span>
           <? if ($filter['operator'] == 'NOT') echo $this->transEsc('NOT') . ' '; if ($filter['operator'] == 'OR' && $i > 0) echo $this->transEsc('OR') . ' '; ?><?=$this->transEsc($field)?>: <?=$this->escapeHtml($filter['displayText'])?>
         </a>
       <? endforeach; ?>
@@ -166,7 +166,7 @@ JS;
                 <? if ($thisFacet['operator'] == 'OR'): ?>
                   <i class="fa fa-check-square-o"></i>
                 <? else: ?>
-                  <span class="pull-right"><i class="fa fa-check"></i></span>
+                  <span class="pull-right flip"><i class="fa fa-check"></i></span>
                 <? endif; ?>
                 <?=$this->escapeHtml($thisFacet['displayText'])?>
               </a>
diff --git a/themes/bootstrap3/templates/RecordDriver/SolrDefault/core.phtml b/themes/bootstrap3/templates/RecordDriver/SolrDefault/core.phtml
index accf40bcfaf..660a2660bb2 100644
--- a/themes/bootstrap3/templates/RecordDriver/SolrDefault/core.phtml
+++ b/themes/bootstrap3/templates/RecordDriver/SolrDefault/core.phtml
@@ -257,7 +257,7 @@
         <tr>
           <th><?=$this->transEsc('Tags')?>: </th>
           <td>
-            <a id="tagRecord" class="btn btn-link modal-link pull-right" href="<?=$this->recordLink()->getActionUrl($this->driver, 'AddTag')?>" title="<?=$this->transEsc('Add Tag')?>">
+            <a id="tagRecord" class="btn btn-link modal-link pull-right flip" href="<?=$this->recordLink()->getActionUrl($this->driver, 'AddTag')?>" title="<?=$this->transEsc('Add Tag')?>">
               <i class="fa fa-plus"></i> <?=$this->transEsc('Add Tag')?></a>
             </a>
             <?=$this->context($this)->renderInContext('record/taglist', array('tagList'=>$tagList, 'loggedin'=>$loggedin)) ?>
diff --git a/themes/bootstrap3/templates/RecordDriver/SolrDefault/list-entry.phtml b/themes/bootstrap3/templates/RecordDriver/SolrDefault/list-entry.phtml
index 22061423d20..c926d365746 100644
--- a/themes/bootstrap3/templates/RecordDriver/SolrDefault/list-entry.phtml
+++ b/themes/bootstrap3/templates/RecordDriver/SolrDefault/list-entry.phtml
@@ -15,7 +15,7 @@
   <? if ($cover): ?>
   <div class="col-xs-2 left">
   <? else: ?>
-  <div class="col-xs-1 left">
+  <div class="col-xs-1 left flip">
   <? endif ?>
     <label class="pull-left"><?=$this->record($this->driver)->getCheckbox() ?></label>
     <input type="hidden" value="<?=$id ?>" class="hiddenId"/>
diff --git a/themes/bootstrap3/templates/RecordTab/collectionlist.phtml b/themes/bootstrap3/templates/RecordTab/collectionlist.phtml
index e8b5b101bba..4478f08d32d 100644
--- a/themes/bootstrap3/templates/RecordTab/collectionlist.phtml
+++ b/themes/bootstrap3/templates/RecordTab/collectionlist.phtml
@@ -12,14 +12,14 @@
     <?=$this->recommend($current)?>
   <? endforeach; ?>
   <div class="clearfix hidden-print">
-    <div class="pull-left">
+    <div class="pull-left flip">
       <?=$this->transEsc("Showing")?>
       <strong><?=$this->localizedNumber($results->getStartRecord())?></strong> - <strong><?=$this->localizedNumber($results->getEndRecord())?></strong>
       <? if (!isset($this->skipTotalCount)): ?>
         <?=$this->transEsc('of')?> <strong><?=$this->localizedNumber($recordTotal)?></strong> <?=$this->transEsc('Items')?>
       <? endif; ?>
     </div>
-    <div class="pull-right">
+    <div class="pull-right flip">
       <?=$this->render('search/controls/limit.phtml', $searchDetails)?>
       <?=$this->render('search/controls/sort.phtml', $searchDetails)?>
     </div>
diff --git a/themes/bootstrap3/templates/browse/home.phtml b/themes/bootstrap3/templates/browse/home.phtml
index 4e6cf688239..6cd5d8095d9 100644
--- a/themes/bootstrap3/templates/browse/home.phtml
+++ b/themes/bootstrap3/templates/browse/home.phtml
@@ -15,7 +15,7 @@
     <? foreach ($this->browseOptions as $item=>$currentOption): ?>
       <a href="<?=$this->url('browse-' . strtolower($currentOption['action'])); ?>" class="list-group-item<? if($currentOption['action'] == $this->currentAction): ?> active<? endif; ?>">
         <?=$this->transEsc($currentOption['description']) ?>
-        <span class="pull-right"><i class="fa fa-angle-right"></i></span>
+        <span class="pull-right flip"><i class="fa fa-angle-right"></i></span>
       </a>
     <? endforeach; ?>
   </div>
@@ -26,7 +26,7 @@
         <a href="<?=$BROWSE_BASE ?>?findby=<?=urlencode($findby) ?>&query_field=<?=$this->browse()->getSolrField($findby, $this->currentAction) ?>" class="list-group-item clearfix<? if ($this->findby == $findby): ?> active<? endif; ?>">
           <? if(is_string($category)): ?>
             <?=$this->transEsc($category)?>
-            <span class="pull-right"><i class="fa fa-angle-right"></i></span>
+            <span class="pull-right flip"><i class="fa fa-angle-right"></i></span>
           <? else: ?>
             <?=$this->transEsc($category['text'])?>
             <span class="badge"><?=number_format($category['count'])?></span>
@@ -57,7 +57,7 @@
         <? if ($this->findby != 'alphabetical' && isset($secondary['count'])): ?>
           <span class="badge"><?=number_format($secondary['count']) ?></span>
         <? else: ?>
-          <span class="pull-right"><i class="fa fa-angle-right"></i></span>
+          <span class="pull-right flip"><i class="fa fa-angle-right"></i></span>
         <? endif; ?>
       </a>
       <? if($viewRecord): ?>
diff --git a/themes/bootstrap3/templates/cart/cart.phtml b/themes/bootstrap3/templates/cart/cart.phtml
index de25035b919..316749c140f 100644
--- a/themes/bootstrap3/templates/cart/cart.phtml
+++ b/themes/bootstrap3/templates/cart/cart.phtml
@@ -10,7 +10,7 @@
 <form class="form-inline" action="<?=$this->url('cart-home')?>" method="post"  name="cartForm">
   <? if (!$this->cart()->isEmpty()): ?>
     <div class="cart-controls clearfix">
-      <div class="checkbox pull-left">
+      <div class="checkbox pull-left flip">
         <label>
           <input type="checkbox" name="selectAll" class="checkbox-select-all"/>
           <?=$this->transEsc('select_page')?>
diff --git a/themes/bootstrap3/templates/combined/results-list.phtml b/themes/bootstrap3/templates/combined/results-list.phtml
index abbda2156e4..905c167b9bf 100644
--- a/themes/bootstrap3/templates/combined/results-list.phtml
+++ b/themes/bootstrap3/templates/combined/results-list.phtml
@@ -12,7 +12,7 @@
   $params->setLimit($limit);
 ?>
 <? if (isset($currentSearch['more_link']) && $currentSearch['more_link']): ?>
-  <div class="pull-right">
+  <div class="pull-right flip">
     <a href="<?=$moreUrl?>" class="btn btn-link"><i class="fa fa-gears"></i> <?=$this->transEsc('More options')?></a>
   </div>
   <h2><a href="<?=$moreUrl?>"><?=$this->transEsc($currentSearch['label'])?></a></h2>
@@ -23,7 +23,7 @@
   <p><i><?=$this->transEsc($currentSearch['sublabel'])?></i></p>
 <? endif; ?>
 <div class="clearfix">
-  <div class="pull-left help-block">
+  <div class="pull-left flip help-block">
     <? if ($recordTotal > 0): ?>
       <? foreach (($top = $results->getRecommendations('top')) as $current): ?>
         <?=$this->recommend($current)?>
diff --git a/themes/bootstrap3/templates/confirm/confirm.phtml b/themes/bootstrap3/templates/confirm/confirm.phtml
index 9e16e2262d1..66d461969a4 100644
--- a/themes/bootstrap3/templates/confirm/confirm.phtml
+++ b/themes/bootstrap3/templates/confirm/confirm.phtml
@@ -5,7 +5,7 @@
   <?=$this->flashmessages();?>
 
   <div id="popupDetails" class="confirmDialog">
-    <form class="pull-left" action="<?=$this->escapeHtmlAttr($this->confirm)?>" method="post">
+    <form class="pull-left flip" action="<?=$this->escapeHtmlAttr($this->confirm)?>" method="post">
       <? if (isset($this->extras)): ?>
         <? foreach ($this->extras as $extra=>$value): ?>
           <? if (is_array($value)): ?>
diff --git a/themes/bootstrap3/templates/devtools/language.phtml b/themes/bootstrap3/templates/devtools/language.phtml
index b20976836bf..5808ed9bf54 100644
--- a/themes/bootstrap3/templates/devtools/language.phtml
+++ b/themes/bootstrap3/templates/devtools/language.phtml
@@ -41,7 +41,7 @@
         <div class="accordion-heading">
           <a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion" href="#missing_<?=$langCode ?>">
             Missing From <?=$this->escapeHtml($diffs['name'])?> (<?=$this->escapeHtml($langCode)?>.ini)
-            <span class="pull-right"></span>
+            <span class="pull-right flip"></span>
           </a>
         </div>
         <div id="missing_<?=$langCode ?>" class="accordion-body collapse">
diff --git a/themes/bootstrap3/templates/header.phtml b/themes/bootstrap3/templates/header.phtml
index 40571101c53..6c79535439d 100644
--- a/themes/bootstrap3/templates/header.phtml
+++ b/themes/bootstrap3/templates/header.phtml
@@ -13,7 +13,7 @@
 <? endif; ?>
 <? if (!isset($this->layout()->renderingError)): ?>
   <div class="collapse navbar-collapse" id="header-collapse">
-    <ul role="navigation" class="nav navbar-nav navbar-right">
+    <ul role="navigation" class="nav navbar-nav navbar-right flip">
       <? if ($this->feedback()->tabEnabled()): ?>
         <li>
           <a id="feedbackLink" class="modal-link" href="<?=$this->url('feedback-home') ?>"><i class="fa fa-envelope"></i> <?=$this->transEsc("Feedback")?></a>
diff --git a/themes/bootstrap3/templates/layout/layout.phtml b/themes/bootstrap3/templates/layout/layout.phtml
index 2cc6cc6e76d..55f33615f2d 100644
--- a/themes/bootstrap3/templates/layout/layout.phtml
+++ b/themes/bootstrap3/templates/layout/layout.phtml
@@ -18,6 +18,10 @@
         )
       );
     ?>
+    <!-- RTL styling -->
+    <? if ($this->layout()->rtl) {
+      $this->headLink()->appendStylesheet('vendor/bootstrap-rtl.min.css');
+    } ?>
     <?=$this->headLink()?>
     <?=$this->headStyle()?>
     <?
diff --git a/themes/bootstrap3/templates/myresearch/checkedout.phtml b/themes/bootstrap3/templates/myresearch/checkedout.phtml
index a0dfe40e182..212a0225b37 100644
--- a/themes/bootstrap3/templates/myresearch/checkedout.phtml
+++ b/themes/bootstrap3/templates/myresearch/checkedout.phtml
@@ -44,7 +44,7 @@
         <? endif; ?>
         <? if (isset($ilsDetails['renewable']) && $ilsDetails['renewable'] && isset($ilsDetails['renew_details'])): ?>
           <? $safeId = preg_replace('/[^a-zA-Z0-9]/', '', $ilsDetails['renew_details']); ?>
-          <input class="pull-left" type="hidden" name="renewAllIDS[]" value="<?=$this->escapeHtmlAttr($ilsDetails['renew_details'])?>" />
+          <input class="pull-left flip" type="hidden" name="renewAllIDS[]" value="<?=$this->escapeHtmlAttr($ilsDetails['renew_details'])?>" />
         <? endif; ?>
       <? endforeach; ?>
 
@@ -55,8 +55,8 @@
           <? if ($this->renewForm): ?>
             <? if (isset($ilsDetails['renewable']) && $ilsDetails['renewable'] && isset($ilsDetails['renew_details'])): ?>
               <? $safeId = preg_replace('/[^a-zA-Z0-9]/', '', $ilsDetails['renew_details']); ?>
-              <input class="pull-left" type="checkbox" name="renewSelectedIDS[]" value="<?=$this->escapeHtmlAttr($ilsDetails['renew_details'])?>" id="checkbox_<?=$safeId?>" />
-              <input class="pull-left" type="hidden" name="renewAllIDS[]" value="<?=$this->escapeHtmlAttr($ilsDetails['renew_details'])?>" />
+              <input class="pull-left flip" type="checkbox" name="renewSelectedIDS[]" value="<?=$this->escapeHtmlAttr($ilsDetails['renew_details'])?>" id="checkbox_<?=$safeId?>" />
+              <input class="pull-left flip" type="hidden" name="renewAllIDS[]" value="<?=$this->escapeHtmlAttr($ilsDetails['renew_details'])?>" />
             <? endif; ?>
           <? endif; ?>
 
diff --git a/themes/bootstrap3/templates/myresearch/illrequests.phtml b/themes/bootstrap3/templates/myresearch/illrequests.phtml
index e1bce412b01..2fe75afa400 100644
--- a/themes/bootstrap3/templates/myresearch/illrequests.phtml
+++ b/themes/bootstrap3/templates/myresearch/illrequests.phtml
@@ -47,7 +47,7 @@
           <? if ($this->cancelForm && isset($ilsDetails['cancel_details'])): ?>
             <? $safeId = preg_replace('/[^a-zA-Z0-9]/', '', $resource->getUniqueId()); ?>
             <input type="hidden" name="cancelAllIDS[]" value="<?=$this->escapeHtmlAttr($ilsDetails['cancel_details']) ?>" />
-            <div class="pull-left">
+            <div class="pull-left flip">
               <input type="checkbox" name="cancelSelectedIDS[]" value="<?=$this->escapeHtmlAttr($ilsDetails['cancel_details']) ?>" id="checkbox_<?=$safeId?>" />
             </div>
           <? endif; ?>
diff --git a/themes/bootstrap3/templates/myresearch/menu.phtml b/themes/bootstrap3/templates/myresearch/menu.phtml
index 7708de9b4cb..d56da0d5d19 100644
--- a/themes/bootstrap3/templates/myresearch/menu.phtml
+++ b/themes/bootstrap3/templates/myresearch/menu.phtml
@@ -3,61 +3,61 @@
   <? if ($this->userlist()->getMode() !== 'disabled'): ?>
     <a href="<?=$this->url('myresearch-favorites')?>" class="list-group-item<?=$this->active == 'favorites' ? ' active' : ''?>">
       <?=$this->transEsc('Favorites')?>
-      <span class="pull-right"><i class="fa fa-fw fa-star"></i></span>
+      <span class="pull-right flip"><i class="fa fa-fw fa-star"></i></span>
     </a>
   <? endif; ?>
   <? if ('ils-none' !== $this->ils()->getOfflineMode()): ?>
     <? if ($this->ils()->checkCapability('getMyTransactions')): ?>
       <a href="<?=$this->url('myresearch-checkedout')?>" class="list-group-item<?=$this->active == 'checkedout' ? ' active' : ''?>">
         <?=$this->transEsc('Checked Out Items')?>
-        <span class="pull-right"><i class="fa fa-fw fa-book"></i></span>
+        <span class="pull-right flip"><i class="fa fa-fw fa-book"></i></span>
       </a>
     <? endif; ?>
     <? if ($this->ils()->checkCapability('getMyHolds')): ?>
       <a href="<?=$this->url('myresearch-holds')?>" class="list-group-item<?=$this->active == 'holds' ? ' active' : ''?>">
         <?=$this->transEsc('Holds and Recalls')?>
-        <span class="pull-right"><i class="fa fa-fw fa-flag"></i></span>
+        <span class="pull-right flip"><i class="fa fa-fw fa-flag"></i></span>
       </a>
     <? endif; ?>
     <? if ($this->ils()->checkFunction('StorageRetrievalRequests')): ?>
       <a href="<?=$this->url('myresearch-storageretrievalrequests')?>" class="list-group-item<?=$this->active == 'storageRetrievalRequests' ? ' active' : ''?>">
         <?=$this->transEsc('Storage Retrieval Requests')?>
-        <span class="pull-right"><i class="fa fa-fw fa-archive"></i></span>
+        <span class="pull-right flip"><i class="fa fa-fw fa-archive"></i></span>
       </a>
     <? endif; ?>
     <? if ($this->ils()->checkFunction('ILLRequests')): ?>
     <a href="<?=$this->url('myresearch-illrequests')?>" class="list-group-item<?=$this->active == 'ILLRequests' ? ' active' : ''?>">
       <?=$this->transEsc('Interlibrary Loan Requests')?>
-      <span class="pull-right"><i class="fa fa-fw fa-exchange"></i></span>
+      <span class="pull-right flip"><i class="fa fa-fw fa-exchange"></i></span>
     </a>
     <? endif; ?>
     <? if ($this->ils()->checkCapability('getMyFines')): ?>
       <a href="<?=$this->url('myresearch-fines')?>" class="list-group-item<?=$this->active == 'fines' ? ' active' : ''?>">
         <?=$this->transEsc('Fines')?>
-        <span class="pull-right"><i class="fa fa-fw fa-usd"></i></span>
+        <span class="pull-right flip"><i class="fa fa-fw fa-usd"></i></span>
       </a>
     <? endif; ?>
     <? if ($this->ils()->checkCapability('getMyProfile')): ?>
       <a href="<?=$this->url('myresearch-profile')?>" class="list-group-item<?=$this->active == 'profile' ? ' active' : ''?>">
         <?=$this->transEsc('Profile')?>
-        <span class="pull-right"><i class="fa fa-fw fa-user"></i></span>
+        <span class="pull-right flip"><i class="fa fa-fw fa-user"></i></span>
       </a>
     <? endif; ?>
     <? $user = $this->auth()->isLoggedIn(); if ($user && $user->libraryCardsEnabled()): ?>
       <a href="<?=$this->url('librarycards-home')?>" class="list-group-item<?=$this->active == 'librarycards' ? ' active' : ''?>">
         <?=$this->transEsc('Library Cards')?>
-        <span class="pull-right"><i class="fa fa-fw fa-barcode"></i></span>
+        <span class="pull-right flip"><i class="fa fa-fw fa-barcode"></i></span>
       </a>
     <? endif; ?>
   <? endif; ?>
   <a href="<?=$this->url('search-history')?>?require_login" class="list-group-item<?=$this->active == 'history' ? ' active' : ''?>">
     <?=$this->transEsc('history_saved_searches')?>
-    <span class="pull-right"><i class="fa fa-fw fa-search"></i></span>
+    <span class="pull-right flip"><i class="fa fa-fw fa-search"></i></span>
   </a>
   <? if ($user = $this->auth()->isLoggedIn()): ?>
     <a href="<?=$this->url('myresearch-logout')?>" class="list-group-item">
       <?=$this->transEsc("Log Out")?>
-      <span class="pull-right"><i class="fa fa-fw fa-sign-out"></i></span>
+      <span class="pull-right flip"><i class="fa fa-fw fa-sign-out"></i></span>
     </a>
   <? endif; ?>
 </div>
@@ -66,7 +66,7 @@
   <div class="list-group">
     <a href="<?=$this->url('myresearch-changepassword') ?>" class="list-group-item<?=$this->active == 'newpassword' ? ' active' : ''?>">
       <?=$this->transEsc('Change Password') ?>
-      <span class="pull-right"><i class="fa fa-fw fa-lock"></i></span>
+      <span class="pull-right flip"><i class="fa fa-fw fa-lock"></i></span>
     </a>
   </div>
 <? endif; ?>
@@ -75,7 +75,7 @@
   <div class="list-group">
     <a href="<?=$this->url('myresearch-favorites')?>" class="list-group-item<?=$this->active == 'favorites' ? ' active' : ''?>">
       <?=$this->transEsc('Your Favorites')?>
-      <span class="pull-right"><i class="fa fa-fw fa-star"></i></span>
+      <span class="pull-right flip"><i class="fa fa-fw fa-star"></i></span>
     </a>
     <? $lists = $user->getLists() ?>
     <? foreach ($lists as $list): ?>
@@ -86,7 +86,7 @@
     <? endforeach; ?>
     <a href="<?=$this->url('editList', array('id'=>'NEW'))?>" title="<?=$this->transEsc('Create a List') ?>" class="list-group-item">
       <?=$this->transEsc('Create a List') ?>
-      <span class="pull-right"><i class="fa fa-fw fa-plus"></i></span>
+      <span class="pull-right flip"><i class="fa fa-fw fa-plus"></i></span>
     </a>
   </div>
 <? endif ?>
diff --git a/themes/bootstrap3/templates/myresearch/mylist.phtml b/themes/bootstrap3/templates/myresearch/mylist.phtml
index 8b560ec2e08..42bee9020da 100644
--- a/themes/bootstrap3/templates/myresearch/mylist.phtml
+++ b/themes/bootstrap3/templates/myresearch/mylist.phtml
@@ -24,8 +24,8 @@
 <div class="row">
   <div class="<?=$this->layoutClass('mainbody')?>">
     <div class="clearfix hidden-print">
-      <h2 class="pull-left"><?=$list ? $this->escapeHtml($list->title) : $this->transEsc("Your Favorites")?></h2>
-      <div class="pull-right">
+      <h2 class="pull-left flip"><?=$list ? $this->escapeHtml($list->title) : $this->transEsc("Your Favorites")?></h2>
+      <div class="pull-right flip">
         <? if (isset($list)): ?>
           <? if ($list->editAllowed($account->isLoggedIn())): ?>
             <a href="<?=$this->url('editList', array('id' => $list->id)) ?>" class="btn btn-link" title="<?=$this->transEsc("edit_list")?>"><i class="fa fa-edit"></i> <?=$this->transEsc("edit_list")?></a>
@@ -51,7 +51,7 @@
   <? endif; ?>
     <? if ($recordTotal > 0): ?>
       <div class="resulthead">
-        <div class="pull-right">
+        <div class="pull-right flip">
           <?=$this->render('search/controls/sort.phtml')?>
         </div>
       </div>
diff --git a/themes/bootstrap3/templates/myresearch/storageretrievalrequests.phtml b/themes/bootstrap3/templates/myresearch/storageretrievalrequests.phtml
index d0b1c918187..500bf3024a8 100644
--- a/themes/bootstrap3/templates/myresearch/storageretrievalrequests.phtml
+++ b/themes/bootstrap3/templates/myresearch/storageretrievalrequests.phtml
@@ -45,7 +45,7 @@
           <? if ($this->cancelForm && isset($ilsDetails['cancel_details'])): ?>
             <? $safeId = preg_replace('/[^a-zA-Z0-9]/', '', $resource->getUniqueId()); ?>
             <input type="hidden" name="cancelAllIDS[]" value="<?=$this->escapeHtmlAttr($ilsDetails['cancel_details']) ?>" />
-            <div class="pull-left">
+            <div class="pull-left flip">
               <input type="checkbox" name="cancelSelectedIDS[]" value="<?=$this->escapeHtmlAttr($ilsDetails['cancel_details']) ?>" id="checkbox_<?=$safeId?>" />
             </div>
           <? endif; ?>
diff --git a/themes/bootstrap3/templates/search/advanced/layout.phtml b/themes/bootstrap3/templates/search/advanced/layout.phtml
index 15cda3b2829..d83a38967a8 100644
--- a/themes/bootstrap3/templates/search/advanced/layout.phtml
+++ b/themes/bootstrap3/templates/search/advanced/layout.phtml
@@ -65,8 +65,8 @@
     <div class="<?=$this->layoutClass('mainbody')?>">
       <input type="hidden" name="sort" value="relevance">
       <div class="clearfix">
-        <h2 class="pull-left"><?=$this->transEsc('Advanced Search')?></h2>
-        <div id="groupJoin" class="form-inline pull-right">
+        <h2 class="pull-left flip"><?=$this->transEsc('Advanced Search')?></h2>
+        <div id="groupJoin" class="form-inline pull-right flip">
           <label for="groupJoinOptions"><?=$this->transEsc("search_match")?>:</label>
           <select id="groupJoinOptions" name="join" class="form-control">
             <option value="AND"<? if($searchDetails && $searchDetails->getOperator()=='ALL'):?> selected<?endif?>><?= $this->transEsc('group_AND') ?></option>
@@ -141,13 +141,13 @@
       </div>
       <div class="clearfix">
         <input class="btn btn-default clear-btn" type="button" value="<?= $this->transEsc('Clear')?>">
-        <input class="btn btn-primary pull-right" type="submit" value="<?= $this->transEsc('Find')?>">
+        <input class="btn btn-primary pull-right flip" type="submit" value="<?= $this->transEsc('Find')?>">
       </div>
       <? if (isset($this->extraAdvancedControls)): ?>
         <?=$this->extraAdvancedControls ?>
         <div class="clearfix">
           <input class="btn btn-default clear-btn" type="button" value="<?= $this->transEsc('Clear')?>">
-          <input class="btn btn-primary pull-right" type="submit" value="<?= $this->transEsc('Find')?>">
+          <input class="btn btn-primary pull-right flip" type="submit" value="<?= $this->transEsc('Find')?>">
         </div>
       <? endif; ?>
     </div>
diff --git a/themes/bootstrap3/templates/search/reservessearch.phtml b/themes/bootstrap3/templates/search/reservessearch.phtml
index 80ebaffb142..02a1ee675fb 100644
--- a/themes/bootstrap3/templates/search/reservessearch.phtml
+++ b/themes/bootstrap3/templates/search/reservessearch.phtml
@@ -20,7 +20,7 @@
     <script type="text/javascript">$("#reservesSearchForm_lookfor").focus()</script>
 
     <div class="resulthead">
-      <div class="pull-left">
+      <div class="pull-left flip">
         <? if (($recordTotal = $this->results->getResultTotal()) > 0): ?>
           <?=$this->transEsc("Showing")?>
           <strong><?=$this->localizedNumber($this->results->getStartRecord())?></strong> - <strong><?=$this->localizedNumber($this->results->getEndRecord())?></strong>
@@ -32,7 +32,7 @@
         <? endif; ?>
       </div>
 
-      <div class="pull-right">
+      <div class="pull-right flip">
         <?=$this->render('search/controls/sort.phtml')?>
       </div>
     </div>
diff --git a/themes/bootstrap3/templates/search/searchbox.phtml b/themes/bootstrap3/templates/search/searchbox.phtml
index 3bef0e32beb..91f6dbe63fd 100644
--- a/themes/bootstrap3/templates/search/searchbox.phtml
+++ b/themes/bootstrap3/templates/search/searchbox.phtml
@@ -18,7 +18,7 @@
     $lastLimit = $options->getLastLimit();
 ?>
 <? if ($this->searchType == 'advanced'): ?>
-  <div id="searchForm" class="navbar-form navbar-left">
+  <div id="searchForm" class="navbar-form navbar-left flip">
     <? $tabs = $this->render('search/searchTabs'); ?>
     <? if (!empty($tabs)): ?><?=$tabs ?><div class="tab-content clearfix"><? endif; ?>
       <p class="adv_search_terms"><?=$this->transEsc("Your search terms")?> : "<strong><?=$this->escapeHtml($this->lookfor)?></strong>"</p>
@@ -30,7 +30,7 @@
     <? if (!empty($tabs)): ?></div><? endif; ?>
   </div>
 <? else: ?>
-  <form role="search" class="navbar-form navbar-left" method="get" action="<?=$this->url($basicSearch)?>" name="searchForm" id="searchForm" autocomplete="off">
+  <form role="search" class="navbar-form navbar-left flip" method="get" action="<?=$this->url($basicSearch)?>" name="searchForm" id="searchForm" autocomplete="off">
     <?= $this->render('search/searchTabs'); ?>
     <input class="form-control search-query<? if($this->searchbox()->autocompleteEnabled($this->searchClassId)):?> autocomplete searcher:<?=$this->escapeHtmlAttr($this->searchClassId) ?><? endif ?>" id="searchForm_lookfor" type="text" name="lookfor" value="<?=$this->escapeHtmlAttr($this->lookfor)?>"/>
     <? if ($handlerCount > 1): ?>
diff --git a/themes/bootstrap3/templates/vudl/techinfo.phtml b/themes/bootstrap3/templates/vudl/techinfo.phtml
index 5df2867dbae..1a2de431b36 100644
--- a/themes/bootstrap3/templates/vudl/techinfo.phtml
+++ b/themes/bootstrap3/templates/vudl/techinfo.phtml
@@ -26,9 +26,9 @@
               'type'=>strtoupper($key)
             )
           )?>?download=true">
-            <span class="pull-left"><?=strToUpper($this->transEsc($key)) ?></span>
+            <span class="pull-left flip"><?=strToUpper($this->transEsc($key)) ?></span>
             <? if (isset($this->record['mimetypes'])): ?>
-              <span class="pull-right small"><?=$this->record['mimetypes'][$mtKey] ?></span>
+              <span class="pull-right flip small"><?=$this->record['mimetypes'][$mtKey] ?></span>
             <? endif; ?>
           </a>
         <? endforeach; ?>
-- 
GitLab