Title / Description
Code <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 %>
Author
Highlight as C C++ CSS Clojure Delphi ERb Groovy (beta) HAML HTML JSON Java JavaScript PHP Plain text Python Ruby SQL XML YAML diff code