Commit 892c84eaa971be9568218e04f34428b814d37bd9
1 parent
2b2d1d9f
Exists in
master
and in
1 other branch
Added GitHub repo and issue tracker to apps#index table, if either are present
Showing
2 changed files
with
26 additions
and
0 deletions
Show diff stats
app/assets/stylesheets/errbit.css
@@ -579,6 +579,17 @@ table.apps tbody tr:hover td ,table.errs tbody tr:hover td { background-color: # | @@ -579,6 +579,17 @@ table.apps tbody tr:hover td ,table.errs tbody tr:hover td { background-color: # | ||
579 | table.apps td.name, table.errs td.message { | 579 | table.apps td.name, table.errs td.message { |
580 | width: 100%; | 580 | width: 100%; |
581 | } | 581 | } |
582 | +table.apps td { | ||
583 | + padding-top: 16px; | ||
584 | + padding-bottom: 16px; | ||
585 | +} | ||
586 | +table.apps td.issue_tracker, table.apps td.count { | ||
587 | + padding-top: 10px; | ||
588 | + padding-bottom: 10px; | ||
589 | + text-align: center; | ||
590 | +} | ||
591 | +table.apps td.issue_tracker img { vertical-align: top; } | ||
592 | + | ||
582 | td.message .line { | 593 | td.message .line { |
583 | display:inline-block; | 594 | display:inline-block; |
584 | margin-left:1em; | 595 | margin-left:1em; |
app/views/apps/index.html.haml
@@ -2,16 +2,31 @@ | @@ -2,16 +2,31 @@ | ||
2 | - content_for :action_bar do | 2 | - content_for :action_bar do |
3 | %span= link_to('Add a New App', new_app_path, :class => 'add') if current_user.admin? | 3 | %span= link_to('Add a New App', new_app_path, :class => 'add') if current_user.admin? |
4 | 4 | ||
5 | +- any_github_repos = @apps.any? {|a| a.github_repo? } | ||
6 | +- any_issue_trackers = @apps.any? {|a| a.issue_tracker_configured? } | ||
7 | + | ||
5 | %table.apps | 8 | %table.apps |
6 | %thead | 9 | %thead |
7 | %tr | 10 | %tr |
8 | %th Name | 11 | %th Name |
12 | + - if any_github_repos | ||
13 | + %th GitHub Repo | ||
14 | + - if any_issue_trackers | ||
15 | + %th Tracker | ||
9 | %th Last Deploy | 16 | %th Last Deploy |
10 | %th Errors | 17 | %th Errors |
11 | %tbody | 18 | %tbody |
12 | - @apps.each do |app| | 19 | - @apps.each do |app| |
13 | %tr | 20 | %tr |
14 | %td.name= link_to app.name, app_path(app) | 21 | %td.name= link_to app.name, app_path(app) |
22 | + - if any_github_repos | ||
23 | + %td.github_repo | ||
24 | + - if app.github_repo? | ||
25 | + = link_to(app.github_repo, app.github_url, :target => '_blank') | ||
26 | + - if any_issue_trackers | ||
27 | + %td.issue_tracker | ||
28 | + - if app.issue_tracker_configured? | ||
29 | + = image_tag("#{app.issue_tracker.class::Label}_create.png") | ||
15 | %td.deploy | 30 | %td.deploy |
16 | - if app.last_deploy_at | 31 | - if app.last_deploy_at |
17 | - revision = app.deploys.last.short_revision | 32 | - revision = app.deploys.last.short_revision |