Commit 24db1d16b8ebeef84011a2af44b03ffdb73f39c8

Authored by Stephen Crosby
1 parent f624fb84
Exists in master and in 1 other branch production

fixes #956 integrate font-awesome

Gemfile
... ... @@ -8,29 +8,27 @@ gem 'actionmailer', RAILS_VERSION
8 8 gem 'actionpack', RAILS_VERSION
9 9 gem 'railties', RAILS_VERSION
10 10  
11   -gem 'mongoid', '5.0.0'
12   -gem 'mongoid_rails_migrations'
13   -
  11 +gem 'actionmailer_inline_css'
  12 +gem 'decent_exposure'
14 13 gem 'devise'
  14 +gem 'dotenv-rails'
  15 +gem 'draper'
  16 +gem 'errbit_plugin'
  17 +gem 'errbit_github_plugin'
  18 +gem 'font-awesome-rails'
15 19 gem 'haml'
16 20 gem 'htmlentities'
17   -gem 'rack-ssl', :require => 'rack/ssl' # force SSL
18   -
19   -gem 'useragent'
20   -gem 'decent_exposure'
21   -gem 'actionmailer_inline_css'
22 21 gem 'kaminari', '>= 0.14.1'
  22 +gem 'mongoid', '5.0.0'
  23 +gem 'mongoid_rails_migrations'
  24 +gem 'rack-ssl', :require => 'rack/ssl' # force SSL
23 25 gem 'rack-ssl-enforcer', :require => false
24 26 gem 'rails_autolink'
  27 +gem 'useragent'
  28 +
25 29 # Please don't update hoptoad_notifier to airbrake.
26 30 # It's for internal use only, and we monkeypatch certain methods
27 31 gem 'hoptoad_notifier', "~> 2.4"
28   -gem 'draper'
29   -
30   -gem 'errbit_plugin'
31   -gem 'errbit_github_plugin'
32   -
33   -gem 'dotenv-rails'
34 32  
35 33 # Notification services
36 34 # ---------------------------------------
... ...
Gemfile.lock
... ... @@ -136,6 +136,8 @@ GEM
136 136 flowdock (0.6.0)
137 137 httparty (~> 0.7)
138 138 multi_json
  139 + font-awesome-rails (4.2.0.0)
  140 + railties (>= 3.2, < 5.0)
139 141 globalid (0.3.6)
140 142 activesupport (>= 4.1.0)
141 143 haml (4.0.6)
... ... @@ -436,6 +438,7 @@ DEPENDENCIES
436 438 errbit_plugin
437 439 fabrication
438 440 flowdock
  441 + font-awesome-rails
439 442 haml
440 443 hipchat
441 444 hoi
... ...
app/assets/stylesheets/application.css.erb
... ... @@ -3,5 +3,6 @@
3 3 *= require jquery.alerts
4 4 *= require errbit
5 5 *= require notification_service_icons
  6 + *= require font-awesome
6 7 *= require_self
7 8 */
... ...
app/assets/stylesheets/errbit.css.erb
... ... @@ -93,9 +93,10 @@ a.action { float: right; font-size: 0.9em;}
93 93 padding: 0 14px;
94 94 line-height: 30px;
95 95 }
96   -#header #session-links #sign-out {
97   - background: transparent url(<%= asset_path "images/icons/bullet-red-sm.png" %>) 12px 50% no-repeat;
98   - padding-left: 29px;
  96 +#header #session-links #sign-out i {
  97 + color: #cc0033;
  98 + font-size: 11px;
  99 + margin-right: 3px;
99 100 }
100 101 #header #session-links a:hover {
101 102 text-decoration: none;
... ... @@ -133,10 +134,12 @@ a.action { float: right; font-size: 0.9em;}
133 134 color: #333;
134 135 }
135 136  
  137 +#nav-bar li i {
  138 + margin-right: 5px;
  139 +}
136 140 #nav-bar li a {
137 141 color: #666;
138   - display: block;
139   - padding: 0 20px 0 40px;
  142 + padding: 0 20px;
140 143 font-size: 14px;
141 144 font-weight: bold;
142 145 line-height: 37px;
... ... @@ -146,9 +149,6 @@ a.action { float: right; font-size: 0.9em;}
146 149 background: transparent 10px 6px no-repeat;
147 150 }
148 151 #nav-bar li a:hover { color: #666;}
149   -#nav-bar li.apps a { background-image: url(<%= asset_path "images/icons/briefcase.png" %>); }
150   -#nav-bar li.errs a { background-image: url(<%= asset_path "images/icons/error.png" %>); }
151   -#nav-bar li.users a { background-image: url(<%= asset_path "images/icons/user.png" %>); }
152 152 #nav-bar li:not(.active):hover {
153 153 box-shadow: 0 0 3px #69c;
154 154 -moz-box-shadow: 0 0 3px #69c;
... ... @@ -215,8 +215,7 @@ a.action { float: right; font-size: 0.9em;}
215 215 }
216 216 #action-bar span a {
217 217 color: #666;
218   - display: block;
219   - padding: 0 20px 0 40px;
  218 + padding: 0 20px;
220 219 font-size: 14px; font-weight: bold; line-height: 39px; text-decoration: none;
221 220 text-shadow: 1px 1px 0px #FFF; -webkit-text-shadow: 1px 1px 0px #FFF;
222 221 background: transparent 10px 8px no-repeat;
... ... @@ -227,17 +226,11 @@ a.action { float: right; font-size: 0.9em;}
227 226 -moz-box-shadow: 0 0 3px #69c;
228 227 -webkit-box-shadow: 0 0 3px #69c;
229 228 }
230   -#action-bar a.add {
231   - background-image: url(<%= asset_path "images/icons/add.png" %>);
232   -}
233   -
234   -#action-bar .calendar_link {
235   - background: url(<%= asset_path "images/icons/ical.png" %>) no-repeat scroll 12px 6px transparent;
236   - padding-left: 47px;
  229 +#action-bar a i {
  230 + margin-right: 5px;
237 231 }
238 232  
239   -#action-bar span.github a { background: url(<%= asset_path "images/icons/github.png" %>) no-repeat 6px 5px; }
240   -#action-bar span.unlink_github a { background: url(<%= asset_path "images/icons/unlink_github.png" %>) no-repeat 6px 5px; }
  233 +#action-bar span.github a:before { font-family: FontAwesome; content: "\f09b"; margin-right: 8px; position: relative; top: 4px; font-size: 26px; }
241 234  
242 235 /* Content */
243 236 #content {
... ... @@ -306,7 +299,7 @@ form label {
306 299 }
307 300 form label.inline { display: inline; }
308 301 form .checkbox label { display: inline; }
309   -form .required label { padding-right: 20px; background: transparent url(<%= asset_path "images/icons/required.png" %>) right 50% no-repeat; }
  302 +form .required label:after { font-family: FontAwesome; content: "\f069"; color: #cc0033; margin-left: 5px; font-weight: normal; }
310 303 form .field_with_errors label { color: #900; }
311 304 form input[type=text], form input[type=password], form input[type=email] {
312 305 width: 96%; padding: 0.8em;
... ... @@ -365,10 +358,13 @@ form div.buttons input, form div.buttons button {
365 358 -webkit-text-shadow: 1px 1px 0px #FFF;
366 359 border: none;
367 360 }
368   -form div.buttons button.sign_in {
369   - padding-left: 40px;
370   - background: transparent url(<%= asset_path "images/icons/right-arrow.png" %>) 3px 3px no-repeat;
  361 +
  362 +.sign_in:before {
  363 + font-family: FontAwesome;
  364 + content: "\f061";
  365 + margin-right: 8px;
371 366 }
  367 +
372 368 form strong.option {
373 369 display: block;
374 370 margin: 0.7em 0;
... ... @@ -650,7 +646,7 @@ td.count, td.issue_link {
650 646 padding: 0.1em 0.7em;
651 647 margin-top: 3px;
652 648 color: #fff;
653   - background: #cc0033 url(<%= asset_path "images/error-badge-bg.png" %>) 0 bottom repeat-x;
  649 + background-color: #cc0033;
654 650 border: 1px solid #900;
655 651 border-radius: 18px;
656 652 -moz-border-radius: 18px;
... ... @@ -661,7 +657,7 @@ td.count, td.issue_link {
661 657 -webkit-opacity: 0.8
662 658 }
663 659 .count a.resolved {
664   - background: #05B81d url(<%= asset_path "images/resolved-badge-bg.png" %>) 0 bottom repeat-x;
  660 + background-color: #05B81d;
665 661 border: 1px solid #080;
666 662 }
667 663 .count a:hover {
... ... @@ -729,13 +725,17 @@ table.deploys td.when {
729 725 }
730 726  
731 727 /* Resolve Errs */
732   -#action-bar a.resolve {
733   - background: transparent url(<%= asset_path "images/icons/thumbs-up.png" %>) 6px 5px no-repeat;
  728 +#action-bar .resolve:before {
  729 + font-family: FontAwesome;
  730 + content: "\f087";
  731 + margin-right: 5px;
734 732 }
735 733  
736 734 /* Go Up */
737   -#action-bar a.up {
738   - background: transparent url(<%= asset_path "images/icons/up.png" %>) 6px 5px no-repeat;
  735 +#action-bar a.up:before {
  736 + font-family: FontAwesome;
  737 + content: "\f077";
  738 + margin-right: 5px;
739 739 }
740 740  
741 741 /* Notices Pagination */
... ...
app/assets/stylesheets/images/content-fade.png

134 Bytes

app/assets/stylesheets/images/error-badge-bg.png

75 Bytes

app/assets/stylesheets/images/header.png

109 Bytes

app/assets/stylesheets/images/icons/add.png

908 Bytes

app/assets/stylesheets/images/icons/briefcase.png

635 Bytes

app/assets/stylesheets/images/icons/bullet-red-sm.png

338 Bytes

app/assets/stylesheets/images/icons/cross.png

285 Bytes

app/assets/stylesheets/images/icons/edit.png

1.13 KB

app/assets/stylesheets/images/icons/github.png

1.57 KB

app/assets/stylesheets/images/icons/ical.png

1.59 KB

app/assets/stylesheets/images/icons/required.png

198 Bytes

app/assets/stylesheets/images/icons/right-arrow.png

847 Bytes

app/assets/stylesheets/images/icons/trash.png

1.59 KB

app/assets/stylesheets/images/icons/unlink_github.png

1.87 KB

app/assets/stylesheets/images/icons/up.png

837 Bytes

app/assets/stylesheets/images/icons/user.png

822 Bytes

app/assets/stylesheets/images/notebook.png

91 Bytes

app/assets/stylesheets/images/resolved-badge-bg.png

75 Bytes

app/views/apps/index.html.haml
1 1 - content_for :title, t('.title')
2 2 - content_for :action_bar do
3   - %span= link_to(t('.new_app'), new_app_path, :class => 'add') if current_user.admin?
  3 + - if current_user.admin?
  4 + %span
  5 + = link_to(new_app_path) do
  6 + %i.fa.fa-plus-circle
  7 + = t('.new_app')
4 8  
5 9 %table.apps
6 10 %thead
... ...
app/views/deploys/index.html.haml
1 1 - content_for :title, 'Deploys'
2 2 - content_for :action_bar do
3 3 - if current_user.authentication_token
4   - %span= link_to 'iCal', app_deploys_path(@app, :format => "ics", :auth_token => current_user.authentication_token), :class => "calendar_link"
  4 + %span
  5 + = link_to app_deploys_path(@app, :format => "ics", :auth_token => current_user.authentication_token) do
  6 + %i.fa.fa-calendar
  7 + iCal
5 8 = render 'table', :deploys => @deploys
6 9 = paginate @deploys
7 10  
... ...
app/views/problems/show.html.haml
... ... @@ -16,8 +16,10 @@
16 16 %span= link_to 'resolve', [:resolve, app, problem], :method => :put,
17 17 :data => { :confirm => problem_confirm('resolve_one') }, :class => 'resolve'
18 18 - if current_user.authentication_token
19   - %span= link_to 'iCal', polymorphic_path([app, problem], :format => "ics",
20   - :auth_token => current_user.authentication_token), :class => "calendar_link"
  19 + %span
  20 + = link_to polymorphic_path([app, problem], :format => "ics", :auth_token => current_user.authentication_token) do
  21 + %i.fa.fa-calendar
  22 + iCal
21 23 %span>= link_to 'up', (request.env['HTTP_REFERER'] ? :back : app_problems_path(app)), :class => 'up'
22 24 %br
23 25 = render "issue_tracker_links"
... ...
app/views/shared/_flash_messages.html.haml
1 1 - unless flash.keys.empty?
2 2 %ul#flash-messages
3 3 - flash.each do |type, message|
4   - %li{:class => type}= message
5 4 \ No newline at end of file
  5 + %li{:class => type}= message
... ...
app/views/shared/_link_github_account.html.haml
1 1 - if Errbit::Config.github_authentication && user == current_user
2 2 - if user.github_account?
3   - %span.unlink_github= link_to "Unlink GitHub account", unlink_github_user_path(user), :method => :delete, :data => { :confirm => "Are you sure?" }
  3 + %span.github= link_to "Unlink GitHub account", unlink_github_user_path(user), :method => :delete, :data => { :confirm => "Are you sure?" }
4 4 - else
5 5 %span.github= link_to "Link GitHub account", user_omniauth_authorize_path(:github)
... ...
app/views/shared/_navigation.html.haml
1 1 #nav-bar
2 2 %ul
3   - %li.apps{:class => active_if_here(:apps)}= link_to t('.apps'), apps_path
4   - %li.errs{:class => active_if_here(:problems)}= link_to t('.errors'), problems_path
  3 + %li{:class => active_if_here(:apps)}
  4 + = link_to apps_path do
  5 + %i.fa.fa-briefcase
  6 + = t('.apps')
  7 + %li{:class => active_if_here(:problems)}
  8 + = link_to problems_path do
  9 + %i.fa.fa-warning
  10 + = t('.errors')
5 11 - if user_signed_in? && current_user.admin?
6   - %li.users{:class => active_if_here(:users)}= link_to t('.users'), users_path
  12 + %li{:class => active_if_here(:users)}
  13 + = link_to users_path do
  14 + %i.fa.fa-users
  15 + = t('.users')
7 16 %div.clear
... ...
app/views/shared/_session.html.haml
1 1 - if current_user
2 2 %ul#session-links
3   - %li= link_to t('.sign_out'), destroy_session_path(:user), :id => 'sign-out', :method => :delete
  3 + %li
  4 + = link_to destroy_session_path(:user), :id => 'sign-out', :method => :delete do
  5 + %i.fa.fa-circle
  6 + = t('.sign_out')
  7 +
4 8 %li= link_to t('.edit_profile'), edit_user_path(current_user), :id => 'edit-profile'
... ...
app/views/users/index.html.haml
1 1 - content_for :title, 'Users'
2 2 - content_for :action_bar do
3   - %span= link_to('Add a New User', new_user_path, :class => 'add')
  3 + %span
  4 + = link_to(new_user_path) do
  5 + %i.fa.fa-plus-circle
  6 + = t('.new')
4 7  
5 8 %table.users
6 9 %thead
... ...
app/views/users/show.html.haml
... ... @@ -7,7 +7,6 @@
7 7  
8 8 - content_for :action_bar do
9 9 = render 'shared/link_github_account'
10   - %span= link_to('Add a New User', new_user_path, :class => 'add')
11 10 = link_to 'edit', edit_user_path(user), :class => 'button'
12 11 = link_to 'destroy', user_path(user), :method => :delete,
13 12 :data => { :confirm => t('users.confirm_delete') }, :class => 'delete button'
... ...
config/locales/en.yml
... ... @@ -84,6 +84,8 @@ en:
84 84 confirm_delete: "Permanently delete this comment?"
85 85 users:
86 86 confirm_delete: "Permanently delete this user?"
  87 + index:
  88 + new: Add a New User
87 89 apps:
88 90 confirm_delete: "Permanently delete this app?"
89 91 confirm_destroy_all_problems: "Permanently delete all of this app's errors?"
... ...