changeset 6355:acfe79f23961

style: introduce Bootstrap compatible form-inline markup Based on work by Dominik Ruf.
author Mads Kiilerich <mads@kiilerich.com>
date Sun, 04 Dec 2016 22:53:37 +0100
parents cf3cc1fa4222
children a79e651306e2
files kallithea/public/css/style.css kallithea/templates/admin/admin.html kallithea/templates/admin/my_account/my_account_api_keys.html kallithea/templates/admin/permissions/permissions_globals.html kallithea/templates/admin/settings/settings_hooks.html kallithea/templates/admin/users/user_edit_api_keys.html kallithea/templates/changelog/changelog.html kallithea/templates/files/files_add.html kallithea/templates/files/files_edit.html kallithea/templates/journal/journal.html kallithea/templates/summary/summary.html
diffstat 11 files changed, 25 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
--- a/kallithea/public/css/style.css	Sun Dec 04 22:53:36 2016 +0100
+++ b/kallithea/public/css/style.css	Sun Dec 04 22:53:37 2016 +0100
@@ -900,6 +900,12 @@
     background-color: #F5F5F5 !important;
 }
 
+#content div.panel div.form div.form-horizontal div.form-group > div.form-inline,
+#content div.panel div.form div.form-horizontal div.form-group > div.form-inline,
+#content div.panel div.form div.form-horizontal div.form-group > div.form-inline {
+    display: inline;
+}
+
 #content div.panel div.form div.form-horizontal div.form-group > div select.form-control,
 #content div.panel div.form div.form-horizontal div.form-group > div div.form-control.select2-container,
 #content div.panel div.form div.form-horizontal div.form-group > div input.form-control {
@@ -907,6 +913,12 @@
     margin: 5px 0 10px;
 }
 
+#content div.panel div.form div.form-horizontal div.form-group > div.form-inline select.form-control,
+#content div.panel div.form div.form-horizontal div.form-group > div.form-inline div.form-control.select2-container,
+#content div.panel div.form div.form-horizontal div.form-group > div.form-inline input.form-control {
+    width: inherit;
+}
+
 #content div.panel div.form div.form-horizontal div.form-group > div input.date {
     width: 177px;
 }
--- a/kallithea/templates/admin/admin.html	Sun Dec 04 22:53:36 2016 +0100
+++ b/kallithea/templates/admin/admin.html	Sun Dec 04 22:53:37 2016 +0100
@@ -6,7 +6,7 @@
 </%block>
 
 <%def name="breadcrumbs_links()">
-    <form id="filter_form">
+    <form id="filter_form" class="form-inline">
     <input class="q_filter_box ${'' if c.search_term else 'initial'}" id="j_filter" size="15" type="text" name="filter" value="${c.search_term or _('journal filter...')}"/>
     <span data-toggle="tooltip" title="${h.journal_filter_help()}">?</span>
     <input type='submit' value="${_('Filter')}" class="btn btn-default btn-xs"/>
--- a/kallithea/templates/admin/my_account/my_account_api_keys.html	Sun Dec 04 22:53:36 2016 +0100
+++ b/kallithea/templates/admin/my_account/my_account_api_keys.html	Sun Dec 04 22:53:37 2016 +0100
@@ -58,7 +58,7 @@
         <div class="form-horizontal">
             <div class="form-group">
                 <label for="description">${_('New API key')}:</label>
-                <div>
+                <div class="form-inline">
                     ${h.text('description', class_='form-control', placeholder=_('Description'))}
                     ${h.select('lifetime', '', c.lifetime_options)}
                 </div>
--- a/kallithea/templates/admin/permissions/permissions_globals.html	Sun Dec 04 22:53:36 2016 +0100
+++ b/kallithea/templates/admin/permissions/permissions_globals.html	Sun Dec 04 22:53:37 2016 +0100
@@ -13,7 +13,7 @@
             </div>
             <div class="form-group">
                 <label class="control-label" for="default_repo_perm">${_('Repository')}:</label>
-                <div>
+                <div class="form-inline">
                     ${h.select('default_repo_perm','',c.repo_perms_choices)}
                     ${h.checkbox('overwrite_default_repo','true')}
                     <label for="overwrite_default_repo">
@@ -25,7 +25,7 @@
             </div>
             <div class="form-group">
                 <label class="control-label" for="default_group_perm">${_('Repository group')}:</label>
-                <div>
+                <div class="form-inline">
                     ${h.select('default_group_perm','',c.group_perms_choices)}
                     ${h.checkbox('overwrite_default_group','true')}
                     <label for="overwrite_default_group">
@@ -37,7 +37,7 @@
             </div>
             <div class="form-group">
                 <label class="control-label" for="default_user_group_perm">${_('User group')}:</label>
-                <div>
+                <div class="form-inline">
                     ${h.select('default_user_group_perm','',c.user_group_perms_choices)}
                     ${h.checkbox('overwrite_default_user_group','true')}
                     <label for="overwrite_default_user_group">
--- a/kallithea/templates/admin/settings/settings_hooks.html	Sun Dec 04 22:53:36 2016 +0100
+++ b/kallithea/templates/admin/settings/settings_hooks.html	Sun Dec 04 22:53:37 2016 +0100
@@ -20,7 +20,7 @@
     <div class="form-horizontal">
 
         %for hook in c.custom_hooks:
-            <div class="form-group" id="${'id%s' % hook.ui_id }">
+            <div class="form-group form-inline" id="${'id%s' % hook.ui_id }">
                 <label class="control-label" for="${hook.ui_key}">${hook.ui_key}</label>
                 <div style="margin-left:280px">
                     ${h.hidden('hook_ui_key',hook.ui_key)}
@@ -35,7 +35,7 @@
             </div>
         %endfor
 
-        <div class="form-group">
+        <div class="form-group form-inline">
             <label>
                 ${h.text('new_hook_ui_key',size=20)}
             </label>
--- a/kallithea/templates/admin/users/user_edit_api_keys.html	Sun Dec 04 22:53:36 2016 +0100
+++ b/kallithea/templates/admin/users/user_edit_api_keys.html	Sun Dec 04 22:53:37 2016 +0100
@@ -58,7 +58,7 @@
         <div class="form-horizontal">
             <div class="form-group">
                 <label class="control-label" for="description">${_('New API key')}:</label>
-                <div>
+                <div class="form-inline">
                     ${h.text('description', class_='form-control', placeholder=_('Description'))}
                     ${h.select('lifetime', '', c.lifetime_options)}
                 </div>
--- a/kallithea/templates/changelog/changelog.html	Sun Dec 04 22:53:36 2016 +0100
+++ b/kallithea/templates/changelog/changelog.html	Sun Dec 04 22:53:37 2016 +0100
@@ -38,7 +38,7 @@
                 <div style="overflow:auto; ${'display:none' if c.changelog_for_path else ''}">
                     <div class="container_header">
                         <div style="float:left; margin-left:20px;">
-                            ${h.form(h.url.current(),method='get',style="display:inline")}
+                            ${h.form(h.url.current(),method='get',class_="form-inline")}
                                 ${h.submit('set',_('Show'),class_="btn btn-default btn-sm")}
                                 ${h.text('size',size=3,value=c.size)}
                                 ${_('revisions')}
--- a/kallithea/templates/files/files_add.html	Sun Dec 04 22:53:36 2016 +0100
+++ b/kallithea/templates/files/files_add.html	Sun Dec 04 22:53:37 2016 +0100
@@ -35,7 +35,7 @@
     </div>
     <div class="table" id="edit">
         <div id="files_data">
-          ${h.form(h.url.current(),method='post',id='eform',enctype="multipart/form-data", class_="form-horizontal")}
+          ${h.form(h.url.current(),method='post',id='eform',enctype="multipart/form-data", class_="form-horizontal form-inline")}
           <h3 class="files_location">
             ${_('Location')}: ${h.files_breadcrumbs(c.repo_name,c.cs.raw_id,c.f_path)} /
               <span id="filename_container" class="file reviewer_ac">
--- a/kallithea/templates/files/files_edit.html	Sun Dec 04 22:53:36 2016 +0100
+++ b/kallithea/templates/files/files_edit.html	Sun Dec 04 22:53:37 2016 +0100
@@ -36,7 +36,7 @@
     <div class="table" id="edit">
         <div id="files_data">
             <h3 class="files_location">${_('Location')}: ${h.files_breadcrumbs(c.repo_name,c.cs.raw_id,c.file.path)}</h3>
-            ${h.form(h.url.current(),method='post',id='eform')}
+            ${h.form(h.url.current(),method='post',id='eform',class_='form-inline')}
             <div id="body" class="codeblock">
             <div class="code-header">
                 <div class="stats">
--- a/kallithea/templates/journal/journal.html	Sun Dec 04 22:53:36 2016 +0100
+++ b/kallithea/templates/journal/journal.html	Sun Dec 04 22:53:37 2016 +0100
@@ -5,7 +5,7 @@
 </%block>
 <%def name="breadcrumbs()">
     <h5>
-    <form id="filter_form">
+    <form id="filter_form" class="form-inline">
     <input class="q_filter_box ${'' if c.search_term else 'initial'}" id="j_filter" size="15" type="text" name="filter" value="${c.search_term or _('quick filter...')}"/>
     <span data-toggle="tooltip" title="${h.journal_filter_help()}">?</span>
     <input type='submit' value="${_('Filter')}" class="btn btn-default btn-xs"/>
--- a/kallithea/templates/summary/summary.html	Sun Dec 04 22:53:36 2016 +0100
+++ b/kallithea/templates/summary/summary.html	Sun Dec 04 22:53:37 2016 +0100
@@ -67,7 +67,7 @@
     <!-- end box / title -->
     <div class="form">
         <div id="summary" class="form-horizontal">
-            <div class="form-group clearfix">
+            <div class="form-group form-inline clearfix">
               <label>${_('Clone URL')}:</label>
                 <div class="${summary(c.show_stats)}">
                   ${self.repotag(c.db_repo)}