Addresses front & backend comments
- Improves CSS files by reusing existing code - Changes logic in views to avoid future problems in translations
This commit is contained in:
parent
70b8f421ae
commit
7ebf033198
|
@ -67,10 +67,9 @@
|
||||||
|
|
||||||
.limit-box {
|
.limit-box {
|
||||||
background: $blue-100;
|
background: $blue-100;
|
||||||
border-radius: 3px;
|
border-radius: $border-radius-default;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
margin-left: 5px;
|
padding: 1px 1px 0.5px;
|
||||||
padding: 1px 1px 0.5px 0;
|
|
||||||
text-align: center;
|
text-align: center;
|
||||||
vertical-align: bottom;
|
vertical-align: bottom;
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
.has-tooltip{ class: "limit-box limit-box-#{objects.singularize}", data: { title: "Project has too many #{objects} to search"} }
|
.has-tooltip{ class: "limit-box limit-box-#{objects.to_s.singularize} prepend-left-5", data: { title: "Project has too many #{label_for_message} to search"} }
|
||||||
.limit-icon
|
.limit-icon
|
||||||
- if objects == "branches"
|
- if objects == :branches
|
||||||
= icon('code-fork')
|
= icon('code-fork')
|
||||||
- else
|
- else
|
||||||
= icon('tag')
|
= icon('tag')
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
- if @branches_limit_exceeded
|
- if @branches_limit_exceeded
|
||||||
= render 'limit_exceeded_message', objects: 'branches'
|
= render 'limit_exceeded_message', objects: :branches, label_for_message: _('branches')
|
||||||
- else
|
- else
|
||||||
- branch = commit_default_branch(@project, @branches)
|
- branch = commit_default_branch(@project, @branches)
|
||||||
= commit_branch_link(project_ref_path(@project, branch), branch)
|
= commit_branch_link(project_ref_path(@project, branch), branch)
|
||||||
|
@ -10,6 +10,6 @@
|
||||||
%span.js-details-content.hide
|
%span.js-details-content.hide
|
||||||
= commit_branches_links(@project, @branches)
|
= commit_branches_links(@project, @branches)
|
||||||
- if @tags_limit_exceeded
|
- if @tags_limit_exceeded
|
||||||
= render 'limit_exceeded_message', objects: 'tags'
|
= render 'limit_exceeded_message', objects: :tags, label_for_message: _('tags')
|
||||||
- else
|
- else
|
||||||
= commit_tags_links(@project, @tags)
|
= commit_tags_links(@project, @tags)
|
||||||
|
|
|
@ -59,7 +59,7 @@ describe 'projects/commit/branches.html.haml' do
|
||||||
before do
|
before do
|
||||||
assign(:branches, ['master'])
|
assign(:branches, ['master'])
|
||||||
assign(:branches_limit_exceeded, true)
|
assign(:branches_limit_exceeded, true)
|
||||||
assign(:tags, ['tag1', 'tag2'])
|
assign(:tags, %w(tag1 tag2))
|
||||||
assign(:tags_limit_exceeded, false)
|
assign(:tags_limit_exceeded, false)
|
||||||
|
|
||||||
render
|
render
|
||||||
|
|
Loading…
Reference in New Issue