diff options
author | nfoy <nfoy@purdue.edu> | 2014-04-27 19:12:01 -0400 |
---|---|---|
committer | nfoy <nfoy@purdue.edu> | 2014-04-27 19:12:01 -0400 |
commit | 07dbbeb404dedcf9733262ae2ce9cdddc086bb0e (patch) | |
tree | 469fa6747aa8485b5101ffb1596c7d6014aeab6d /app/views | |
parent | bd1699969017c8c8f056808ba33e906426962754 (diff) |
Tournament index now displays game images.
Images must be named the exact name of the game and be of the .png format.
Diffstat (limited to 'app/views')
-rw-r--r-- | app/views/common/_show_tournament.html.erb | 4 | ||||
-rw-r--r-- | app/views/users/show.html.erb | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/app/views/common/_show_tournament.html.erb b/app/views/common/_show_tournament.html.erb index a9569b6..280d59d 100644 --- a/app/views/common/_show_tournament.html.erb +++ b/app/views/common/_show_tournament.html.erb @@ -1,5 +1,6 @@ <div class="row tournament-listing"> - <div class="col-md-2 col-sm-3 col-xs-6"><%= image_tag('http://www.gravatar.com/avatar/' + Digest::MD5.hexdigest(target.hosts.first.email) + '?s=100&d=mm', class: "t-image") %> + <div class="col-md-2 col-sm-3 col-xs-6"> + <%= image_tag(target.game.name.downcase.tr(" ", "_") + ".png", class: "t-image") %> <p class="t-game"> <%= Game.find(target.game_id).name %></p> </div> <div class="col-md-8 col-sm-7 col-xs-6"> @@ -8,6 +9,7 @@ <div class="row" style="margin-left:2%;"> <div class="col-md-4 host"> Hosted by: <%= target.hosts.first.name %> + <%= image_tag('http://www.gravatar.com/avatar/' + Digest::MD5.hexdigest(target.hosts.first.email) + '?s=45&d=identicon', class: "t-image") %> </div> <div class="col-md-4 things"> <p> Players per team: <%= target.min_players_per_team %></p> diff --git a/app/views/users/show.html.erb b/app/views/users/show.html.erb index a67aed9..b408589 100644 --- a/app/views/users/show.html.erb +++ b/app/views/users/show.html.erb @@ -2,7 +2,7 @@ <h1> <%= @user.user_name %>'s Profile </h1> <p> - <%= image_tag 'http://www.gravatar.com/avatar/' + Digest::MD5.hexdigest(@user.email) + '?s=100&d=mm' %> + <%= image_tag 'http://www.gravatar.com/avatar/' + Digest::MD5.hexdigest(@user.email) + '?s=100&d=identicon' %> </p> <p> |