many things, comments working.

This commit is contained in:
jomo
2013-06-24 13:29:39 +02:00
parent 7a894f4f6a
commit fb52e8bed2
44 changed files with 490 additions and 223 deletions

View File

@@ -1,8 +0,0 @@
<%= simple_form_for @user do |f| %>
<%= f.input :name %>
<%= f.input :ign %>
<%= f.input :email %>
<%= f.input :password %>
<%= f.input :password_confirmation %>
<%= f.submit %>
<% end %>

View File

@@ -1,5 +1,10 @@
<h1>New user</h1>
<h1>Register</h1>
<%= render 'form' %>
<%= link_to 'Back', users_path %>
<%= simple_form_for @user do |f| %>
<%= f.input :name %>
<%= f.input :ign, label: "Ingame name" %>
<%= f.input :email %>
<%= f.input :password %>
<%= f.input :password_confirmation %>
<%= f.submit "Register" %>
<% end %>

View File

@@ -1,10 +1,14 @@
<div id="user-info"%>
<%= image_tag Tools.avatar_url(@user.id, 128), :class => "user-avatar", :alt => "avatar" %><br/>
<% if @user.banned %>
<span class="user-banned">This user is banned!</span>
<% end %>
IGN: <%= @user.ign %><br/>
Rank: <%= Tools.int_to_rank(@user.rank) %><br/>
Joined: <%= @user.created_at.strftime("%e. %b %Y") %><br/>
Last IP: <%= @user.last_ip %><br/>
About: <%= @user.about.blank? ? "<span class=\"no-about\">nothing</span>".html_safe : @user.about %>
<div id="user-info">
<div id="edit_profile"><%= link_to "edit profile", edit_user_path(@user), :class => "btn-blue" %></div>
<%= image_tag avatar_url(@user.id), :class => "user-avatar avatar", :alt => "avatar" %><br/>
<% if @user.banned %>
<span class="user-banned">This user is banned!</span>
<% end %>
IGN: <%= @user.ign %><br/>
Rank: <%= int_to_rank(@user.rank) %><br/>
Joined: <%= @user.created_at.strftime("%e. %b %Y") %><br/>
<% if current_user && current_user.rank >= rank_to_int("mod") %>
Last IP: <%= @user.last_ip %><br/>
<% end %>
About: <%= @user.about.blank? ? "<span class=\"no-about\">nothing</span>".html_safe : @user.about %>
</div>