Merge branch 'issue_dashboard' into improved_dashboard
This commit is contained in:
commit
8e0126e9ec
20 changed files with 247 additions and 22 deletions
|
@ -1,5 +1,5 @@
|
|||
- @issues.critical.each do |issue|
|
||||
= render(:partial => 'show', :locals => {:issue => issue})
|
||||
= render(:partial => 'issues/show', :locals => {:issue => issue})
|
||||
|
||||
- @issues.non_critical.each do |issue|
|
||||
= render(:partial => 'show', :locals => {:issue => issue})
|
||||
= render(:partial => 'issues/show', :locals => {:issue => issue})
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
%tr{ :id => dom_id(issue), :class => "issue #{issue.critical ? "critical" : ""}", :url => project_issue_path(@project, issue) }
|
||||
%tr{ :id => dom_id(issue), :class => "issue #{issue.critical ? "critical" : ""}", :url => project_issue_path(issue.project, issue) }
|
||||
%td
|
||||
%strong.issue-number{:class => sort_class}= "##{issue.id}"
|
||||
%span
|
||||
|
@ -6,6 +6,9 @@
|
|||
%br
|
||||
%br
|
||||
%div.note-author
|
||||
- if not @project.present?
|
||||
%strong= issue.project.name
|
||||
= '-'
|
||||
%strong= issue.assignee.name
|
||||
%cite.cgray
|
||||
= time_ago_in_words(issue.created_at)
|
||||
|
@ -17,10 +20,10 @@
|
|||
.right.action-links
|
||||
- if can? current_user, :write_issue, issue
|
||||
- if issue.closed
|
||||
= link_to 'Reopen', project_issue_path(@project, issue, :issue => {:closed => false }, :status_only => true), :method => :put, :class => "cgray", :remote => true
|
||||
= link_to 'Reopen', project_issue_path(issue.project, issue, :issue => {:closed => false }, :status_only => true), :method => :put, :class => "cgray", :remote => true
|
||||
- else
|
||||
= link_to 'Resolve', project_issue_path(@project, issue, :issue => {:closed => true }, :status_only => true), :method => :put, :class => "cgray", :remote => true
|
||||
= link_to 'Resolve', project_issue_path(issue.project, issue, :issue => {:closed => true }, :status_only => true), :method => :put, :class => "cgray", :remote => true
|
||||
- if can? current_user, :write_issue, issue
|
||||
= link_to 'Edit', edit_project_issue_path(@project, issue), :class => "cgray edit-issue-link", :remote => true
|
||||
= link_to 'Edit', edit_project_issue_path(issue.project, issue), :class => "cgray edit-issue-link", :remote => true
|
||||
- if can?(current_user, :admin_issue, @project) || issue.author == current_user
|
||||
= link_to 'Remove', [@project, issue], :confirm => 'Are you sure?', :method => :delete, :remote => true, :class => "cred delete-issue negative", :id => "destroy_issue_#{issue.id}"
|
||||
= link_to 'Remove', [issue.project, issue], :confirm => 'Are you sure?', :method => :delete, :remote => true, :class => "cred delete-issue negative", :id => "destroy_issue_#{issue.id}"
|
||||
|
|
|
@ -25,6 +25,9 @@
|
|||
<%= link_to dashboard_path, :class => current_page?(root_path) ? "current dashboard" : "dashboard" do %>
|
||||
<span></span>Dashboard
|
||||
<% end %>
|
||||
<%= link_to issues_path, :class => current_page?(issues_path) ? "current issues" : "issues" do %>
|
||||
<span></span>Issues
|
||||
<% end %>
|
||||
<%= link_to projects_path, :class => current_page?(projects_path) ? "current project" : "project" do %>
|
||||
<span></span>Projects
|
||||
<% end %>
|
||||
|
|
31
app/views/layouts/user.html.haml
Normal file
31
app/views/layouts/user.html.haml
Normal file
|
@ -0,0 +1,31 @@
|
|||
!!!
|
||||
%html
|
||||
%head
|
||||
%title
|
||||
GitLab #{" - #{current_user.name}"}
|
||||
= stylesheet_link_tag "application"
|
||||
= javascript_include_tag "application"
|
||||
= csrf_meta_tags
|
||||
= javascript_tag do
|
||||
REQ_URI = "#{request.env["REQUEST_URI"]}";
|
||||
REQ_REFFER = "#{request.env["HTTP_REFERER"]}";
|
||||
%body{ :class => body_class('project-page'), :id => yield(:boyd_id)}
|
||||
= render :partial => "layouts/flash"
|
||||
#container
|
||||
= render :partial => "layouts/head_panel"
|
||||
.project-container
|
||||
.project-sidebar
|
||||
.fixed
|
||||
%aside
|
||||
= link_to issues_path, :class => current_page?(issues_path) ? "current" : nil do
|
||||
Issues
|
||||
- unless current_user.assigned_issues.empty?
|
||||
%span{ :class => "number" }= current_user.assigned_issues.count
|
||||
= link_to merge_requests_path, :class => current_page?(merge_requests_path) ? "current" : nil do
|
||||
Merge Requests
|
||||
- unless current_user.assigned_merge_requests.empty?
|
||||
%span{ :class => "number" }= current_user.assigned_merge_requests.count
|
||||
|
||||
.project-content
|
||||
= yield
|
||||
|
|
@ -1,8 +1,11 @@
|
|||
%a.update-item{:href => project_merge_request_path(@project, merge_request)}
|
||||
%a.update-item{:href => project_merge_request_path(merge_request.project, merge_request)}
|
||||
= image_tag gravatar_icon(merge_request.author_email), :class => "left", :width => 40
|
||||
%span.update-title
|
||||
= merge_request.title
|
||||
%span.update-author
|
||||
- if not @project.present?
|
||||
%strong= merge_request.project.name
|
||||
= '-'
|
||||
%strong= merge_request.author_name
|
||||
authored
|
||||
= time_ago_in_words(merge_request.created_at)
|
||||
|
|
24
app/views/user_issues/index.atom.builder
Normal file
24
app/views/user_issues/index.atom.builder
Normal file
|
@ -0,0 +1,24 @@
|
|||
xml.instruct!
|
||||
xml.feed "xmlns" => "http://www.w3.org/2005/Atom", "xmlns:media" => "http://search.yahoo.com/mrss/" do
|
||||
xml.title "#{@user.name} issues"
|
||||
xml.link :href => issues_url(:atom, :private_token => @user.private_token), :rel => "self", :type => "application/atom+xml"
|
||||
xml.link :href => issues_url(:private_token => @user.private_token), :rel => "alternate", :type => "text/html"
|
||||
xml.id issues_url(:private_token => @user.private_token)
|
||||
xml.updated @issues.first.created_at.strftime("%Y-%m-%dT%H:%M:%SZ") if @issues.any?
|
||||
|
||||
@issues.each do |issue|
|
||||
xml.entry do
|
||||
xml.id project_issue_url(issue.project, issue)
|
||||
xml.link :href => project_issue_url(issue.project, issue)
|
||||
xml.title truncate(issue.title, :length => 80)
|
||||
xml.updated issue.created_at.strftime("%Y-%m-%dT%H:%M:%SZ")
|
||||
xml.media :thumbnail, :width => "40", :height => "40", :url => gravatar_icon(issue.author_email)
|
||||
xml.author do |author|
|
||||
xml.name issue.author_name
|
||||
xml.email issue.author_email
|
||||
end
|
||||
xml.summary issue.title
|
||||
end
|
||||
end
|
||||
end
|
||||
|
9
app/views/user_issues/index.html.haml
Normal file
9
app/views/user_issues/index.html.haml
Normal file
|
@ -0,0 +1,9 @@
|
|||
%div#issues-table-holder
|
||||
%table.round-borders#issues-table
|
||||
%thead
|
||||
%th
|
||||
.top_panel_issues
|
||||
%h2 Issues assigned to me
|
||||
|
||||
= render 'issues/issues'
|
||||
%br
|
10
app/views/user_merge_requests/index.html.haml
Normal file
10
app/views/user_merge_requests/index.html.haml
Normal file
|
@ -0,0 +1,10 @@
|
|||
- if @merge_requests.opened.count > 0
|
||||
%div{ :class => "update-data ui-box ui-box-small ui-box-big" }
|
||||
%h3
|
||||
%span.tag.open Open
|
||||
.data
|
||||
= render @merge_requests.opened
|
||||
|
||||
.clear
|
||||
%br
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue