Skip to content

Commit

Permalink
Fix votes block. twbs3 progress bars
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 Jan 1, 2014
1 parent 8e90011 commit a843ee7
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 9 deletions.
5 changes: 5 additions & 0 deletions app/assets/stylesheets/sections/votes.scss
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,8 @@
display: inline-block;
margin: 0 8px;
}

.votes-holder {
float: right;
width: 250px;
}
4 changes: 2 additions & 2 deletions app/views/projects/issues/show.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
%i.icon-edit
Edit

.pull-right
.col-md-3#votes= render 'votes/votes_block', votable: @issue
.votes-holder
#votes= render 'votes/votes_block', votable: @issue

.back-link
= link_to project_issues_path(@project) do
Expand Down
4 changes: 2 additions & 2 deletions app/views/projects/merge_requests/show/_mr_title.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@
%i.icon-edit
Edit

.pull-right
.col-md-3#votes= render 'votes/votes_block', votable: @merge_request
.votes-holder
#votes= render 'votes/votes_block', votable: @merge_request

.back-link
= link_to project_merge_requests_path(@project) do
Expand Down
2 changes: 1 addition & 1 deletion app/views/projects/milestones/_milestone.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@
&nbsp;
%span.light #{milestone.percent_complete}% complete
.progress.progress-info
.bar{style: "width: #{milestone.percent_complete}%;"}
.progress-bar{style: "width: #{milestone.percent_complete}%;"}
2 changes: 1 addition & 1 deletion app/views/projects/milestones/show.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
#{@milestone.open_items_count} open
%span.pull-right= @milestone.expires_at
.progress.progress-info
.bar{style: "width: #{@milestone.percent_complete}%;"}
.progress-bar{style: "width: #{@milestone.percent_complete}%;"}


- if @milestone.description.present?
Expand Down
3 changes: 2 additions & 1 deletion app/views/projects/wikis/edit.html.haml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
= render 'nav'
.pull-right
= render 'main_links'
%h3.page-title
Editing -
%span.light #{@wiki.title.titleize}
= render 'main_links'
%hr
= render 'form'

Expand Down
4 changes: 2 additions & 2 deletions app/views/votes/_votes_block.html.haml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.votes.votes-block
.progress
.bar.bar-success{style: "width: #{votable.upvotes_in_percent}%;"}
.bar.bar-danger{style: "width: #{votable.downvotes_in_percent}%;"}
.progress-bar.progress-bar-success{style: "width: #{votable.upvotes_in_percent}%;"}
.progress-bar.progress-bar-danger{style: "width: #{votable.downvotes_in_percent}%;"}
.upvotes= "#{votable.upvotes} up"
.downvotes= "#{votable.downvotes} down"

0 comments on commit a843ee7

Please sign in to comment.