Commit 4107f2cc2e6d0b93208573f4873305ba0ef4c5de
1 parent
8e0126e9
Exists in
master
and in
4 other branches
mixed dashboard - first try
Showing
12 changed files
with
125 additions
and
51 deletions
Show diff stats
app/assets/stylesheets/projects.css.scss
app/assets/stylesheets/style.scss
... | ... | @@ -351,7 +351,7 @@ header h1.logo a{ |
351 | 351 | text-indent: -1000em; |
352 | 352 | } |
353 | 353 | |
354 | -header nav{border-radius: 4px; box-shadow: 0 1px 2px black; width: 392px; margin: auto; | |
354 | +header nav{border-radius: 4px; box-shadow: 0 1px 2px black; width: 294px; margin: auto; | |
355 | 355 | background-image: -webkit-gradient(linear, 0 0, 0 30, color-stop(0.066, #595d63), to(#31363e)); |
356 | 356 | background-image: -webkit-linear-gradient(#595d63 6.6%, #31363e); |
357 | 357 | background-image: -moz-linear-gradient(#595d63 6.6%, #31363e); | ... | ... |
app/controllers/user_issues_controller.rb
app/controllers/user_merge_requests_controller.rb
... | ... | @@ -0,0 +1,28 @@ |
1 | +#news-feed.news-feed | |
2 | + %div | |
3 | + = link_to dashboard_path, :class => "left" do | |
4 | + .box-arrow | |
5 | + ← | |
6 | + %h2{:style => "width:86%; text-align:center"} | |
7 | + Issues | |
8 | + = link_to merge_requests_path, :class => "right" do | |
9 | + .box-arrow | |
10 | + → | |
11 | + | |
12 | + | |
13 | + .project-box.project-updates.ui-box.ui-box-small.ui-box-big | |
14 | + .data | |
15 | + - @issues.each do |update| | |
16 | + %a.project-update{:href => dashboard_feed_path(update.project, update)} | |
17 | + = image_tag gravatar_icon(update.author_email), :class => "left", :width => 40 | |
18 | + %span.update-title | |
19 | + = dashboard_feed_title(update) | |
20 | + %span.update-author | |
21 | + %strong= update.author_name | |
22 | + authored | |
23 | + = time_ago_in_words(update.created_at) | |
24 | + ago | |
25 | + .right | |
26 | + - klass = update.class.to_s.split("::").last.downcase | |
27 | + %span.tag{ :class => klass }= klass | |
28 | + | ... | ... |
... | ... | @@ -0,0 +1,27 @@ |
1 | +#news-feed.news-feed | |
2 | + %div | |
3 | + = link_to issues_path, :class => "left" do | |
4 | + .box-arrow | |
5 | + ← | |
6 | + %h2{:style => "width:86%; text-align:center"} | |
7 | + Merge Requests | |
8 | + = link_to dashboard_path, :class => "right" do | |
9 | + .box-arrow | |
10 | + → | |
11 | + | |
12 | + .project-box.project-updates.ui-box.ui-box-small.ui-box-big | |
13 | + .data | |
14 | + - @merge_requests.each do |update| | |
15 | + %a.project-update{:href => dashboard_feed_path(update.project, update)} | |
16 | + = image_tag gravatar_icon(update.author_email), :class => "left", :width => 40 | |
17 | + %span.update-title | |
18 | + = dashboard_feed_title(update) | |
19 | + %span.update-author | |
20 | + %strong= update.author_name | |
21 | + authored | |
22 | + = time_ago_in_words(update.created_at) | |
23 | + ago | |
24 | + .right | |
25 | + - klass = update.class.to_s.split("::").last.downcase | |
26 | + %span.tag{ :class => klass }= klass | |
27 | + | ... | ... |
... | ... | @@ -0,0 +1,30 @@ |
1 | +#news-feed.news-feed | |
2 | + %div | |
3 | + = link_to merge_requests_path, :class => "left" do | |
4 | + .box-arrow | |
5 | + ← | |
6 | + %h2{:style => "width:86%; text-align:center"} | |
7 | + Activities | |
8 | + = link_to issues_path, :class => "right" do | |
9 | + .box-arrow | |
10 | + → | |
11 | + | |
12 | + - @active_projects.first(3).each do |project| | |
13 | + .project-box.project-updates.ui-box.ui-box-small.ui-box-big | |
14 | + = link_to project, do | |
15 | + %h3= project.name | |
16 | + .data | |
17 | + - project.updates(3).each do |update| | |
18 | + %a.project-update{:href => dashboard_feed_path(project, update)} | |
19 | + = image_tag gravatar_icon(update.author_email), :class => "left", :width => 40 | |
20 | + %span.update-title | |
21 | + = dashboard_feed_title(update) | |
22 | + %span.update-author | |
23 | + %strong= update.author_name | |
24 | + authored | |
25 | + = time_ago_in_words(update.created_at) | |
26 | + ago | |
27 | + .right | |
28 | + - klass = update.class.to_s.split("::").last.downcase | |
29 | + %span.tag{ :class => klass }= klass | |
30 | + | ... | ... |
app/views/dashboard/index.html.haml
... | ... | @@ -15,25 +15,4 @@ |
15 | 15 | %span.time |
16 | 16 | %strong Last activity: |
17 | 17 | = project.last_activity_date ? time_ago_in_words(project.last_activity_date) + " ago" : "Never" |
18 | - #news-feed.news-feed | |
19 | - %h2.icon | |
20 | - %span> | |
21 | - Dashboard | |
22 | - - @active_projects.first(3).each do |project| | |
23 | - .project-box.project-updates.ui-box.ui-box-small.ui-box-big | |
24 | - = link_to project, do | |
25 | - %h3= project.name | |
26 | - .data | |
27 | - - project.updates(3).each do |update| | |
28 | - %a.project-update{:href => dashboard_feed_path(project, update)} | |
29 | - = image_tag gravatar_icon(update.author_email), :class => "left", :width => 40 | |
30 | - %span.update-title | |
31 | - = dashboard_feed_title(update) | |
32 | - %span.update-author | |
33 | - %strong= update.author_name | |
34 | - authored | |
35 | - = time_ago_in_words(update.created_at) | |
36 | - ago | |
37 | - .right | |
38 | - - klass = update.class.to_s.split("::").last.downcase | |
39 | - %span.tag{ :class => klass }= klass | |
18 | + = render "dashboard/projects_feed" | ... | ... |
app/views/issues/_show.html.haml
... | ... | @@ -2,13 +2,10 @@ |
2 | 2 | %td |
3 | 3 | %strong.issue-number{:class => sort_class}= "##{issue.id}" |
4 | 4 | %span |
5 | - = truncate(html_escape(issue.title), :length => fixed_mode? ? 100 : 200) | |
5 | + = truncate(html_escape(issue.title), :length => 40) | |
6 | 6 | %br |
7 | 7 | %br |
8 | 8 | %div.note-author |
9 | - - if not @project.present? | |
10 | - %strong= issue.project.name | |
11 | - = '-' | |
12 | 9 | %strong= issue.assignee.name |
13 | 10 | %cite.cgray |
14 | 11 | = time_ago_in_words(issue.created_at) | ... | ... |
app/views/layouts/_head_panel.html.erb
... | ... | @@ -25,9 +25,6 @@ |
25 | 25 | <%= link_to dashboard_path, :class => current_page?(root_path) ? "current dashboard" : "dashboard" do %> |
26 | 26 | <span></span>Dashboard |
27 | 27 | <% end %> |
28 | - <%= link_to issues_path, :class => current_page?(issues_path) ? "current issues" : "issues" do %> | |
29 | - <span></span>Issues | |
30 | - <% end %> | |
31 | 28 | <%= link_to projects_path, :class => current_page?(projects_path) ? "current project" : "project" do %> |
32 | 29 | <span></span>Projects |
33 | 30 | <% end %> | ... | ... |
app/views/user_issues/index.html.haml
1 | -%div#issues-table-holder | |
2 | - %table.round-borders#issues-table | |
3 | - %thead | |
4 | - %th | |
5 | - .top_panel_issues | |
6 | - %h2 Issues assigned to me | |
1 | +- content_for(:body_class, "dashboard-page") | |
7 | 2 | |
8 | - = render 'issues/issues' | |
9 | - %br | |
3 | +#dashboard-content.dashboard-content.content | |
4 | + %aside | |
5 | + %h4 | |
6 | + - if current_user.can_create_project? | |
7 | + %a.button-small.button-green{:href => new_project_path} New Project | |
8 | + Your Projects | |
9 | + %ol.project-list | |
10 | + - @projects.each do |project| | |
11 | + %li | |
12 | + %a{:href => project_path(project)} | |
13 | + %span.arrow → | |
14 | + %span.project-name= project.name | |
15 | + %span.time | |
16 | + %strong Last activity: | |
17 | + = project.last_activity_date ? time_ago_in_words(project.last_activity_date) + " ago" : "Never" | |
18 | + = render "dashboard/issues_feed" | ... | ... |
app/views/user_merge_requests/index.html.haml
1 | -- if @merge_requests.opened.count > 0 | |
2 | - %div{ :class => "update-data ui-box ui-box-small ui-box-big" } | |
3 | - %h3 | |
4 | - %span.tag.open Open | |
5 | - .data | |
6 | - = render @merge_requests.opened | |
7 | - | |
8 | - .clear | |
9 | - %br | |
1 | +- content_for(:body_class, "dashboard-page") | |
10 | 2 | |
3 | +#dashboard-content.dashboard-content.content | |
4 | + %aside | |
5 | + %h4 | |
6 | + - if current_user.can_create_project? | |
7 | + %a.button-small.button-green{:href => new_project_path} New Project | |
8 | + Your Projects | |
9 | + %ol.project-list | |
10 | + - @projects.each do |project| | |
11 | + %li | |
12 | + %a{:href => project_path(project)} | |
13 | + %span.arrow → | |
14 | + %span.project-name= project.name | |
15 | + %span.time | |
16 | + %strong Last activity: | |
17 | + = project.last_activity_date ? time_ago_in_words(project.last_activity_date) + " ago" : "Never" | |
18 | + = render "dashboard/merge_requests_feed" | ... | ... |