Commit a85ae5ce90dc752a822c1a9f76f4808b6f99b5e6
1 parent
651e46fd
Exists in
master
and in
1 other branch
show/hide animations for useless information
Showing
3 changed files
with
69 additions
and
40 deletions
Show diff stats
app/views/apps/show.html.haml
1 | - content_for :title, @app.name | 1 | - content_for :title, @app.name |
2 | - content_for :head do | 2 | - content_for :head do |
3 | = auto_discovery_link_tag :atom, app_url(@app, User.token_authentication_key => current_user.authentication_token, :format => "atom"), :title => "Errbit notices for #{@app.name} at #{root_url}" | 3 | = auto_discovery_link_tag :atom, app_url(@app, User.token_authentication_key => current_user.authentication_token, :format => "atom"), :title => "Errbit notices for #{@app.name} at #{root_url}" |
4 | + = javascript_include_tag 'apps.show' | ||
4 | - content_for :meta do | 5 | - content_for :meta do |
5 | %strong Errs Caught: | 6 | %strong Errs Caught: |
6 | = @app.errs.count | 7 | = @app.errs.count |
@@ -17,52 +18,61 @@ | @@ -17,52 +18,61 @@ | ||
17 | - else | 18 | - else |
18 | = link_to 'all errs', app_path(@app, {all_errs: true}), :class => 'button' | 19 | = link_to 'all errs', app_path(@app, {all_errs: true}), :class => 'button' |
19 | 20 | ||
20 | -%h3 Watchers | ||
21 | -%table.watchers | ||
22 | - %thead | ||
23 | - %tr | ||
24 | - %th User or Email | ||
25 | - %tbody | ||
26 | - - @app.watchers.each do |watcher| | ||
27 | - %tr | ||
28 | - %td= watcher.label | ||
29 | - - if @app.watchers.none? | ||
30 | - %tr | ||
31 | - %td | ||
32 | - %em Sadly, no one is watching this app | ||
33 | - | ||
34 | -- if @app.github_url? | ||
35 | - %h3 Repository | ||
36 | - %table.repository | 21 | +%h3{:id => 'watchers_toggle'} |
22 | + Watchers | ||
23 | + %span{:class => 'click_span'} (show/hide) | ||
24 | +#watchers_div | ||
25 | + %table.watchers | ||
37 | %thead | 26 | %thead |
38 | %tr | 27 | %tr |
39 | - %th GitHub | 28 | + %th User or Email |
40 | %tbody | 29 | %tbody |
41 | - %tr | ||
42 | - %td= link_to(@app.github_url, @app.github_url, :target => '_blank') | 30 | + - @app.watchers.each do |watcher| |
31 | + %tr | ||
32 | + %td= watcher.label | ||
33 | + - if @app.watchers.none? | ||
34 | + %tr | ||
35 | + %td | ||
36 | + %em Sadly, no one is watching this app | ||
43 | 37 | ||
44 | -%h3 Latest Deploys | ||
45 | -- if @deploys.any? | ||
46 | - %table.deploys | ||
47 | - %thead | ||
48 | - %tr | ||
49 | - %th When | ||
50 | - %th Who | ||
51 | - %th Message | ||
52 | - %th Repository | ||
53 | - %th Revision | 38 | +- if @app.github_url? |
39 | + %h3{:id => 'repository_toggle'} | ||
40 | + Repository | ||
41 | + %span{:class => 'click_span'} (show/hide) | ||
42 | + #repository_div | ||
43 | + %table.repository | ||
44 | + %thead | ||
45 | + %tr | ||
46 | + %th GitHub | ||
47 | + %tbody | ||
48 | + %tr | ||
49 | + %td= link_to(@app.github_url, @app.github_url, :target => '_blank') | ||
54 | 50 | ||
55 | - %tbody | ||
56 | - - @deploys.each do |deploy| | 51 | +%h3{:id => 'deploys_toggle'} |
52 | + Latest Deploys | ||
53 | + %span{:class => 'click_span'} (show/hide) | ||
54 | +#deploys_div | ||
55 | + - if @deploys.any? | ||
56 | + %table.deploys | ||
57 | + %thead | ||
57 | %tr | 58 | %tr |
58 | - %td.when #{deploy.created_at.to_s(:micro)} | ||
59 | - %td.who #{deploy.username} | ||
60 | - %td.message #{deploy.message} | ||
61 | - %td.repository #{deploy.repository} | ||
62 | - %td.revision #{deploy.revision} | ||
63 | - = link_to "All Deploys (#{@app.deploys.count})", app_deploys_path(@app), :class => 'button' | ||
64 | -- else | ||
65 | - %h3 No deploys | 59 | + %th When |
60 | + %th Who | ||
61 | + %th Message | ||
62 | + %th Repository | ||
63 | + %th Revision | ||
64 | + | ||
65 | + %tbody | ||
66 | + - @deploys.each do |deploy| | ||
67 | + %tr | ||
68 | + %td.when #{deploy.created_at.to_s(:micro)} | ||
69 | + %td.who #{deploy.username} | ||
70 | + %td.message #{deploy.message} | ||
71 | + %td.repository #{deploy.repository} | ||
72 | + %td.revision #{deploy.revision} | ||
73 | + = link_to "All Deploys (#{@app.deploys.count})", app_deploys_path(@app), :class => 'button' | ||
74 | + - else | ||
75 | + %h3 No deploys | ||
66 | 76 | ||
67 | - if @app.errs.count > 0 | 77 | - if @app.errs.count > 0 |
68 | %h3.clear Errs | 78 | %h3.clear Errs |
@@ -0,0 +1,11 @@ | @@ -0,0 +1,11 @@ | ||
1 | +$(function() { | ||
2 | + $("#watchers_toggle").click(function() { | ||
3 | + $("#watchers_div").slideToggle("slow"); | ||
4 | + }); | ||
5 | + $("#repository_toggle").click(function() { | ||
6 | + $("#repository_div").slideToggle("slow"); | ||
7 | + }); | ||
8 | + $("#deploys_toggle").click(function() { | ||
9 | + $("#deploys_div").slideToggle("slow"); | ||
10 | + }); | ||
11 | +}); |
public/stylesheets/application.css
@@ -660,3 +660,11 @@ table.backtrace li.in-app { | @@ -660,3 +660,11 @@ table.backtrace li.in-app { | ||
660 | color: #2adb2e; | 660 | color: #2adb2e; |
661 | background-color: #2f2f2f; | 661 | background-color: #2f2f2f; |
662 | } | 662 | } |
663 | + | ||
664 | +span.click_span { | ||
665 | + font-size: 0.7em; | ||
666 | +} | ||
667 | + | ||
668 | +#deploys_div, #repository_div, #watchers_div { | ||
669 | + display: none; | ||
670 | +} |