-
Notifications
You must be signed in to change notification settings - Fork 1
Redo game show page #124
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: integration
Are you sure you want to change the base?
Redo game show page #124
Changes from all commits
3a8f8f3
ca73a65
4b730dc
4f55251
8701778
5e7648a
dc042a2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,97 +1,105 @@ | ||
| <div class ="game-show"> | ||
| <div> | ||
| <div id="home-slideshow" class="carousel slide" data-ride="carousel"> | ||
| <% if @game.pictures.length.zero? %> | ||
| <div class="carousel-inner" role="listbox"> | ||
| <%= image_tag "fallback/default.png", class: "carousel-image" %> | ||
| </div> | ||
| <% else %> | ||
| <ol class="carousel-indicators"> | ||
| <% @game.pictures.each_with_index do |pic, i| %> | ||
| <li data-target="#home-slideshow" data-slide-to= <%= "#{i}" %> | ||
| <% if i == 0 %> | ||
| class="active"> | ||
| <% else %> | ||
| class=""> | ||
| <% end %> | ||
| </li> | ||
| <div class="container-fluid"> | ||
| <div class="row"> | ||
| <div class="col-md-6 col-sm-6"> | ||
| <h2 style="font-weight:bold; margin-bottom: 20px; color: #EF7030;"><%= @game.title %></h2> | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Avoid inlining styles. Can put this in a class? You could use a selector such as |
||
| <p><%= @game.description %></p> | ||
| <!-- game management begins --> | ||
| <% if (user_is_dev? && @game.user_id == current_user.id ) || | ||
| user_is_admin? %> | ||
| <p>Type: | ||
| <% @game.taggings.map do |tagging| %> | ||
| <%= Tag.find(tagging.tag_id).name %> | | ||
| <% end %> | ||
| </p> | ||
| <div class="container-fluid" style="background-color: steelblue"> | ||
| <%# if can?(:manage, @game) %> | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you delete this line?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you delete this line? |
||
| <% if user_is_admin? || | ||
| ( user_is_dev? && @game.user_id == current_user.id) %> | ||
| <div class="radiolist"> | ||
| <%= simple_form_for(@game) do |f| %> | ||
| <%= f.error_notification %> | ||
| <p> | ||
| <%= link_to "Download Game", @game.download_button, class: "btn btn-default" %> | ||
| <% if @game.may_approve? %> | ||
| <%= f.button :submit, Game::STATE_APPROVE, value: "Approve Game" %> | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This should be indented one more level. |
||
| <% end %> | ||
| <% if @game.may_reject? %> | ||
| <%= f.button :submit, Game::STATE_REJECT, value: "Reject Game" %> | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. One more indent. |
||
| <% end %> | ||
| </ol> | ||
| <div class="carousel-inner" role="listbox"> | ||
| <% @game.pictures.each_with_index do |picture, index| %> | ||
| <% url = picture.url %> | ||
| <% if index == 0 %> | ||
| <div class="item active"> | ||
| <%= image_tag url, class: "carousel-image" %> | ||
| </div> | ||
| <% else %> | ||
| <div class="item"> | ||
| <%= image_tag url, class: "carousel-image" %> | ||
| </div> | ||
| <% end %> | ||
| <% end %> | ||
| </p> | ||
| <% end %> | ||
| </div> | ||
| <% end %> | ||
| <%# if (can? :manage, @game ) %> | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Delete this one too. It's not used 😎
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Delete me! I no longer have purpose in life. 😨 |
||
|
|
||
| <div> | ||
| <p> | ||
| <%= link_to "Download Pdf", game_review_path(@game.id), class:"btn btn-default" %> | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| <%= link_to "Download Game", @game.attachment_url, class:"btn btn-default" %> | ||
| <%= link_to "Download Crash", href="#", class:"btn btn-default" %> | ||
| </p> | ||
| </div> | ||
| </div> | ||
| <% end %> | ||
| </div> | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The indent level on this closing div isn't quite right. |
||
| <!-- end of game management --> | ||
| <div class="col-md-6 col-sm-6"> | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this div used at all? Please fix the indenting. 🤓 |
||
| <!-- image carousel begins --> | ||
| <div> | ||
| <div id="home-slideshow" class="carousel slide" data-ride="carousel"> | ||
| <ol class="carousel-indicators"> | ||
|
|
||
| <% @game.pictures.each_with_index do |pic, i| %> | ||
| <li data-target="#home-slideshow" data-slide-to= <%= "#{i}" %> | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Remove the space after |
||
| <% if i == 0 %> | ||
| class="active"> | ||
| <% else %> | ||
| > | ||
| <% end %> | ||
| </li> | ||
| <% end %> | ||
| </ol> | ||
| <div class="carousel-inner" role="listbox"> | ||
| <% @game.pictures.each_with_index do |picture, index| %> | ||
| <% url = picture.carousel.url %> | ||
| <% if index == 0 %> | ||
| <div class="item active"> | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Indenting should be two spaces |
||
| <%= image_tag url, class: "carousel-image" %> | ||
| </div> | ||
| <% else %> | ||
| <div class="item"> | ||
| <%= image_tag url, class: "carousel-image" %> | ||
| </div> | ||
| <% end %> | ||
| <% end %> | ||
| </div> | ||
| </div> | ||
| <div class="container sentences"> | ||
| <!-- --> | ||
| <h2 style="font-weight:bold; margin-bottom: 20px; color: #EF7030;"><%= @game.title %></h2> | ||
|
|
||
| </div> | ||
|
|
||
| <!-- end of image carousel --> | ||
| <div> | ||
| <!-- game stats begin --> | ||
|
|
||
| <p class="char1">Made by: <%= @game.user_company %></p> | ||
| <p>Date: <%= @game.formatted_created_at %></p> | ||
| <p>Type: <%= @game.type_display %></p> | ||
| <p>Last in Arcade: <%= @game.last_in_arcade %></p> | ||
| <p>Played: <%= @game.reviews_count %> times</p> | ||
| <p>Overall Rating: <%= @game.reviews_count %></p> | ||
|
|
||
| <%# if can?(:manage, @game) %> | ||
| <% if user_is_admin? || | ||
| ( user_is_dev? && @game.user_id == current_user.id) %> | ||
| <%= @game.download_button %> | ||
| <div class="radiolist"> | ||
| <%= simple_form_for(@game) do |f| %> | ||
| <%= f.error_notification %> | ||
| <div> | ||
| <% if @game.may_approve? %> | ||
| <%= f.button :submit, Game::STATE_APPROVE %> | ||
| <% end %> | ||
| <% if @game.may_reject? %> | ||
| <%= f.button :submit, Game::STATE_REJECT %> | ||
| <% end %> | ||
| </div> | ||
| <% end %> | ||
| </div> | ||
| <% end %> | ||
|
|
||
| <%# if (can? :manage, @game ) %> | ||
| <% if (user_is_dev? && @game.user_id == current_user.id ) || | ||
| user_is_admin? %> | ||
| <div> | ||
| <p>Type: | ||
| <% @game.taggings.map do |tagging| %> | ||
| <%= Tag.find(tagging.tag_id).name %> | | ||
| <% end %> | ||
| </p> | ||
| </div> | ||
|
|
||
| <div class="container"> | ||
| <%= button_to "Download Pdf", game_review_path(@game.id), class:"orange" %> | ||
| <%= button_to "Download Game", @game.attachment_url, class:"orange" %> | ||
| <%= button_to "Download Crash", href="#", class:"orange" %> | ||
| </div> | ||
| <% end %> | ||
|
|
||
| <!-- end of game stats --> | ||
| <% if user_is_gamer? %> | ||
| <div> | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Too much indenting here. |
||
| <%= button_to "Buy", @game.link, class:"orange" %> | ||
| <%= button_to "Buy", @game.link, class:"btn btn-default" %> | ||
| </div> | ||
| <% end %> | ||
|
|
||
| <div class="container"> | ||
| <!-- <div class="back-btn-update"><%= button_to "Back", games_path, class:"orange" %></div> --> | ||
| </div> | ||
|
|
||
| </div> | ||
|
|
||
| </div> | ||
| </div> | ||
| </div> | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you remove the space between
class =? Bridge the divide! ✊