2014-04-15 09:59:52 +00:00
|
|
|
<h1>Account: <%= h @user.username %></h1>
|
2014-03-23 00:22:25 +00:00
|
|
|
|
2014-04-15 09:59:52 +00:00
|
|
|
<%= form_for @user, html: { multipart: true, id: 'profile', class: 'square' } do |f| %>
|
2014-03-23 00:22:25 +00:00
|
|
|
<% f.fields_for :profile do |p| %>
|
2014-04-13 11:16:51 +00:00
|
|
|
<div id="user" class="tabbed">
|
|
|
|
<ul id="user-nav" class="tabs">
|
2014-04-15 09:59:52 +00:00
|
|
|
<li><a href="#account">Account</a></li>
|
|
|
|
<li><a href="#profile">Profile</a></li>
|
|
|
|
<li><a href="#country"><%= t('profile.locals') %></a></li>
|
|
|
|
<li><a href="#notifications">Notifications</a></li>
|
2014-03-23 00:22:25 +00:00
|
|
|
</ul>
|
|
|
|
|
2014-04-13 11:16:51 +00:00
|
|
|
<div class="tabbed-contents">
|
2014-04-15 09:59:52 +00:00
|
|
|
<div class="tab" id="account">
|
2014-03-23 00:22:25 +00:00
|
|
|
<% if @user.errors.any? %>
|
2014-04-15 09:59:52 +00:00
|
|
|
<div id="errors">
|
|
|
|
<strong><%= pluralize(@user.errors.count, t(:error)) %></strong>
|
|
|
|
<ul class="errors">
|
2014-03-23 00:22:25 +00:00
|
|
|
<% @user.errors.full_messages.each do |msg| %>
|
|
|
|
<li><%= msg %></li>
|
|
|
|
<% end %>
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
<% end %>
|
2014-04-15 09:59:52 +00:00
|
|
|
<div class="fields horizontal">
|
|
|
|
<%= f.label :username, 'Username', class: 'required' %>
|
2014-03-23 00:22:25 +00:00
|
|
|
<%= f.text_field :username %>
|
2014-04-15 09:59:52 +00:00
|
|
|
</div>
|
|
|
|
<div class="fields horizontal">
|
|
|
|
<%= f.label :raw_password, "Password" %>
|
2014-03-23 00:22:25 +00:00
|
|
|
<%= f.password_field :raw_password %>
|
2014-04-15 09:59:52 +00:00
|
|
|
</div>
|
|
|
|
<div class="fields horizontal">
|
|
|
|
<%= f.label :email do %>
|
|
|
|
<p>Email</p>
|
|
|
|
<em>(only visible to admins)</em>
|
|
|
|
<% end %>
|
|
|
|
<%= f.text_field :email %>
|
|
|
|
</div>
|
|
|
|
<div class="fields horizontal">
|
|
|
|
<%= f.label :public_email %>
|
|
|
|
<%= f.check_box :public_email %>
|
|
|
|
</div>
|
|
|
|
<div class="fields horizontal">
|
|
|
|
<%= f.label :steamid %>
|
|
|
|
<%= f.text_field :steamid, html: { placeholder: 'http://steamcommunity.com/id/...' } %>
|
|
|
|
</div>
|
|
|
|
<div class="fields horizontal">
|
|
|
|
<%= f.label :firstname do %>
|
|
|
|
<p>First Name</p>
|
|
|
|
<em>(only visible to members)</em>
|
|
|
|
<% end %>
|
2014-03-23 00:22:25 +00:00
|
|
|
<%= f.text_field :firstname %>
|
2014-04-15 09:59:52 +00:00
|
|
|
</div>
|
|
|
|
<div class="fields horizontal">
|
|
|
|
<%= f.label :lastname do %>
|
|
|
|
<p>Last Name</p>
|
|
|
|
<em>(only visible to members)</em>
|
|
|
|
<% end %>
|
2014-03-23 00:22:25 +00:00
|
|
|
<%= f.text_field :lastname %>
|
2014-04-15 09:59:52 +00:00
|
|
|
</div>
|
|
|
|
<div class="fields horizontal">
|
|
|
|
<%= f.label :birthdate %>
|
|
|
|
<div class="inputs">
|
|
|
|
<%= date_select :user, :birthdate, order: [:year, :month, :day], default: @user.birthdate, start_year: 1950 %>
|
|
|
|
</div>
|
|
|
|
</div>
|
2014-03-23 00:22:25 +00:00
|
|
|
</div>
|
|
|
|
|
2014-04-15 09:59:52 +00:00
|
|
|
<div class="tab" id="profile">
|
|
|
|
<div class="fields horizontal">
|
|
|
|
<%= p.label :steam_profile, "Steam Profile URL" %>
|
2014-03-23 00:22:25 +00:00
|
|
|
<%= p.text_field :steam_profile %>
|
2014-04-15 09:59:52 +00:00
|
|
|
</div>
|
|
|
|
<div class="fields horizontal">
|
|
|
|
<%= p.label :web %>
|
2014-03-23 00:22:25 +00:00
|
|
|
<%= p.text_field :web %>
|
2014-04-15 09:59:52 +00:00
|
|
|
</div>
|
|
|
|
<div class="fields horizontal">
|
|
|
|
<%= p.label :achievements %>
|
|
|
|
<%= p.text_area :achievements, rows: 5 %>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="fields horizontal">
|
|
|
|
<%= p.label :signature %>
|
|
|
|
<%= p.text_area :signature, rows: 5 %>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="fields horizontal">
|
|
|
|
<label>Avatar</label>
|
|
|
|
<%= p.file_field :avatar %>
|
|
|
|
</div>
|
2014-03-23 00:22:25 +00:00
|
|
|
</div>
|
|
|
|
|
2014-04-15 09:59:52 +00:00
|
|
|
<div class="tab" id="country">
|
|
|
|
<div class="fields horizontal">
|
|
|
|
<%= f.label :country %>
|
|
|
|
<div class="inputs">
|
|
|
|
<%= country_code_select :user, :country %>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="fields horizontal">
|
|
|
|
<%= p.label :town %>
|
2014-03-23 00:22:25 +00:00
|
|
|
<%= p.text_field :town %>
|
2014-04-15 09:59:52 +00:00
|
|
|
</div>
|
|
|
|
<div class="fields horizontal">
|
|
|
|
<%= f.label :time_zone %>
|
|
|
|
<div class="inputs">
|
2014-04-19 01:12:02 +00:00
|
|
|
<%= f.time_zone_select :time_zone, ActiveSupport::TimeZone.all %><br><br>
|
2014-04-15 09:59:52 +00:00
|
|
|
<p>Daylight savings will be observed automatically.</p>
|
|
|
|
</div>
|
|
|
|
</div>
|
2014-03-23 00:22:25 +00:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="tab" id="notifications">
|
2014-04-15 09:59:52 +00:00
|
|
|
<h4>Notify me when...</h4>
|
|
|
|
|
|
|
|
<div class="fields horizontal">
|
|
|
|
<%= p.label :notify_news, "News item are posted" %>
|
2014-03-23 00:22:25 +00:00
|
|
|
<%= p.check_box :notify_news %>
|
2014-04-15 09:59:52 +00:00
|
|
|
</div>
|
2014-03-23 00:22:25 +00:00
|
|
|
|
2014-04-15 09:59:52 +00:00
|
|
|
<div class="fields horizontal">
|
|
|
|
<%= p.label :notify_articles, "New articles" %>
|
2014-03-23 00:22:25 +00:00
|
|
|
<%= p.check_box :notify_articles %>
|
2014-04-15 09:59:52 +00:00
|
|
|
</div>
|
2014-03-23 00:22:25 +00:00
|
|
|
|
2014-04-15 09:59:52 +00:00
|
|
|
<div class="fields horizontal">
|
|
|
|
<%= p.label :notify_movies, "New movies" %>
|
2014-03-23 00:22:25 +00:00
|
|
|
<%= p.check_box :notify_movies %>
|
2014-04-15 09:59:52 +00:00
|
|
|
</div>
|
2014-03-23 00:22:25 +00:00
|
|
|
|
2014-04-15 09:59:52 +00:00
|
|
|
<div class="fields horizontal">
|
|
|
|
<%= p.label :notify_gather, "Gather has 6 players" %>
|
2014-03-23 00:22:25 +00:00
|
|
|
<%= p.check_box :notify_gather %>
|
2014-04-15 09:59:52 +00:00
|
|
|
</div>
|
2014-03-23 00:22:25 +00:00
|
|
|
|
2014-04-15 09:59:52 +00:00
|
|
|
<div class="fields horizontal">
|
|
|
|
<%= p.label :notify_own_match, "My team's matches" %>
|
2014-03-23 00:22:25 +00:00
|
|
|
<%= p.check_box :notify_own_match %>
|
2014-04-15 09:59:52 +00:00
|
|
|
</div>
|
2014-03-23 00:22:25 +00:00
|
|
|
|
2014-04-15 09:59:52 +00:00
|
|
|
<div class="fields horizontal">
|
|
|
|
<%= p.label :notify_any_match, "New matches" %>
|
2014-03-23 00:22:25 +00:00
|
|
|
<%= p.check_box :notify_any_match %>
|
2014-04-15 09:59:52 +00:00
|
|
|
</div>
|
2014-03-23 00:22:25 +00:00
|
|
|
|
2014-04-15 09:59:52 +00:00
|
|
|
<div class="fields horizontal">
|
|
|
|
<%= p.label :notify_challenge, "New challenges" %>
|
2014-03-23 00:22:25 +00:00
|
|
|
<%= p.check_box :notify_challenge %>
|
2014-04-15 09:59:52 +00:00
|
|
|
</div>
|
2014-03-23 00:22:25 +00:00
|
|
|
|
2014-04-15 09:59:52 +00:00
|
|
|
<div class="fields horizontal">
|
|
|
|
<%= p.label :notify_pms, "Private messages" %>
|
2014-03-23 00:22:25 +00:00
|
|
|
<%= p.check_box :notify_pms %>
|
2014-04-15 09:59:52 +00:00
|
|
|
</div>
|
2014-03-23 00:22:25 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2014-04-15 09:59:52 +00:00
|
|
|
|
|
|
|
<div class="controls">
|
2014-04-01 23:07:21 +00:00
|
|
|
<%= f.submit %>
|
2014-04-15 09:59:52 +00:00
|
|
|
</div>
|
2014-03-23 00:22:25 +00:00
|
|
|
</div>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
<script type="text/javascript">
|
2014-04-13 11:16:51 +00:00
|
|
|
new Yetii({
|
|
|
|
id: 'user'
|
|
|
|
});
|
2014-03-23 00:22:25 +00:00
|
|
|
</script>
|