changeset 6834:19f40a5088d4

templates: don't abuse elements as links or buttons Bootstrap recommends using <button>, so most of the time we should use that. Except if we don't want the additional padding of a button (like for the expand 'button' on the changelog page).
author domruf <dominikruf@gmail.com>
date Tue, 27 Jun 2017 21:49:33 +0200
parents 3c1cdd1c1736
children 2f35bd7b97aa
files kallithea/public/css/style.css kallithea/templates/admin/repo_groups/repo_group_edit_perms.html kallithea/templates/admin/repos/repo_edit_permissions.html kallithea/templates/admin/user_groups/user_group_edit_perms.html kallithea/templates/changeset/diff_block.html kallithea/templates/pullrequests/pullrequest_data.html
diffstat 6 files changed, 10 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/kallithea/public/css/style.css	Thu Aug 24 02:50:04 2017 +0200
+++ b/kallithea/public/css/style.css	Tue Jun 27 21:49:33 2017 +0200
@@ -2179,6 +2179,11 @@
     background-image: none;
 }
 
+/* use our link color for btn-link */
+.btn-link {
+    color: #577632;
+}
+
 ins, div.options a:hover {
     text-decoration: none;
 }
@@ -2978,12 +2983,6 @@
     margin-bottom: 15px;
 }
 
-.diff-collapse-button {
-    cursor: pointer;
-    color: #666;
-    font-size: 16px;
-}
-
 table.code-difftable {
     border-collapse: collapse;
     border-radius: 0px !important;
--- a/kallithea/templates/admin/repo_groups/repo_group_edit_perms.html	Thu Aug 24 02:50:04 2017 +0200
+++ b/kallithea/templates/admin/repo_groups/repo_group_edit_perms.html	Tue Jun 27 21:49:33 2017 +0200
@@ -77,7 +77,7 @@
                 <tr class="new_members last_new_member" id="add_perm_input"><td colspan="6"></td></tr>
                 <tr>
                     <td colspan="6">
-                        <button type="button" id="add_perm" class="btn btn-default btn-xs">
+                        <button type="button" id="add_perm" class="btn btn-link btn-xs">
                             <i class="icon-plus"></i> ${_('Add new')}
                         </button>
                     </td>
--- a/kallithea/templates/admin/repos/repo_edit_permissions.html	Thu Aug 24 02:50:04 2017 +0200
+++ b/kallithea/templates/admin/repos/repo_edit_permissions.html	Tue Jun 27 21:49:33 2017 +0200
@@ -73,7 +73,7 @@
                 <tr class="new_members last_new_member" id="add_perm_input"><td colspan="6"></td></tr>
                 <tr>
                     <td colspan="6">
-                        <button type="button" id="add_perm" class="btn btn-default btn-xs">
+                        <button type="button" id="add_perm" class="btn btn-link btn-xs">
                             <i class="icon-plus"></i> ${_('Add new')}
                         </button>
                     </td>
--- a/kallithea/templates/admin/user_groups/user_group_edit_perms.html	Thu Aug 24 02:50:04 2017 +0200
+++ b/kallithea/templates/admin/user_groups/user_group_edit_perms.html	Tue Jun 27 21:49:33 2017 +0200
@@ -77,7 +77,7 @@
                 <tr class="new_members last_new_member" id="add_perm_input"><td colspan="6"></td></tr>
                 <tr>
                     <td colspan="6">
-                        <button id="add_perm" class="btn btn-default btn-xs">
+                        <button id="add_perm" class="btn btn-link btn-xs">
                             <i class="icon-plus"></i> ${_('Add new')}
                         </button>
                     </td>
--- a/kallithea/templates/changeset/diff_block.html	Thu Aug 24 02:50:04 2017 +0200
+++ b/kallithea/templates/changeset/diff_block.html	Tue Jun 27 21:49:33 2017 +0200
@@ -4,7 +4,7 @@
                        cs_repo_name, cs_ref_name, cs_ref_type, cs_rev,
                        file_diff_data)">
 <div class="diff-collapse">
-    <span data-target="${'diff-container-%s' % (id(file_diff_data))}" class="diff-collapse-button">&uarr; ${_('Collapse Diff')} &uarr;</span>
+    <button data-target="${'diff-container-%s' % (id(file_diff_data))}" class="diff-collapse-button btn btn-link btn-sm">&uarr; ${_('Collapse Diff')} &uarr;</button>
 </div>
 %for id_fid, url_fid, op, a_filename, cs_filename, diff, stats in file_diff_data:
     ${diff_block_diffblock(id_fid, url_fid, op, diff,
--- a/kallithea/templates/pullrequests/pullrequest_data.html	Thu Aug 24 02:50:04 2017 +0200
+++ b/kallithea/templates/pullrequests/pullrequest_data.html	Tue Jun 27 21:49:33 2017 +0200
@@ -61,7 +61,7 @@
       <td>
         %if pr.owner_id == request.authuser.user_id:
           ${h.form(url('pullrequest_delete', repo_name=pr.other_repo.repo_name, pull_request_id=pr.pull_request_id))}
-          <button type="button" class="btn btn-default btn-xs"
+          <button type="button" class="btn btn-link btn-xs"
                   id="remove_${pr.pull_request_id}"
                   name="remove_${pr.pull_request_id}"
                   title="${_('Delete Pull Request')}"