plugins/push_notification/views/push_notification_plugin_myprofile/index.html.erb
<h1><%= t("push_notification_plugin.controllers.myprofile.my_devices") %></h1>
<% if @devices.blank? %>
<div><%= t("push_notification_plugin.controllers.myprofile.no_devices")%></div>
<% else %>
<table>
<tr>
<th><%= t("push_notification_plugin.lib.plugin.device")%></th>
<th><%= t("push_notification_plugin.lib.plugin.actions") %></th>
</tr>
<% @devices.each do |d| %>
<tr>
<td><%= d.device_name %></td>
<td><%= button_without_text(:delete, t('push_notification_plugin.controllers.myprofile.delete_device'), {:controller => "push_notification_plugin_myprofile", :action => "delete_device", :params => {:device => d}}, method: :delete, id: "delete_device_#{d.id}") %></td>
</tr>
<% end %>
</table>
<% end %>
<%= form_for(:settings, :url => {:controller => "push_notification_plugin_myprofile", :action => "update_settings"}) do |f| %>
<h1><%= t('push_notification_plugin.lib.plugin.enabled_notifications') %></h1>
<%= render partial: "notification_events_form", locals: {f: f, settings: @settings} %>
<%= button_bar do %>
<%= submit_button(:save, _('Save')) %>
<%= button(:back, _('Back to control panel'), :controller => (profile.nil? ? 'admin_panel': 'profile_editor')) %>
<% end %>
<% end %>