random
Erb
code posted
by
random
created at 04 Apr 02:29
Edit
|
Back
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 |
<h1><%=h @game.title %> <% if current_user && current_user.id != @game.user_id %> <% if @game.users.exists?(current_user.id) %> <%= link_to '(Leave)', leave_game_path(@game), :confirm=>'Do you really want to leave this game?', :style=>"float:right;" %> <% else %> <%= link_to '(Join)', join_game_path(@game), :style=>"float:right;" %> <% end %> <% end %> </h1> <span class="info"> Date and time: <%=h show_datetime @game.date_time %> </span> <% user = User.find(@game.user_id) %> Creator: <%= link_to h(user.username), user_path(user) %> <div class="small"> <b>Location:</b> <%=h @game.location %> </div> <br> <div id="gamebox"> <p><%= sanitize(@game.description) %></p> <h3>Players attending</h3> <ul> <% for user in @game.users do %> <li><%= link_to h(user.username), user_path(user) %></li> <br> <% end %> </ul> </div> <%= render :partial=>'mapdisplay', :object=>@game %> <%= render(:partial=>"comments/comments", :object=>@game.comments) %> <p> <%= link_to 'Add a message', new_game_comment_path(@game) %> </p> <% if current_user && current_user.id == @game.user_id %> <hr style="width:100%;"> <p> <%= link_to 'Edit Game Details', edit_game_path(@game) %></td> | <%= link_to 'Cancel Game', @game, :confirm => 'Are you sure?', :method => :delete %></td> </p> <% end %> |
1.33 KB in 12 ms with coderay