changeset 7934:867963eba064

front-end: tweak display of select2 - both in settings and Summary Download options New version needs slightly different hacking ...
author Mads Kiilerich <mads@kiilerich.com>
date Mon, 21 Oct 2019 01:46:44 +0200
parents 8c9ae802929a
children c225c37c069d
files kallithea/front-end/kallithea-select2.less kallithea/templates/summary/summary.html
diffstat 2 files changed, 12 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/kallithea/front-end/kallithea-select2.less	Mon Oct 21 01:00:46 2019 +0200
+++ b/kallithea/front-end/kallithea-select2.less	Mon Oct 21 01:46:44 2019 +0200
@@ -26,6 +26,12 @@
   }
 }
 
+.select2-chosen,
+.select2-choice > span:first-child,
+.select2-container .select2-choices .select2-search-field input {
+    padding: 0 12px;
+}
+
 // Style these like Bootstrap .dropdown-menu
 .branch-switcher-dropdown.select2-drop.select2-drop-active,
 .repo-switcher-dropdown.select2-drop.select2-drop-active {
@@ -66,3 +72,7 @@
 .select2-container.input-sm input {
   .input-sm;
 }
+
+.form-inline .select2-container.form-control {
+  display: inline-block;
+}
--- a/kallithea/templates/summary/summary.html	Mon Oct 21 01:00:46 2019 +0200
+++ b/kallithea/templates/summary/summary.html	Mon Oct 21 01:46:44 2019 +0200
@@ -104,7 +104,7 @@
 
             <div class="form-group">
               <label>${_('Download')}:</label>
-              <div>
+              <div class="form-inline">
                 %if len(c.db_repo_scm_instance.revisions) == 0:
                   ${_('There are no downloads yet')}
                 %elif not c.enable_downloads:
@@ -116,7 +116,7 @@
                     <span id="${'zip_link'}">
                         <a class="btn btn-default btn-sm" href="${h.url('files_archive_home',repo_name=c.db_repo.repo_name,fname='tip.zip')}"><i class="icon-file-zip"></i>${_('Download as zip')}</a>
                     </span>
-                    ${h.hidden('download_options')}
+                    ${h.hidden('download_options', class_='form-control')}
                     <span>
                       <label data-toggle="tooltip" title="${_('Check this to download archive with subrepos')}">
                           <input id="archive_subrepos" type="checkbox" name="subrepos" />