Skip to content

Commit

Permalink
[webui] Refactor titles for subcription's notification page
Browse files Browse the repository at this point in the history
Better titles and explanations about what means each section
  • Loading branch information
Moises Deniz Aleman committed Oct 25, 2017
1 parent 5126a78 commit 680f7f4
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,15 @@

legend { font-size: 110%; font-weight: bold; }
}

#notification_form hr {
background-color: #ddd;
margin: 1.5em 10px;
}

#notification_form p.description {
min-height: 17px;
font-size: 12px;
color: #586069;
margin-left: 20px;
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
%h3 Events to get email for ...
- i = 0
- @subscriptions_form.subscriptions_by_event.each do |event_class, subscriptions|
= field_set_tag event_class.description do
Expand Down
2 changes: 2 additions & 0 deletions src/api/app/views/webui/subscriptions/index.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
.grid_16.alpha.omega.box.box-shadow
= render partial: 'webui/configuration/tabs'
%h2= @pagetitle
%h3 Events
%p.description Choose default notification settings for events (checked means direct email)
= form_tag(notifications_path, method: :put, id: 'notification_form') do
= render partial: 'subscriptions_form'
%p= submit_tag 'Update'
9 changes: 7 additions & 2 deletions src/api/app/views/webui/users/subscriptions/index.html.haml
Original file line number Diff line number Diff line change
@@ -1,18 +1,23 @@
- @layouttype = 'custom'
- @pagetitle = "#{User.current.to_s.capitalize}'s Notifications"
- @pagetitle = "Notifications"
- @crumb_list = [@pagetitle]
.grid_16.alpha.omega.box.box-shadow
%h2= @pagetitle

= form_tag(user_notifications_path, method: :put, id: 'notification_form') do
- unless @groups_users.empty?
%h3 Get mails if in group ...
%h3 Groups
%p.description You will receive emails from the checked groups
%hr
%ul{ style: "list-style-type:none;" }
- @groups_users.each do |group_user|
%li
= check_box_tag group_user.group, '1', group_user.email
= label_tag group_user.group.title
%h3 Events
%p.description Choose how you receive notifications from the events generated
%hr
= render partial: 'webui/subscriptions/subscriptions_form'
%p= submit_tag 'Update'
.grid_16.alpha.omega.box.box-shadow
Expand Down

0 comments on commit 680f7f4

Please sign in to comment.