Changeset - 19f40a5088d4
[Not reviewed]
default
0 6 0
domruf - 8 years ago 2017-06-27 21:49:33
dominikruf@gmail.com
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).
6 files changed with 10 insertions and 11 deletions:
0 comments (0 inline, 0 general)
kallithea/public/css/style.css
Show inline comments
 
@@ -2179,6 +2179,11 @@ body .btn.btn-default:hover {
 
    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 @@ input.perm_filter {
 
    margin-bottom: 15px;
 
}
 

	
 
.diff-collapse-button {
 
    cursor: pointer;
 
    color: #666;
 
    font-size: 16px;
 
}
 

	
 
table.code-difftable {
 
    border-collapse: collapse;
 
    border-radius: 0px !important;
kallithea/templates/admin/repo_groups/repo_group_edit_perms.html
Show inline comments
 
@@ -77,7 +77,7 @@ ${h.form(url('edit_repo_group_perms', gr
 
                <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>
kallithea/templates/admin/repos/repo_edit_permissions.html
Show inline comments
 
@@ -73,7 +73,7 @@ ${h.form(url('edit_repo_perms_update', r
 
                <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>
kallithea/templates/admin/user_groups/user_group_edit_perms.html
Show inline comments
 
@@ -77,7 +77,7 @@ ${h.form(url('edit_user_group_perms_upda
 
                <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>
kallithea/templates/changeset/diff_block.html
Show inline comments
 
@@ -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,
kallithea/templates/pullrequests/pullrequest_data.html
Show inline comments
 
@@ -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')}"
0 comments (0 inline, 0 general)