Commit ddc7568fec59aa7a068116f692804504d9aa1a1d
1 parent
db78a63e
Exists in
master
and in
4 other branches
Milestone show, Team index: Better UI
Showing
10 changed files
with
76 additions
and
57 deletions
Show diff stats
app/assets/images/logo_mars.png
2.18 KB
app/views/help/index.html.haml
app/views/issues/_show.html.haml
| ... | ... | @@ -7,7 +7,10 @@ |
| 7 | 7 | = link_to 'Reopen', project_issue_path(issue.project, issue, :issue => {:closed => false }, :status_only => true), :method => :put, :class => "btn small padded", :remote => true |
| 8 | 8 | - else |
| 9 | 9 | = link_to 'Resolve', project_issue_path(issue.project, issue, :issue => {:closed => true }, :status_only => true), :method => :put, :class => "success btn small padded", :remote => true |
| 10 | - = link_to 'Edit', edit_project_issue_path(issue.project, issue), :class => "btn small edit-issue-link", :remote => true | |
| 10 | + = link_to edit_project_issue_path(issue.project, issue), :class => "btn small edit-issue-link", :remote => true do | |
| 11 | + %i.icon-edit | |
| 12 | + Edit | |
| 13 | + | |
| 11 | 14 | = image_tag gravatar_icon(issue.assignee_email), :class => "avatar" |
| 12 | 15 | %span.update-author |
| 13 | 16 | assigned to | ... | ... |
app/views/issues/show.html.haml
| ... | ... | @@ -12,6 +12,7 @@ |
| 12 | 12 | = link_to 'Close', project_issue_path(@project, @issue, :issue => {:closed => true }, :status_only => true), :method => :put, :class => "btn small", :title => "Close Issue" |
| 13 | 13 | - if can?(current_user, :admin_project, @project) || @issue.author == current_user |
| 14 | 14 | = link_to edit_project_issue_path(@project, @issue), :class => "btn small" do |
| 15 | + %i.icon-edit | |
| 15 | 16 | Edit |
| 16 | 17 | |
| 17 | 18 | %br | ... | ... |
app/views/merge_requests/show.html.haml
| ... | ... | @@ -10,6 +10,7 @@ |
| 10 | 10 | - if @merge_request.open? |
| 11 | 11 | = link_to 'Close', project_merge_request_path(@project, @merge_request, :merge_request => {:closed => true }, :status_only => true), :method => :put, :class => "btn small padded", :title => "Close merge request" |
| 12 | 12 | = link_to edit_project_merge_request_path(@project, @merge_request), :class => "btn small padded" do |
| 13 | + %i.icon-edit | |
| 13 | 14 | Edit |
| 14 | 15 | |
| 15 | 16 | %br | ... | ... |
app/views/milestones/show.html.haml
| ... | ... | @@ -4,8 +4,10 @@ |
| 4 | 4 | = @milestone.expires_at |
| 5 | 5 | |
| 6 | 6 | %span.right |
| 7 | + = link_to 'Browse Issues', project_issues_path(@milestone.project, :milestone_id => @milestone.id), :class => "btn edit-milestone-link small" | |
| 7 | 8 | - if can?(current_user, :admin_milestone, @project) |
| 8 | - = link_to edit_project_milestone_path(@project, @milestone), :class => "btn" do | |
| 9 | + = link_to edit_project_milestone_path(@project, @milestone), :class => "btn small" do | |
| 10 | + %i.icon-edit | |
| 9 | 11 | Edit |
| 10 | 12 | |
| 11 | 13 | .back_link |
| ... | ... | @@ -20,22 +22,16 @@ |
| 20 | 22 | - else |
| 21 | 23 | .alert-message.success.status_info Open |
| 22 | 24 | = @milestone.title |
| 25 | + %small.right= @milestone.expires_at | |
| 23 | 26 | |
| 24 | 27 | .middle_box_content |
| 25 | - .row | |
| 26 | - .span2 | |
| 27 | - = link_to 'Browse Issues', project_issues_path(@milestone.project, :milestone_id => @milestone.id), :class => "btn small edit-milestone-link" | |
| 28 | - .span4 | |
| 29 | - %span | |
| 30 | - = @milestone.expires_at | |
| 31 | - | |
| 32 | - .span4.right | |
| 33 | - .progress | |
| 34 | - %br | |
| 35 | - %span | |
| 36 | - #{@milestone.issues.opened.count} open | |
| 37 | - – | |
| 38 | - #{@milestone.issues.closed.count} closed | |
| 28 | + %h5 | |
| 29 | + Progress: | |
| 30 | + %small | |
| 31 | + #{@milestone.issues.opened.count} open | |
| 32 | + – | |
| 33 | + #{@milestone.issues.closed.count} closed | |
| 34 | + .progress | |
| 39 | 35 | |
| 40 | 36 | - if @milestone.description.present? |
| 41 | 37 | .bottom_box_content |
| ... | ... | @@ -44,28 +40,31 @@ |
| 44 | 40 | |
| 45 | 41 | .row |
| 46 | 42 | .span6 |
| 47 | - %h4 Open Issues: | |
| 48 | - - @issues.each do |issue| | |
| 49 | - = link_to [@project, issue] do | |
| 50 | - %h5 | |
| 51 | - = image_tag gravatar_icon(issue.assignee_email, 16), :width => "16" | |
| 52 | - | |
| 53 | - Issue ##{issue.id} | |
| 54 | - – | |
| 55 | - = truncate issue.title, :length => 50 | |
| 56 | - %small | |
| 57 | - updated at | |
| 58 | - = issue.updated_at.stamp("Aug 25, 2011") | |
| 43 | + %table.admin-table | |
| 44 | + %thead | |
| 45 | + %th Open Issues | |
| 46 | + - @issues.each do |issue| | |
| 47 | + %tr | |
| 48 | + %td | |
| 49 | + = link_to [@project, issue] do | |
| 50 | + = image_tag gravatar_icon(issue.assignee_email, 16), :width => "16" | |
| 51 | + | |
| 52 | + %span.badge.badge-info ##{issue.id} | |
| 53 | + – | |
| 54 | + = truncate issue.title, :length => 60 | |
| 59 | 55 | %br |
| 60 | 56 | = paginate @issues, :theme => "gitlab" |
| 61 | 57 | |
| 62 | 58 | .span6 |
| 63 | - %h4 Participants: | |
| 64 | - - @users.each do |user| | |
| 65 | - %h5 | |
| 66 | - = image_tag gravatar_icon(user.email, 16), :width => "16" | |
| 67 | - | |
| 68 | - = user.name | |
| 59 | + %table.admin-table | |
| 60 | + %thead | |
| 61 | + %th Participants | |
| 62 | + - @users.each do |user| | |
| 63 | + %tr | |
| 64 | + %td | |
| 65 | + = image_tag gravatar_icon(user.email, 24), :width => "24" | |
| 66 | + | |
| 67 | + = user.name | |
| 69 | 68 | |
| 70 | 69 | :javascript |
| 71 | 70 | $(function() { | ... | ... |
app/views/projects/_team.html.haml
| 1 | -.ui-box | |
| 2 | - %h5 | |
| 3 | - .cgray Team Members (#{@project.users_projects.count}) | |
| 4 | - %ul.unstyled | |
| 1 | +%table.admin-table | |
| 2 | + %thead | |
| 3 | + %tr | |
| 4 | + %th User | |
| 5 | + %th Permissions | |
| 6 | + %tbody | |
| 5 | 7 | - @project.users_projects.each do |up| |
| 6 | 8 | = render(:partial => 'team_members/show', :locals => {:member => up}) |
| 7 | 9 | ... | ... |
app/views/projects/team.html.haml
app/views/repositories/tags.html.haml
| 1 | 1 | = render "commits/head" |
| 2 | 2 | - unless @tags.empty? |
| 3 | - %table.table-striped.borders | |
| 3 | + %table.admin-table | |
| 4 | + %thead | |
| 5 | + %tr | |
| 6 | + %th Name | |
| 7 | + %th Last commit | |
| 8 | + %th Updated at | |
| 9 | + %th | |
| 4 | 10 | - @tags.each do |tag| |
| 11 | + - commit = Commit.new(tag.commit) | |
| 5 | 12 | %tr |
| 6 | 13 | %td |
| 7 | 14 | %strong= link_to tag.name, project_commits_path(@project, :ref => tag.name), :class => "" |
| 8 | 15 | %td |
| 9 | - = link_to project_commit_path(@project, tag.commit.id) do | |
| 10 | - %code= tag.commit.id.to_s[0..10] | |
| 11 | - = image_tag gravatar_icon(Commit.new(tag.commit).author_email), :class => "", :width => 16 | |
| 12 | - = truncate(Commit.new(tag.commit).safe_message, :length => 40) | |
| 16 | + = link_to project_commit_path(@project, commit.id) do | |
| 17 | + %code= commit.id.to_s[0..10] | |
| 18 | + = image_tag gravatar_icon(commit.author_email), :class => "", :width => 16 | |
| 19 | + = truncate(commit.safe_message, :length => 40) | |
| 13 | 20 | %td |
| 14 | 21 | %span.update-author.right |
| 15 | - = time_ago_in_words(tag.commit.committed_date) | |
| 22 | + = time_ago_in_words(commit.committed_date) | |
| 16 | 23 | ago |
| 17 | 24 | |
| 18 | 25 | %td | ... | ... |
app/views/team_members/_show.html.haml
| 1 | 1 | - user = member.user |
| 2 | 2 | - allow_admin = can? current_user, :admin_project, @project |
| 3 | -%li{:id => dom_id(member), :class => "team_member_row wll"} | |
| 4 | - .row | |
| 5 | - .span8 | |
| 6 | - = link_to project_team_member_path(@project, member), :title => user.name, :class => "dark" do | |
| 7 | - = image_tag gravatar_icon(user.email, 40), :class => "avatar" | |
| 8 | - %strong= truncate(user.name, :lenght => 40) | |
| 9 | - %div.cgray= user.email | |
| 10 | - | |
| 11 | - .span3 | |
| 12 | - = form_for(member, :as => :team_member, :url => project_team_member_path(@project, member)) do |f| | |
| 13 | - = f.select :project_access, options_for_select(UsersProject.access_roles, member.project_access), {}, :class => "medium project-access-select", :disabled => !allow_admin | |
| 3 | +%tr{:id => dom_id(member), :class => "team_member_row"} | |
| 4 | + %td | |
| 5 | + .right | |
| 14 | 6 | - if @project.owner == user |
| 15 | 7 | %span.label Project Owner |
| 16 | 8 | - if user.blocked |
| 17 | 9 | %span.label Blocked |
| 10 | + | |
| 11 | + = link_to project_team_member_path(@project, member), :title => user.name, :class => "dark" do | |
| 12 | + = image_tag gravatar_icon(user.email, 40), :class => "avatar" | |
| 13 | + = link_to project_team_member_path(@project, member), :title => user.name, :class => "dark" do | |
| 14 | + %strong= truncate(user.name, :lenght => 40) | |
| 15 | + %br | |
| 16 | + %div.cgray= user.email | |
| 17 | + | |
| 18 | + %td | |
| 19 | + = form_for(member, :as => :team_member, :url => project_team_member_path(@project, member)) do |f| | |
| 20 | + = f.select :project_access, options_for_select(UsersProject.access_roles, member.project_access), {}, :class => "medium project-access-select", :disabled => !allow_admin | ... | ... |