Commit ddc7568f authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Milestone show, Team index: Better UI

parent db78a63e
%h3 %h3.cgray
Gitlabhq GITLAB
%span.right v2.5 %span.right v2.5
%hr %hr
%h4 Self Hosted Git Management %h4 Self Hosted Git Management
......
...@@ -7,7 +7,10 @@ ...@@ -7,7 +7,10 @@
= link_to 'Reopen', project_issue_path(issue.project, issue, :issue => {:closed => false }, :status_only => true), :method => :put, :class => "btn small padded", :remote => true = link_to 'Reopen', project_issue_path(issue.project, issue, :issue => {:closed => false }, :status_only => true), :method => :put, :class => "btn small padded", :remote => true
- else - else
= link_to 'Resolve', project_issue_path(issue.project, issue, :issue => {:closed => true }, :status_only => true), :method => :put, :class => "success btn small padded", :remote => true = link_to 'Resolve', project_issue_path(issue.project, issue, :issue => {:closed => true }, :status_only => true), :method => :put, :class => "success btn small padded", :remote => true
= link_to 'Edit', edit_project_issue_path(issue.project, issue), :class => "btn small edit-issue-link", :remote => true = link_to edit_project_issue_path(issue.project, issue), :class => "btn small edit-issue-link", :remote => true do
%i.icon-edit
Edit
= image_tag gravatar_icon(issue.assignee_email), :class => "avatar" = image_tag gravatar_icon(issue.assignee_email), :class => "avatar"
%span.update-author %span.update-author
assigned to assigned to
......
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
= link_to 'Close', project_issue_path(@project, @issue, :issue => {:closed => true }, :status_only => true), :method => :put, :class => "btn small", :title => "Close Issue" = link_to 'Close', project_issue_path(@project, @issue, :issue => {:closed => true }, :status_only => true), :method => :put, :class => "btn small", :title => "Close Issue"
- if can?(current_user, :admin_project, @project) || @issue.author == current_user - if can?(current_user, :admin_project, @project) || @issue.author == current_user
= link_to edit_project_issue_path(@project, @issue), :class => "btn small" do = link_to edit_project_issue_path(@project, @issue), :class => "btn small" do
%i.icon-edit
Edit Edit
%br %br
......
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
- if @merge_request.open? - if @merge_request.open?
= 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" = 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"
= link_to edit_project_merge_request_path(@project, @merge_request), :class => "btn small padded" do = link_to edit_project_merge_request_path(@project, @merge_request), :class => "btn small padded" do
%i.icon-edit
Edit Edit
%br %br
......
...@@ -4,8 +4,10 @@ ...@@ -4,8 +4,10 @@
= @milestone.expires_at = @milestone.expires_at
%span.right %span.right
= link_to 'Browse Issues', project_issues_path(@milestone.project, :milestone_id => @milestone.id), :class => "btn edit-milestone-link small"
- if can?(current_user, :admin_milestone, @project) - if can?(current_user, :admin_milestone, @project)
= link_to edit_project_milestone_path(@project, @milestone), :class => "btn" do = link_to edit_project_milestone_path(@project, @milestone), :class => "btn small" do
%i.icon-edit
Edit Edit
.back_link .back_link
...@@ -20,22 +22,16 @@ ...@@ -20,22 +22,16 @@
- else - else
.alert-message.success.status_info Open .alert-message.success.status_info Open
= @milestone.title = @milestone.title
%small.right= @milestone.expires_at
.middle_box_content .middle_box_content
.row %h5
.span2 Progress:
= link_to 'Browse Issues', project_issues_path(@milestone.project, :milestone_id => @milestone.id), :class => "btn small edit-milestone-link" %small
.span4 #{@milestone.issues.opened.count} open
%span –
= @milestone.expires_at #{@milestone.issues.closed.count} closed
.progress
.span4.right
.progress
%br
%span
#{@milestone.issues.opened.count} open
–
#{@milestone.issues.closed.count} closed
- if @milestone.description.present? - if @milestone.description.present?
.bottom_box_content .bottom_box_content
...@@ -44,28 +40,31 @@ ...@@ -44,28 +40,31 @@
.row .row
.span6 .span6
%h4 Open Issues: %table.admin-table
- @issues.each do |issue| %thead
= link_to [@project, issue] do %th Open Issues
%h5 - @issues.each do |issue|
= image_tag gravatar_icon(issue.assignee_email, 16), :width => "16" %tr
  %td
Issue ##{issue.id} = link_to [@project, issue] do
– = image_tag gravatar_icon(issue.assignee_email, 16), :width => "16"
= truncate issue.title, :length => 50  
%small %span.badge.badge-info ##{issue.id}
updated at –
= issue.updated_at.stamp("Aug 25, 2011") = truncate issue.title, :length => 60
%br %br
= paginate @issues, :theme => "gitlab" = paginate @issues, :theme => "gitlab"
.span6 .span6
%h4 Participants: %table.admin-table
- @users.each do |user| %thead
%h5 %th Participants
= image_tag gravatar_icon(user.email, 16), :width => "16" - @users.each do |user|
  %tr
= user.name %td
= image_tag gravatar_icon(user.email, 24), :width => "24"
 
= user.name
:javascript :javascript
$(function() { $(function() {
......
.ui-box %table.admin-table
%h5 %thead
.cgray Team Members (#{@project.users_projects.count}) %tr
%ul.unstyled %th User
%th Permissions
%tbody
- @project.users_projects.each do |up| - @project.users_projects.each do |up|
= render(:partial => 'team_members/show', :locals => {:member => up}) = render(:partial => 'team_members/show', :locals => {:member => up})
......
= render "project_head" = render "project_head"
%h3
Team Members
%small (#{@project.users_projects.count})
- if can? current_user, :admin_team_member, @project - if can? current_user, :admin_team_member, @project
.alert.alert-info .alert.alert-info
......
= render "commits/head" = render "commits/head"
- unless @tags.empty? - unless @tags.empty?
%table.table-striped.borders %table.admin-table
%thead
%tr
%th Name
%th Last commit
%th Updated at
%th
- @tags.each do |tag| - @tags.each do |tag|
- commit = Commit.new(tag.commit)
%tr %tr
%td %td
%strong= link_to tag.name, project_commits_path(@project, :ref => tag.name), :class => "" %strong= link_to tag.name, project_commits_path(@project, :ref => tag.name), :class => ""
%td %td
= link_to project_commit_path(@project, tag.commit.id) do = link_to project_commit_path(@project, commit.id) do
%code= tag.commit.id.to_s[0..10] %code= commit.id.to_s[0..10]
= image_tag gravatar_icon(Commit.new(tag.commit).author_email), :class => "", :width => 16 = image_tag gravatar_icon(commit.author_email), :class => "", :width => 16
= truncate(Commit.new(tag.commit).safe_message, :length => 40) = truncate(commit.safe_message, :length => 40)
%td %td
%span.update-author.right %span.update-author.right
= time_ago_in_words(tag.commit.committed_date) = time_ago_in_words(commit.committed_date)
ago ago
   
%td %td
......
- user = member.user - user = member.user
- allow_admin = can? current_user, :admin_project, @project - allow_admin = can? current_user, :admin_project, @project
%li{:id => dom_id(member), :class => "team_member_row wll"} %tr{:id => dom_id(member), :class => "team_member_row"}
.row %td
.span8 .right
= link_to project_team_member_path(@project, member), :title => user.name, :class => "dark" do
= image_tag gravatar_icon(user.email, 40), :class => "avatar"
%strong= truncate(user.name, :lenght => 40)
%div.cgray= user.email
.span3
= form_for(member, :as => :team_member, :url => project_team_member_path(@project, member)) do |f|
= f.select :project_access, options_for_select(UsersProject.access_roles, member.project_access), {}, :class => "medium project-access-select", :disabled => !allow_admin
- if @project.owner == user - if @project.owner == user
%span.label Project Owner %span.label Project Owner
- if user.blocked - if user.blocked
%span.label Blocked %span.label Blocked
= link_to project_team_member_path(@project, member), :title => user.name, :class => "dark" do
= image_tag gravatar_icon(user.email, 40), :class => "avatar"
= link_to project_team_member_path(@project, member), :title => user.name, :class => "dark" do
%strong= truncate(user.name, :lenght => 40)
%br
%div.cgray= user.email
%td
= form_for(member, :as => :team_member, :url => project_team_member_path(@project, member)) do |f|
= f.select :project_access, options_for_select(UsersProject.access_roles, member.project_access), {}, :class => "medium project-access-select", :disabled => !allow_admin
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