first release
This commit is contained in:
8
app/views/users/_form.html.erb
Normal file
8
app/views/users/_form.html.erb
Normal file
@@ -0,0 +1,8 @@
|
||||
<%= 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 %>
|
||||
6
app/views/users/edit.html.erb
Normal file
6
app/views/users/edit.html.erb
Normal file
@@ -0,0 +1,6 @@
|
||||
<h1>Editing user</h1>
|
||||
|
||||
<%= render 'form' %>
|
||||
|
||||
<%= link_to 'Show', @user %> |
|
||||
<%= link_to 'Back', users_path %>
|
||||
4
app/views/users/index.html.erb
Normal file
4
app/views/users/index.html.erb
Normal file
@@ -0,0 +1,4 @@
|
||||
<h1>Listing users</h1>
|
||||
<% @users.each do |u| %>
|
||||
<%= link_to u.name, u %> (<%= u.ign %>)
|
||||
<% end %>
|
||||
5
app/views/users/new.html.erb
Normal file
5
app/views/users/new.html.erb
Normal file
@@ -0,0 +1,5 @@
|
||||
<h1>New user</h1>
|
||||
|
||||
<%= render 'form' %>
|
||||
|
||||
<%= link_to 'Back', users_path %>
|
||||
10
app/views/users/show.html.erb
Normal file
10
app/views/users/show.html.erb
Normal file
@@ -0,0 +1,10 @@
|
||||
<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 %>
|
||||
Reference in New Issue
Block a user