journalduhacker/app/views/settings/index.html.erb

237 lines
6 KiB
Plaintext
Raw Normal View History

2012-07-01 20:31:31 +02:00
<div class="box wide">
2012-07-04 03:48:01 +02:00
<div class="legend right">
2016-07-09 14:31:09 +02:00
<a href="/u/<%= @user.username %>"><%= t('.viewprofile') %></a>
</div>
<div class="legend">
2016-07-09 14:31:09 +02:00
<%= t('.accountsettings') %>
2012-07-04 03:48:01 +02:00
</div>
2012-11-13 18:43:03 +01:00
<%= form_for @edit_user, :url => settings_path, :method => :post,
2014-02-12 20:14:25 +01:00
:html => { :id => "edit_user" } do |f| %>
2012-07-01 20:31:31 +02:00
<%= error_messages_for f.object %>
<div class="boxline">
2016-07-09 14:31:09 +02:00
<%= f.label :username, t('.username'), :class => "required" %>
2012-07-04 03:48:01 +02:00
<%= f.text_field :username, :size => 15 %>
2012-07-01 20:31:31 +02:00
<span class="hint">
<tt><%= User.username_regex %></tt>
2012-07-01 20:31:31 +02:00
</span>
</div>
<div class="boxline">
2016-07-09 14:31:09 +02:00
<%= f.label :password, t('.password'), :class => "required" %>
<%= f.password_field :password, :size => 40, :autocomplete => "off" %>
2012-07-01 20:31:31 +02:00
</div>
2012-11-13 18:43:03 +01:00
2012-07-01 20:31:31 +02:00
<div class="boxline">
2016-07-09 14:31:09 +02:00
<%= f.label :password_confirmation, t('.confirmpassword'),
2012-07-01 20:31:31 +02:00
:class => "required" %>
<%= f.password_field :password_confirmation, :size => 40,
:autocomplete => "off" %>
2012-07-04 03:48:01 +02:00
</div>
2012-11-13 18:43:03 +01:00
2012-07-04 03:48:01 +02:00
<div class="boxline">
2016-07-09 14:31:09 +02:00
<%= f.label :email, t('.emailaddress'), :class => "required" %>
2012-07-04 03:48:01 +02:00
<%= f.text_field :email, :size => 40 %>
<span class="hint">
2016-07-09 14:31:09 +02:00
<%= raw(t('.gravatarized')) %>
</span>
2012-07-01 20:31:31 +02:00
</div>
2012-11-13 18:43:03 +01:00
2012-07-01 20:31:31 +02:00
<div class="boxline">
2016-07-09 14:31:09 +02:00
<%= f.label :about, t('.about'), :class => "required" %>
2012-07-10 19:16:10 +02:00
<%= f.text_area :about, :size => "100x5", :style => "width: 600px;" %>
2012-07-01 20:31:31 +02:00
</div>
<div class="box">
2012-07-10 19:16:10 +02:00
<div class="boxline markdown_help_toggler" style="margin-left: 9em;
width: 600px;">
2012-07-01 20:31:31 +02:00
<div class="markdown_help_label">
2016-07-09 14:31:09 +02:00
<%= t('.markdownformattingavailable') %>
2012-07-01 20:31:31 +02:00
</div>
<div style="clear: both;"></div>
<%= render :partial => "global/markdownhelp" %>
</div>
</div>
2012-11-13 18:43:03 +01:00
<p>
2016-07-09 14:31:09 +02:00
<%= f.submit t('.saveaccountsettings') %>
</p>
<br>
<div class="legend">
2016-07-09 14:31:09 +02:00
<%= t('.notificationsettings') %>
</div>
<div class="boxline">
<%= f.label :pushover_user_key,
2016-07-09 14:31:09 +02:00
raw(t(".pushover")),
:class => "required" %>
<%= link_to((f.object.pushover_user_key.present??
2016-07-09 14:31:09 +02:00
t('.managepushoversubscription') : t('.subscribewithpushover')),
"/settings/pushover", :class => "pushover_button", :method => :post) %>
<span class="hint">
2016-07-09 14:31:09 +02:00
<%= t('.foroptionalcomment') %>
</span>
</div>
<br>
2012-07-01 20:31:31 +02:00
<div class="legend">
2016-07-09 14:31:09 +02:00
<%= t('.commentreplynotificationsettings') %>
2012-07-01 20:31:31 +02:00
</div>
<div class="boxline">
2016-07-09 14:31:09 +02:00
<%= f.label :email_replies, t('.receiveemail'), :class => "required" %>
2012-07-01 20:31:31 +02:00
<%= f.check_box :email_replies %>
</div>
<div class="boxline">
2016-07-09 14:31:09 +02:00
<%= f.label :pushover_replies, t('.receivepushover'),
2012-07-04 03:48:01 +02:00
:class => "required" %>
2012-07-01 20:31:31 +02:00
<%= f.check_box :pushover_replies %>
2012-07-04 03:48:01 +02:00
<span class="hint">
2016-07-09 14:31:09 +02:00
<%= t('.requirepushover') %>
2012-07-04 03:48:01 +02:00
</span>
</div>
<br>
<div class="legend">
2016-07-09 14:31:09 +02:00
<%= t('.commentmentionnotificationsettings') %>
</div>
<div class="boxline">
2016-07-09 14:31:09 +02:00
<%= f.label :email_mentions, t('.receiveemail'), :class => "required" %>
<%= f.check_box :email_mentions %>
</div>
<div class="boxline">
2016-07-09 14:31:09 +02:00
<%= f.label :pushover_mentions, t('.receivepushover'),
:class => "required" %>
<%= f.check_box :pushover_mentions %>
<span class="hint">
2016-07-09 14:31:09 +02:00
<%= t('.requirepushover') %>
</span>
</div>
<br>
2012-07-04 03:48:01 +02:00
<div class="legend">
2016-07-09 14:31:09 +02:00
<%= t('.privatemessagenotificationsettings') %>
2012-07-01 20:31:31 +02:00
</div>
<div class="boxline">
2016-07-09 14:31:09 +02:00
<%= f.label :email_messages, t('.receiveemail'), :class => "required" %>
2012-07-04 03:48:01 +02:00
<%= f.check_box :email_messages %>
2012-07-01 20:31:31 +02:00
</div>
<div class="boxline">
2016-07-09 14:31:09 +02:00
<%= f.label :pushover_messages, t('.receivepushover'),
2012-07-01 20:31:31 +02:00
:class => "required" %>
2014-02-02 20:49:34 +01:00
<%= f.check_box :pushover_messages %>
2012-07-04 03:48:01 +02:00
<span class="hint">
2016-07-09 14:31:09 +02:00
<%= t('.requirepushover') %>
2012-07-04 03:48:01 +02:00
</span>
2012-07-01 20:31:31 +02:00
</div>
<br>
<div class="legend">
2016-07-09 14:31:09 +02:00
<%= t('.submittedstorycommentsettings') %>
</div>
<div class="boxline">
<%= f.label :show_submitted_story_threads,
2016-07-09 14:31:09 +02:00
raw(t('.showyourthreads')),
:class => "required" %>
<%= f.check_box :show_submitted_story_threads %>
</div>
<br>
<div class="legend">
2016-07-09 14:31:09 +02:00
<%= t('.mailinglistsettings') %>
</div>
<p>
2016-07-09 14:31:09 +02:00
<%= raw(t('.mailinglisttext')) %>
</p>
<div class="boxline">
2016-07-09 14:31:09 +02:00
<%= f.label :mailing_list_mode, t('.receivelistemails'),
:class => "required" %>
2016-07-09 14:31:09 +02:00
<%= f.select :mailing_list_mode, [ [ t('.listemailoption1'), 0 ],
[ t('.listemailoption2'), 1 ], [ t('.listemailoption3'), 2 ] ] %>
</div>
<div class="boxline">
2016-07-09 14:31:09 +02:00
<label class="required"><%= t('.listaddress') %></label>
<span>
<tt><%= Rails.application.shortname %>-<%=
@edit_user.mailing_list_token %>@<%= Rails.application.domain %></tt>
</span>
</div>
<br>
<div class="legend">
2016-07-09 14:31:09 +02:00
<%= t('.miscsettings') %>
</div>
<div class="boxline">
2016-07-09 14:31:09 +02:00
<%= f.label :show_story_previews, t('.storypreview'),
:class => "required" %>
<%= f.check_box :show_story_previews %>
</div>
2015-07-31 20:06:42 +02:00
<div class="boxline">
2016-07-09 14:31:09 +02:00
<%= f.label :show_avatars, t('.useravatars'), :class => "required" %>
2015-07-31 20:06:42 +02:00
<%= f.check_box :show_avatars %>
</div>
2012-07-01 20:31:31 +02:00
<br>
2016-07-09 14:31:09 +02:00
<%= f.submit t('.saveallsettings') %>
2012-07-01 20:31:31 +02:00
<% end %>
2012-11-13 18:43:03 +01:00
2012-07-04 03:48:01 +02:00
<br>
<br>
<a name="invite"></a>
<div class="legend">
2016-07-09 14:31:09 +02:00
<%= t('.inviteuser') %>
</div>
<% if @user.can_invite? %>
<%= render :partial => "users/invitationform" %>
<% else %>
2016-07-09 14:31:09 +02:00
<%= t('.cannotsendinvitations') %>
<% end %>
<br>
<br>
<%= form_for @edit_user, :url => delete_account_path, :method => :post,
2014-02-12 20:14:25 +01:00
:html => { :id => "delete_user" } do |f| %>
<div class="legend">
2016-07-09 14:31:09 +02:00
<%= t('.deleteaccount') %>
</div>
<p>
2016-07-09 14:31:09 +02:00
<%= t('.deleteaccounttext') %>
</p>
<div class="boxline">
2016-07-09 14:31:09 +02:00
<%= f.label :password, t('.verifypassword'), :class => "required" %>
<%= f.password_field :password, :size => 40, :autocomplete => "off" %>
</div>
<br>
2016-07-09 14:31:09 +02:00
<%= f.submit t('.deleteaccountconfirmation') %>
<% end %>
2012-07-01 20:31:31 +02:00
</div>