summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-04-06 15:10:24 +0300
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-04-06 15:10:24 +0300
commit37eeeb9fca90aa34c502181b9967fb62f9f87752 (patch)
tree1b155cfd9d2ea0b3bfe5d592d35c93280b9093e1
parent39f4604653507e565c93a6fa8ef62bda421e78b2 (diff)
downloadgitlab-ce-37eeeb9fca90aa34c502181b9967fb62f9f87752.tar.gz
Redesign issues, mr lists
-rw-r--r--app/assets/stylesheets/common.scss2
-rw-r--r--app/assets/stylesheets/sections/dashboard.scss48
-rw-r--r--app/assets/stylesheets/sections/issues.scss33
-rw-r--r--app/assets/stylesheets/sections/merge_requests.scss40
-rw-r--r--app/assets/stylesheets/sections/votes.scss5
-rw-r--r--app/helpers/merge_requests_helper.rb2
-rw-r--r--app/helpers/projects_helper.rb2
-rw-r--r--app/views/dashboard/issues.html.haml2
-rw-r--r--app/views/dashboard/projects.html.haml2
-rw-r--r--app/views/dashboard/show.html.haml2
-rw-r--r--app/views/groups/issues.html.haml2
-rw-r--r--app/views/groups/show.html.haml4
-rw-r--r--app/views/issues/_issue.html.haml53
-rw-r--r--app/views/issues/index.html.haml4
-rw-r--r--app/views/merge_requests/_merge_request.html.haml53
-rw-r--r--app/views/merge_requests/index.html.haml2
-rw-r--r--app/views/milestones/show.html.haml2
-rw-r--r--app/views/repositories/tags.html.haml2
-rw-r--r--app/views/teams/issues.html.haml2
-rw-r--r--app/views/teams/show.html.haml4
-rw-r--r--app/views/votes/_votes_inline.html.haml13
21 files changed, 180 insertions, 99 deletions
diff --git a/app/assets/stylesheets/common.scss b/app/assets/stylesheets/common.scss
index 431b518904a..c3cc601f16f 100644
--- a/app/assets/stylesheets/common.scss
+++ b/app/assets/stylesheets/common.scss
@@ -279,7 +279,7 @@ li.note {
cursor: pointer;
}
-.merge_request,
+.merge-request,
.issue {
&.today{
background: #EFE;
diff --git a/app/assets/stylesheets/sections/dashboard.scss b/app/assets/stylesheets/sections/dashboard.scss
new file mode 100644
index 00000000000..9bc4a09a097
--- /dev/null
+++ b/app/assets/stylesheets/sections/dashboard.scss
@@ -0,0 +1,48 @@
+.dashboard {
+ @extend .row;
+ .activities {
+ }
+
+ .side {
+ @extend .pull-right;
+
+ .ui-box {
+ margin: 3px;
+ > .title {
+ padding: 2px 15px;
+ }
+ .nav-projects-tabs li { padding: 0; }
+ .well-list {
+ li { padding: 15px; }
+ .arrow {
+ float: right;
+ padding: 10px;
+ margin: 0;
+ }
+ .last_activity {
+ padding-top: 5px;
+ display: block;
+ span, strong {
+ font-size: 12px;
+ color: #666;
+ }
+ }
+ }
+ @extend .ui-box;
+ }
+ }
+}
+
+.dashboard-search-filter {
+ padding:5px;
+
+ .search-text-input {
+ float:left;
+ @extend .span2;
+ }
+ .btn {
+ margin-left: 5px;
+ float:left;
+ }
+}
+
diff --git a/app/assets/stylesheets/sections/issues.scss b/app/assets/stylesheets/sections/issues.scss
index 351f2404492..31d5c56bc6c 100644
--- a/app/assets/stylesheets/sections/issues.scss
+++ b/app/assets/stylesheets/sections/issues.scss
@@ -1,22 +1,39 @@
-.issues_table {
+.issues-list {
.issue {
padding: 10px;
+ position: relative;
- .issue_check {
+ .issue-title {
+ margin-bottom: 5px;
+ font-size: 14px;
+ }
+
+ .issue-info {
+ color: #999;
+ }
+
+ .issue-check {
float: left;
padding: 8px 0;
padding-right: 8px;
min-width: 15px;
}
- p {
- padding-top: 0;
- padding-bottom: 2px;
+ .issue-labels {
+ display: inline-block;
+ }
+
+ .issue-actions {
+ display: none;
+ position: absolute;
+ top: 10px;
+ right: 2px;
}
- img.avatar {
- width: 32px;
- margin-top: 1px;
+ &:hover {
+ .issue-actions {
+ display: block;
+ }
}
}
}
diff --git a/app/assets/stylesheets/sections/merge_requests.scss b/app/assets/stylesheets/sections/merge_requests.scss
index 4cca0083e44..a84ef71e743 100644
--- a/app/assets/stylesheets/sections/merge_requests.scss
+++ b/app/assets/stylesheets/sections/merge_requests.scss
@@ -53,18 +53,6 @@
}
}
-li.merge_request {
- padding: 10px;
- img.avatar {
- width: 32px;
- margin-top: 1px;
- }
- p {
- padding: 0px;
- padding-bottom: 2px;
- }
-}
-
.merge-in-progress {
@extend .padded;
@extend .append-bottom-10;
@@ -97,3 +85,31 @@ li.merge_request {
.mr_direction_tip {
margin-top:40px
}
+
+.label-branch {
+ @include border-radius(4px);
+ padding: 2px 4px;
+ border: none;
+ font-size: 14px;
+ background: #474D57;
+ color: #fff;
+ font-family: $monospace_font;
+ text-shadow: 0 1px 1px #111;
+ font-weight: normal;
+}
+
+.mr-list {
+ .merge-request {
+ padding: 10px;
+ position: relative;
+
+ .merge-request-title {
+ margin-bottom: 5px;
+ font-size: 14px;
+ }
+
+ .merge-request-info {
+ color: #999;
+ }
+ }
+}
diff --git a/app/assets/stylesheets/sections/votes.scss b/app/assets/stylesheets/sections/votes.scss
index 4686f5422dc..6c81d9a81b8 100644
--- a/app/assets/stylesheets/sections/votes.scss
+++ b/app/assets/stylesheets/sections/votes.scss
@@ -35,9 +35,4 @@
.votes-inline {
display: inline-block;
margin: 0 8px;
- .progress {
- display: inline-block;
- padding: 0 0 2px;
- width: 45px;
- }
}
diff --git a/app/helpers/merge_requests_helper.rb b/app/helpers/merge_requests_helper.rb
index 155d03d1147..05ffec066f8 100644
--- a/app/helpers/merge_requests_helper.rb
+++ b/app/helpers/merge_requests_helper.rb
@@ -11,7 +11,7 @@ module MergeRequestsHelper
end
def mr_css_classes mr
- classes = "merge_request"
+ classes = "merge-request"
classes << " closed" if mr.closed?
classes << " merged" if mr.merged?
classes
diff --git a/app/helpers/projects_helper.rb b/app/helpers/projects_helper.rb
index e6427ea84c0..1db8b7c689c 100644
--- a/app/helpers/projects_helper.rb
+++ b/app/helpers/projects_helper.rb
@@ -25,7 +25,7 @@ module ProjectsHelper
author_html = ""
# Build avatar image tag
- author_html << image_tag(gravatar_icon(author.try(:email)), width: 16, class: "lil_av") if opts[:avatar]
+ author_html << image_tag(gravatar_icon(author.try(:email)), width: 16, class: "avatar avatar-inline s16") if opts[:avatar]
# Build name span tag
author_html << content_tag(:span, sanitize(author.name), class: 'author')
diff --git a/app/views/dashboard/issues.html.haml b/app/views/dashboard/issues.html.haml
index 539c57651f7..df85d5ba204 100644
--- a/app/views/dashboard/issues.html.haml
+++ b/app/views/dashboard/issues.html.haml
@@ -15,7 +15,7 @@
- project = group[0]
%h5.title
= link_to_project project
- %ul.well-list.issues_table
+ %ul.well-list.issues-list
- group[1].each do |issue|
= render issue
%hr
diff --git a/app/views/dashboard/projects.html.haml b/app/views/dashboard/projects.html.haml
index 29a16d61e63..f81af59b38f 100644
--- a/app/views/dashboard/projects.html.haml
+++ b/app/views/dashboard/projects.html.haml
@@ -28,7 +28,7 @@
= button_tag type: 'submit', class: 'btn' do
%i.icon-search
- %ul.well-list
+ %ul.bordered-list
- @projects.each do |project|
%li.clearfix
.clearfix
diff --git a/app/views/dashboard/show.html.haml b/app/views/dashboard/show.html.haml
index 1a66ba4fb37..ff2db0e3180 100644
--- a/app/views/dashboard/show.html.haml
+++ b/app/views/dashboard/show.html.haml
@@ -1,5 +1,5 @@
- if @has_authorized_projects
- .projects
+ .dashboard
.activities.span8
= render 'activities'
.side.span4
diff --git a/app/views/groups/issues.html.haml b/app/views/groups/issues.html.haml
index 96aa2a1626d..6d642b65cbd 100644
--- a/app/views/groups/issues.html.haml
+++ b/app/views/groups/issues.html.haml
@@ -14,7 +14,7 @@
- project = group[0]
%h5.title
= link_to_project project
- %ul.well-list.issues_table
+ %ul.well-list.issues-list
- group[1].each do |issue|
= render issue
%hr
diff --git a/app/views/groups/show.html.haml b/app/views/groups/show.html.haml
index adf249f656a..62d640c8532 100644
--- a/app/views/groups/show.html.haml
+++ b/app/views/groups/show.html.haml
@@ -1,4 +1,4 @@
-.projects
+.dashboard
.activities.span8
= render "events/event_last_push", event: @last_push
= link_to dashboard_path, class: 'btn btn-tiny' do
@@ -13,7 +13,7 @@
.loading.hide
.side.span4
- if @group.description.present?
- .description.well.light
+ .description.well.well-small.light
= @group.description
= render "projects", projects: @projects
.prepend-top-20
diff --git a/app/views/issues/_issue.html.haml b/app/views/issues/_issue.html.haml
index ab34116b42f..6c6d45e987b 100644
--- a/app/views/issues/_issue.html.haml
+++ b/app/views/issues/_issue.html.haml
@@ -1,12 +1,37 @@
%li{ id: dom_id(issue), class: issue_css_classes(issue), url: project_issue_path(issue.project, issue) }
- if controller.controller_name == 'issues'
- .issue_check
+ .issue-check
= check_box_tag dom_id(issue,"selected"), nil, false, 'data-id' => issue.id, class: "selected_issue", disabled: !can?(current_user, :modify_issue, issue)
- .pull-right
+
+ .issue-title
+ %span.light= "##{issue.id}"
+ = link_to_gfm truncate(issue.title, length: 100), project_issue_path(issue.project, issue), class: "row_title"
+
+ .issue-info
+ - if issue.assignee
+ assigned to #{link_to_member(@project, issue.assignee)}
+ - else
+ unassigned
+ - if issue.votes_count > 0
+ = render 'votes/votes_inline', votable: issue
- if issue.notes.any?
- %span.btn.btn-small.disabled.grouped
- %i.icon-comment
+ %span
+ %i.icon-comments
= issue.notes.count
+ - if issue.milestone_id?
+ %span
+ %i.icon-time
+ = issue.milestone.title
+ .pull-right
+ %small updated #{time_ago_in_words(issue.updated_at)} ago
+
+ .issue-labels
+ - issue.labels.each do |label|
+ %span.label.label-info
+ %i.icon-tag
+ = label.name
+
+ .issue-actions
- if can? current_user, :modify_issue, issue
- if issue.closed?
= link_to 'Reopen', project_issue_path(issue.project, issue, issue: {state_event: :reopen }, status_only: true), method: :put, class: "btn btn-small grouped reopen_issue", remote: true
@@ -16,24 +41,4 @@
%i.icon-edit
Edit
- - if issue.assignee
- = image_tag gravatar_icon(issue.assignee_email), class: "avatar"
- - else
- = image_tag "no_avatar.png", class: "avatar"
-
- %p= link_to_gfm truncate(issue.title, length: 100), project_issue_path(issue.project, issue), class: "row_title"
-
- %span.update-author
- %span.cdark= "##{issue.id}"
- - if issue.assignee
- assigned to #{issue.assignee_name}
- - else
- &nbsp;
- - if issue.votes_count > 0
- = render 'votes/votes_inline', votable: issue
- %span
- - issue.labels.each do |label|
- %span.label.label-info
- %i.icon-tag
- = label.name
diff --git a/app/views/issues/index.html.haml b/app/views/issues/index.html.haml
index 875f29e2600..2e26ee72281 100644
--- a/app/views/issues/index.html.haml
+++ b/app/views/issues/index.html.haml
@@ -12,7 +12,7 @@
= form_tag search_project_issues_path(@project), method: :get, remote: true, id: "issue_search_form", class: 'pull-right' do
= hidden_field_tag :project_id, @project.id, { id: 'project_id' }
= hidden_field_tag :status, params[:status]
- = search_field_tag :issue_search, nil, { placeholder: 'Search', class: 'issue_search span3 pull-right neib search-text-input' }
+ = search_field_tag :issue_search, nil, { placeholder: 'Search', class: 'issue_search input-xlarge append-right-10 search-text-input' }
.clearfix
@@ -41,7 +41,7 @@
= select_tag(:milestone_id, options_from_collection_for_select([unassigned_filter] + issues_active_milestones, "id", "title", params[:milestone_id]), prompt: "Milestone")
= hidden_field_tag :status, params[:status]
- %ul#issues-table.well-list.issues_table
+ %ul#issues-table.well-list.issues-list
= render "issues"
:javascript
diff --git a/app/views/merge_requests/_merge_request.html.haml b/app/views/merge_requests/_merge_request.html.haml
index 09c55d98465..ffc6b8fda1e 100644
--- a/app/views/merge_requests/_merge_request.html.haml
+++ b/app/views/merge_requests/_merge_request.html.haml
@@ -1,32 +1,29 @@
%li{ class: mr_css_classes(merge_request) }
- .pull-right
- .left
- - if merge_request.merged?
- %span.btn.btn-small.disabled.grouped
- %strong
- %i.icon-ok
- = "MERGED"
- - if merge_request.notes.any?
- %span.btn.btn-small.disabled.grouped
- %i.icon-comment
- = merge_request.mr_and_commit_notes.count
- - if merge_request.milestone_id?
- %span.btn.btn-small.disabled.grouped
- %i.icon-time
- = merge_request.milestone.title
- %span.btn.btn-small.disabled.grouped
- = merge_request.source_branch
- &rarr;
+ .merge-request-title
+ %span.light= "##{merge_request.id}"
+ = link_to_gfm truncate(merge_request.title, length: 80), project_merge_request_path(merge_request.project, merge_request), class: "row_title"
+ - if merge_request.merged?
+ %small.pull-right
+ %i.icon-ok
+ = "MERGED"
+ - else
+ %span.pull-right
+ %i.icon-angle-right
= merge_request.target_branch
- = image_tag gravatar_icon(merge_request.author_email), class: "avatar"
-
- %p= link_to_gfm truncate(merge_request.title, length: 80), project_merge_request_path(merge_request.project, merge_request), class: "row_title"
-
- %span.update-author
- %small.cdark= "##{merge_request.id}"
- authored by #{merge_request.author_name}
- = time_ago_in_words(merge_request.created_at)
- ago
-
+ .merge-request-info
+ - if merge_request.author
+ authored by #{link_to_member(@project, merge_request.author)}
- if merge_request.votes_count > 0
= render 'votes/votes_inline', votable: merge_request
+ - if merge_request.notes.any?
+ %span
+ %i.icon-comments
+ = merge_request.mr_and_commit_notes.count
+ - if merge_request.milestone_id?
+ %span
+ %i.icon-time
+ = merge_request.milestone.title
+
+
+ .pull-right
+ %small updated #{time_ago_in_words(merge_request.updated_at)} ago
diff --git a/app/views/merge_requests/index.html.haml b/app/views/merge_requests/index.html.haml
index 3073c8f6bab..bf7a82b8fb5 100644
--- a/app/views/merge_requests/index.html.haml
+++ b/app/views/merge_requests/index.html.haml
@@ -20,7 +20,7 @@
= hidden_field_tag :f, params[:f]
.clearfix
- %ul.well-list
+ %ul.well-list.mr-list
= render @merge_requests
- if @merge_requests.blank?
%li
diff --git a/app/views/milestones/show.html.haml b/app/views/milestones/show.html.haml
index 747ce74a6a7..30539af48d8 100644
--- a/app/views/milestones/show.html.haml
+++ b/app/views/milestones/show.html.haml
@@ -87,7 +87,7 @@
%h6 Participants:
%div
- @users.each do |user|
- = link_to user, class: 'float-link' do
+ = link_to user do
= link_to_member(@project, user)
.clearfix
diff --git a/app/views/repositories/tags.html.haml b/app/views/repositories/tags.html.haml
index 5493c08984e..bef5cd0841b 100644
--- a/app/views/repositories/tags.html.haml
+++ b/app/views/repositories/tags.html.haml
@@ -14,7 +14,7 @@
%span.light
= time_ago_in_words(commit.committed_date)
ago
- %div.prepend-left
+ %div.prepend-left-20
= link_to commit.short_id(8), project_commit_path(@project, commit), class: "monospace"
&ndash;
= link_to_gfm truncate(commit.title, length: 70), project_commit_path(@project, commit.id), class: "cdark"
diff --git a/app/views/teams/issues.html.haml b/app/views/teams/issues.html.haml
index 5b17c5d4f0b..94818ccd7f4 100644
--- a/app/views/teams/issues.html.haml
+++ b/app/views/teams/issues.html.haml
@@ -14,7 +14,7 @@
- @project = group[0]
%h5.title
= link_to_project @project
- %ul.well-list.issues_table
+ %ul.well-list.issues-list
- group[1].each do |issue|
= render issue
%hr
diff --git a/app/views/teams/show.html.haml b/app/views/teams/show.html.haml
index 2eb0283e0ab..88cffa011ed 100644
--- a/app/views/teams/show.html.haml
+++ b/app/views/teams/show.html.haml
@@ -1,4 +1,4 @@
-.projects
+.dashboard
.activities.span8
= link_to dashboard_path, class: 'btn btn-tiny' do
&larr; To dashboard
@@ -12,7 +12,7 @@
.loading.hide
.side.span4
- if @team.description.present?
- .description.well.light
+ .description.well.well-small.light
= @team.description
= render "projects", projects: @projects
.prepend-top-20
diff --git a/app/views/votes/_votes_inline.html.haml b/app/views/votes/_votes_inline.html.haml
index 91bd200df44..ee805474830 100644
--- a/app/views/votes/_votes_inline.html.haml
+++ b/app/views/votes/_votes_inline.html.haml
@@ -1,6 +1,9 @@
.votes.votes-inline
- .upvotes= votable.upvotes
- .progress
- .bar.bar-success{style: "width: #{votable.upvotes_in_percent}%;"}
- .bar.bar-danger{style: "width: #{votable.downvotes_in_percent}%;"}
- .downvotes= votable.downvotes
+ - unless votable.upvotes.zero?
+ .upvotes
+ + #{votable.upvotes}
+ - unless votable.downvotes.zero?
+ \/
+ - unless votable.downvotes.zero?
+ .downvotes
+ \- #{votable.downvotes}