Skip to content

Commit

Permalink
Use new ui-box classes
Browse files Browse the repository at this point in the history
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
  • Loading branch information
dzaporozhets committed Dec 24, 2013
1 parent 4345e92 commit dac67ed
Show file tree
Hide file tree
Showing 9 changed files with 47 additions and 53 deletions.
4 changes: 2 additions & 2 deletions app/views/projects/edit.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@
Unarchive project
- else
Archive project
.ui-box-body
.body
- if @project.archived?
%p
Unarchiving the project will mark its repository as active.
Expand Down Expand Up @@ -168,7 +168,7 @@
- if can?(current_user, :remove_project, @project)
.ui-box.ui-box-danger
.title Remove project
.ui-box-body
.body
%p
Removing the project will delete its repository and all related resources including issues, merge requests etc.
%br
Expand Down
8 changes: 4 additions & 4 deletions app/views/projects/issues/_form.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@
- @issue.errors.full_messages.each do |msg|
%span= msg
%br
.ui-box.ui-box-show
.ui-box-head
.issue-box
.title
.control-group
= f.label :title do
%strong= "Subject *"
.controls
= f.text_field :title, maxlength: 255, class: "input-xxlarge js-gfm-input", autofocus: true, required: true
.ui-box-body
.context
.control-group
.issue_assignee.pull-left
= f.label :assignee_id do
Expand All @@ -31,7 +31,7 @@
Milestone
.controls= f.select(:milestone_id, milestone_options(@issue), { include_blank: "Select milestone" }, {class: 'chosen'})

.ui-box-bottom
.description
.control-group
= f.label :label_list do
%i.icon-tag
Expand Down
11 changes: 5 additions & 6 deletions app/views/projects/issues/show.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -37,17 +37,16 @@
%span.light Milestone
= @issue.milestone.title

.ui-box.ui-box-show
.ui-box-head
%h4.box-title
= gfm escape_once(@issue.title)
.issue-box
%h4.title
= gfm escape_once(@issue.title)

.ui-box-body
.context
%cite.cgray
= render partial: 'issue_context', locals: { issue: @issue }

- if @issue.description.present?
.ui-box-bottom
.description
.wiki
= preserve do
= markdown @issue.description
Expand Down
4 changes: 2 additions & 2 deletions app/views/projects/issues/update.js.haml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
:plain
$("##{dom_id(@issue)}").fadeOut();
- elsif params[:issue_context]
$('.ui-box-body').html("#{escape_javascript(render partial: 'issue_context', locals: { issue: @issue })}");
$('.ui-box-body').effect('highlight');
$('.issue-box .context').html("#{escape_javascript(render partial: 'issue_context', locals: { issue: @issue })}");
$('.issue-box .context').effect('highlight');
$('.chosen').chosen();
$('.edit-issue.inline-update input[type="submit"]').hide();
- if @issue.milestone
Expand Down
36 changes: 17 additions & 19 deletions app/views/projects/merge_requests/show/_mr_box.html.haml
Original file line number Diff line number Diff line change
@@ -1,41 +1,39 @@
.ui-box.ui-box-show
.ui-box-head
%h4.box-title
= gfm escape_once(@merge_request.title)
.issue-box
%h4.title
= gfm escape_once(@merge_request.title)

.ui-box-body
%div
%cite.cgray
Created by #{link_to_member(@project, @merge_request.author)}.
- if @merge_request.assignee
Currently assigned to #{link_to_member(@project, @merge_request.assignee)}.
- if @merge_request.milestone
.pull-right
- milestone = @merge_request.milestone
%cite.cgray Attached to milestone
%strong= link_to_gfm truncate(milestone.title, length: 20), project_milestone_path(milestone.project, milestone)
.context
%cite.cgray
Created by #{link_to_member(@project, @merge_request.author)}.
- if @merge_request.assignee
Currently assigned to #{link_to_member(@project, @merge_request.assignee)}.
- if @merge_request.milestone
.pull-right
- milestone = @merge_request.milestone
%cite.cgray Attached to milestone
%strong= link_to_gfm truncate(milestone.title, length: 20), project_milestone_path(milestone.project, milestone)


- if @merge_request.description.present?
.ui-box-bottom
.description
.wiki
= preserve do
= markdown @merge_request.description

- if @merge_request.closed?
.ui-box-bottom.alert-error
.description.alert-error
%span
%i.icon-remove
Closed by #{link_to_member(@project, @merge_request.closed_event.author)}
#{time_ago_with_tooltip(@merge_request.closed_event.created_at)} ago.
- if @merge_request.merged?
.ui-box-bottom.alert-success
.description.alert-success
%span
%i.icon-ok
Merged by #{link_to_member(@project, @merge_request.merge_event.author)}
#{time_ago_with_tooltip(@merge_request.merge_event.created_at)} ago.
- if !@closes_issues.empty? && @merge_request.opened?
.ui-box-bottom.alert-info
.description.alert-info
%span
%i.icon-ok
Accepting this merge request will close #{@closes_issues.size == 1 ? 'issue' : 'issues'}
Expand Down
12 changes: 5 additions & 7 deletions app/views/projects/milestones/show.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,11 @@
&larr; To milestones list


.ui-box.ui-box-show
.ui-box-head
%h4.box-title
.issue-box
%h4.title
= gfm escape_once(@milestone.title)

= gfm escape_once(@milestone.title)

.ui-box-body
.context
%p
Progress:
#{@milestone.closed_items_count} closed
Expand All @@ -46,7 +44,7 @@


- if @milestone.description.present?
.ui-box-bottom
.description
= preserve do
= markdown @milestone.description

Expand Down
21 changes: 10 additions & 11 deletions app/views/projects/wikis/_form.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -6,27 +6,26 @@
- @wiki.errors.full_messages.each do |msg|
%li= msg

.ui-box.ui-box-show
.ui-box-head
%h3.page-title
.edit-wiki-header
= @wiki.title.titleize
= f.hidden_field :title, value: @wiki.title
= f.select :format, options_for_select(GollumWiki::MARKUPS, {selected: @wiki.format}), {}, class: "pull-right input-medium"
= f.label :format, class: "pull-right", style: "padding-right: 20px;"
.ui-box-body
.issue-box
%h3.title
.edit-wiki-header
= @wiki.title.titleize
= f.hidden_field :title, value: @wiki.title
= f.select :format, options_for_select(GollumWiki::MARKUPS, {selected: @wiki.format}), {}, class: "pull-right input-medium"
= f.label :format, class: "pull-right", style: "padding-right: 20px;"
.context
.controls
%span.cgray
Wiki content is parsed with #{link_to "GitLab Flavored Markdown", help_markdown_path, target: '_blank'}.
To link to a (new) page you can just type
%code [Link Title](page-slug)
\.

.ui-box-bottom
.description
.control-group
= f.label :content
.controls= f.text_area :content, class: 'span8 js-gfm-input', rows: 18
.ui-box-bottom
.description
.control-group
= f.label :commit_message
.controls= f.text_field :message, class: 'span8', rows: 18
Expand Down
2 changes: 1 addition & 1 deletion app/views/shared/_issues.html.haml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
- if @issues.any?
- @issues.group_by(&:project).each do |group|
.ui-box.small-box
.ui-box.ui-box-small
- project = group[0]
.title
= link_to_project project
Expand Down
2 changes: 1 addition & 1 deletion app/views/shared/_merge_requests.html.haml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
- if @merge_requests.any?
- @merge_requests.group_by(&:target_project).each do |group|
.ui-box.small-box
.ui-box.ui-box-small
- project = group[0]
.title
= link_to_project project
Expand Down

0 comments on commit dac67ed

Please sign in to comment.