From 10c6417874129f03f3d2125c5df460865bad2797 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Thu, 1 May 2014 17:02:37 -0400 Subject: clean up grep-able issues in forms (mostly using

instead of

) --- app/views/users/new.html.erb | 54 +++++++++++++++++++------------------- app/views/users/show.html.erb | 61 +++++++++++++++++++++---------------------- 2 files changed, 57 insertions(+), 58 deletions(-) (limited to 'app/views/users') diff --git a/app/views/users/new.html.erb b/app/views/users/new.html.erb index 5c88945..95b56a9 100644 --- a/app/views/users/new.html.erb +++ b/app/views/users/new.html.erb @@ -1,34 +1,34 @@

Sign Up

<%= form_for @user do |f| %> - <%= render "common/error_messages", :target => @user %> -

- <%= f.label :name %>
- <%= f.text_field :name %> -

-

- <%= f.label :email %>
- <%= f.text_field(:email, type: "email") %> -

-

- <%= f.label :user_name %>
- <%= f.text_field :user_name %> -

-

- <%= f.label :password %>
- <%= f.password_field :password %> -

-

- <%= f.label(:password_confirmation, "Confirm Password") %>
- <%= f.password_field :password_confirmation %> -

-

- <%= show_simple_captcha %> - - <%= f.submit("Be a Leaguer", :class => "signup") %> -

+ <%= render "common/error_messages", :target => @user %> +
+ <%= f.label :name %>
+ <%= f.text_field :name %> +
+
+ <%= f.label :email %>
+ <%= f.text_field(:email, type: "email") %> +
+
+ <%= f.label :user_name %>
+ <%= f.text_field :user_name %> +
+
+ <%= f.label :password %>
+ <%= f.password_field :password %> +
+
+ <%= f.label(:password_confirmation, "Confirm Password") %>
+ <%= f.password_field :password_confirmation %> +
+
+ <%= show_simple_captcha %> +
+
+ <%= f.submit("Be a Leaguer", :class => "signup") %> +
<% end %> - <%= link_to 'Already Have an Account? Log in', new_session_path, :class => "signin" %> diff --git a/app/views/users/show.html.erb b/app/views/users/show.html.erb index b247b7d..cd232a3 100644 --- a/app/views/users/show.html.erb +++ b/app/views/users/show.html.erb @@ -2,56 +2,55 @@

<%= @user.user_name %>'s Profile

- <%= image_tag 'http://www.gravatar.com/avatar/' + Digest::MD5.hexdigest(@user.email) + '?s=100&d=identicon' %> + <%= image_tag 'http://www.gravatar.com/avatar/' + Digest::MD5.hexdigest(@user.email) + '?s=100&d=identicon' %>

- Email: - <%= @user.email %> -

- + Name: + <%= @user.name %>

- Preferred name: - <%= @user.user_name %> -

- Relationship Status: - too single + Alias: + <%= @user.user_name %> +

+ Email: + <%= @user.email %>

- -

-<% if @user.remote_usernames[0].nil? %> +<% if @user.remote_usernames.empty? and @user.check_permission(current_user, :edit) %> <%= form_for @user do |f| %> - - <%= f.submit "Add Username", :class => 'signup' %> +

+ +
+ + <%= f.submit "Add Username", :class => 'signup' %> +
+
<% end %> <% end %> -

-
-

Recent Tournaments Played

+

Recent Tournaments Played

    <% @user.tournaments_played.each do |t| %>
  • <%= t.name %>
  • <% end %>
-
-
-

Recent Tournaments Hosted

- <% if @user.tournaments_hosted.count == 0 %>

<%= @user.user_name %> has never hosted a tournament

<%end %> -
    - <% @user.tournaments_hosted.each do |t| %> -
  • <%= t.name %>
  • - <% end %> -
+
+
+

Recent Tournaments Hosted

+ <% if @user.tournaments_hosted.empty? %> +

<%= @user.user_name %> has never hosted a tournament.

+ <% else %> +
    + <% @user.tournaments_hosted.each do |t| %> +
  • <%= t.name %>
  • + <% end %> +
+ <% end %>
-<%= link_to 'Edit', edit_user_path(@user) %> | -<%= link_to 'All Users', users_path %> +<%= link_to 'Edit', edit_user_path(@user), role: :button %> -- cgit v1.2.3