-
Notifications
You must be signed in to change notification settings - Fork 438
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[webui] Refactor view for subscriptions into sections
Dividing it into two section blocks to have RSS Feeds configuration apart from the notifications
- Loading branch information
Moises Deniz Aleman
committed
Oct 25, 2017
1 parent
09dd0d6
commit 47929e0
Showing
1 changed file
with
23 additions
and
22 deletions.
There are no files selected for viewing
45 changes: 23 additions & 22 deletions
45
src/api/app/views/webui/users/subscriptions/index.html.haml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,27 @@ | ||
- @layouttype = 'custom' | ||
- @pagetitle = "#{User.current.to_s.capitalize}'s Notifications" | ||
- @crumb_list = [@pagetitle] | ||
%h2= @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 ... | ||
%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 | ||
= form_tag(user_notifications_path, method: :put, id: 'notification_form') do | ||
- unless @groups_users.empty? | ||
%h3 Get mails if in group ... | ||
%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 | ||
= render partial: 'webui/subscriptions/subscriptions_form' | ||
%p= submit_tag 'Update' | ||
%br/ | ||
%br/ | ||
%h3 RSS Feed | ||
= form_tag(user_rss_token_path, id: 'generate_rss_token_form', method: :post) do | ||
%p | ||
- if @user.rss_token | ||
To access your RSS feeds, use the following url: | ||
= link_to(user_rss_notifications_url(token: @user.rss_token.string, format: 'rss'), user_rss_notifications_url(token: @user.rss_token.string, format: 'rss'), target: '_blank') | ||
- else | ||
No feed url exists for your notifications. | ||
%p= submit_tag "#{@user.rss_token ? 'Regenerate Url' : 'Generate Url'}" | ||
= render partial: 'webui/subscriptions/subscriptions_form' | ||
%p= submit_tag 'Update' | ||
.grid_16.alpha.omega.box.box-shadow | ||
%h2 RSS Feed | ||
= form_tag(user_rss_token_path, id: 'generate_rss_token_form', method: :post) do | ||
%p | ||
- if @user.rss_token | ||
To access your RSS feeds, use the following url: | ||
= link_to(user_rss_notifications_url(token: @user.rss_token.string, format: 'rss'), user_rss_notifications_url(token: @user.rss_token.string, format: 'rss'), target: '_blank') | ||
- else | ||
No feed url exists for your notifications. | ||
%p= submit_tag "#{@user.rss_token ? 'Regenerate Url' : 'Generate Url'}" |