Commit 31e1a38b authored by Rubén Dávila's avatar Rubén Dávila

Some refactor for CSS after code review.

parent 5bad3516
...@@ -12,11 +12,18 @@ li.milestone { ...@@ -12,11 +12,18 @@ li.milestone {
} }
} }
.time-elapsed { .milestone-content {
color: #F14539; .issues-count {
} margin-right: 17px;
float: right;
width: 105px;
}
.issue-row .assignee-icon { .panel-heading {
font-weight: bold;
}
.issue-row .assignee-icon {
.color-label { .color-label {
float: left; float: left;
padding: 8px; padding: 8px;
...@@ -26,21 +33,19 @@ li.milestone { ...@@ -26,21 +33,19 @@ li.milestone {
img { img {
margin-left: 8px; margin-left: 8px;
} }
}
} }
.milestone-summary { .milestone-summary {
margin-bottom: 25px; margin-bottom: 25px;
}
.milestone-stat { .milestone-stat {
margin-right: 10px; margin-right: 10px;
} }
#tab-labels .issues-count { .time-elapsed {
margin-right: 17px; color: $orange-light;
float: right; }
width: 105px;
} }
.issues-sortable-list { .issues-sortable-list {
......
...@@ -110,6 +110,9 @@ class Milestone < ActiveRecord::Base ...@@ -110,6 +110,9 @@ class Milestone < ActiveRecord::Base
0 0
end end
# Returns the elapsed time (in percent) since the Milestone creation date until today.
# If the Milestone doesn't have a due_date then returns 0 since we can't calculate the elapsed time.
# If the Milestone is overdue then it returns 100%.
def percent_time_used def percent_time_used
return 0 unless due_date return 0 unless due_date
return 100 if expired? return 100 if expired?
......
.panel.panel-default .panel.panel-default
.panel-heading .panel-heading
%strong= title = title
%strong.pull-right= issues.size .pull-right= issues.size
%ul{ class: "well-list issues-sortable-list", id: "issues-list-#{id}", "data-state" => id } %ul{ class: "well-list issues-sortable-list", id: "issues-list-#{id}", "data-state" => id }
- issues.sort_by(&:position).each do |issue| - issues.sort_by(&:position).each do |issue|
= render 'issue', issue: issue = render 'issue', issue: issue
...@@ -94,7 +94,7 @@ ...@@ -94,7 +94,7 @@
Labels Labels
%span.badge= @labels.count %span.badge= @labels.count
.tab-content .tab-content.milestone-content
.tab-pane.active#tab-issues .tab-pane.active#tab-issues
.row.prepend-top-default .row.prepend-top-default
.col-md-4 .col-md-4
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment