continue to backport old code
This commit is contained in:
@@ -1,2 +1,5 @@
|
||||
<h1>Home#index</h1>
|
||||
<p>Find me in app/views/home/index.html.erb</p>
|
||||
<% if user_signed_in? %>
|
||||
<h1>Welcome <%= current_user.battletag %></h1>
|
||||
<% else %>
|
||||
<h1>Welcome guest</h1>
|
||||
<% end %>
|
||||
|
||||
@@ -1,24 +1,33 @@
|
||||
<nav class="navbar fixed-top navbar-dark navbar-expand-lg bg-dark">
|
||||
<nav class="navbar navbar-dark navbar-expand-lg bg-dark">
|
||||
<div class="container-fluid">
|
||||
<a class="navbar-brand" href="#">Northwhale 2</a>
|
||||
<a class="navbar-brand" href="<%= root_path %>">Northwhale 2</a>
|
||||
<div class="collapse navbar-collapse" id="navbarSupportedContent">
|
||||
<ul class="nav navbar-nav flex-row ml-md-auto d-none d-md-flex">
|
||||
<li class="nav-item">
|
||||
<% if user_signed_in? %>
|
||||
<% if user_signed_in? %>
|
||||
<ul class="navbar-nav mb-2 mb-lg-0">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link active" aria-current="page" href="<%= wow_characters_path %>">Characters</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link active" aria-current="page" href="<%= wow_mounts_path %>">Mounts</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link active" aria-current="page" href="<%= wow_pets_path %>">Pets</a>
|
||||
</li>
|
||||
</ul>
|
||||
<ul class="navbar-nav ms-auto mb-2 mb-lg-0">
|
||||
<li class="nav-item dropdown">
|
||||
<a class="nav-link dropdown-toggle" id="navbarDropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">
|
||||
Menu
|
||||
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">
|
||||
Menu
|
||||
</a>
|
||||
<ul class="dropdown-menu" aria-labelledby="navbarDropdown">
|
||||
<li>Bnet: <%= current_user.battletag %></li>
|
||||
<ul class="dropdown-menu dropdown-menu-end" aria-labelledby="navbarDropdown">
|
||||
<li class="dropdown-item disabled" >Bnet:<%= current_user.battletag %></li>
|
||||
<li><hr class="dropdown-divider"></li>
|
||||
<li><%= link_to '<i class="fas fa-sign-out-alt"></i>'.html_safe, destroy_user_session_path, method: :delete %></li>
|
||||
<li><%= link_to '<i class="fas fa-sign-out-alt"></i>'.html_safe, destroy_user_session_path, method: :delete, class: "dropdown-item" %></li>
|
||||
</ul>
|
||||
</li>
|
||||
<% else %>
|
||||
<%= link_to 'Sign in with <i class="fab fa-battle-net"></i>'.html_safe, user_bnet_omniauth_authorize_path, method: :post, class: "btn btn-primary" %>
|
||||
<%= link_to 'Sign in with <i class="fab fa-battle-net"></i>'.html_safe, user_bnet_omniauth_authorize_path, method: :post, class: "btn btn-primary nav-item" %>
|
||||
<% end %>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -15,6 +15,8 @@
|
||||
<%= render 'layouts/navbar' %>
|
||||
<p class="notice"><%= notice %></p>
|
||||
<p class="alert"><%= alert %></p>
|
||||
<div class="container-fluid">
|
||||
<%= yield %>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -4,26 +4,26 @@
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col"></th>
|
||||
<th scope="col">Name</th>
|
||||
<th scope="col">Gender</th>
|
||||
<th scope="col">Realm</th>
|
||||
<th scope="col">Race</th>
|
||||
<th scope="col">Class</th>
|
||||
<th scope="col">Faction</th>
|
||||
<th scope="col">Level</th>
|
||||
<th scope="col"><%= t('character_list.name') %></th>
|
||||
<th scope="col"><%= t('character_list.gender') %></th>
|
||||
<th scope="col"><%= t('character_list.realm') %></th>
|
||||
<th scope="col"><%= t('character_list.race') %></th>
|
||||
<th scope="col"><%= t('character_list.class') %></th>
|
||||
<th scope="col"><%= t('character_list.faction') %></th>
|
||||
<th scope="col"><%= t('character_list.level') %></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% @characters.each do |character| %>
|
||||
<% @wow_characters.each do |character| %>
|
||||
<tr>
|
||||
<td><% if character.wow_character_medium %>
|
||||
<img class="rounded-circle border border-white" src=<%= character.wow_character_medium.avatar %> alt="avatar">
|
||||
<% end %></td>
|
||||
<td><%= character.name %></td>
|
||||
<td><%= link_to character.name, character %></td>
|
||||
<td><%= character.translated_gender %></td>
|
||||
<td><%= character.wow_realm.name %></td>
|
||||
<td><%= %></td>
|
||||
<td><%= %></td>
|
||||
<td><%= character.gender_race_name %></td>
|
||||
<td><%= character.gender_class_name %></td>
|
||||
<td><%= character.translated_faction %></td>
|
||||
<td><%= character.level %></td>
|
||||
</tr>
|
||||
|
||||
19
app/views/wow_characters/show.html.erb
Normal file
19
app/views/wow_characters/show.html.erb
Normal file
@@ -0,0 +1,19 @@
|
||||
<div class="row">
|
||||
<div class="col-5">
|
||||
<% if @wow_character.wow_character_medium %>
|
||||
<img src=<%= @wow_character.wow_character_medium.main_raw %> class="card-img-top" alt="character-main-image">
|
||||
<% end %>
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h5 class="card-title"><%= @wow_character.title_name %></h5>
|
||||
<p class="card-text"><%= @wow_character.gender_race_name %></p>
|
||||
<p class="card-text"><%= @wow_character.gender_class_name %></p>
|
||||
<p class="card-text"><%= @wow_character.last_login_timestamp %></p>
|
||||
<a href="#" class="btn btn-primary">Go somewhere</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-7">
|
||||
Post du perso
|
||||
</div>
|
||||
</div>
|
||||
20
app/views/wow_mounts/index.html.erb
Normal file
20
app/views/wow_mounts/index.html.erb
Normal file
@@ -0,0 +1,20 @@
|
||||
<h2>Mount list</h2>
|
||||
|
||||
<table class="table table-hover table-dark table-image">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col"><%= t('mount_list.name') %></th>
|
||||
<th scope="col"><%= t('mount_list.description') %></th>
|
||||
<th scope="col"><%= t('mount_list.owned') %></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% @wow_mounts.each do |mount| %>
|
||||
<tr>
|
||||
<td><%= link_to mount.name, mount %></td>
|
||||
<td><%= mount.description %></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
17
app/views/wow_mounts/show.html.erb
Normal file
17
app/views/wow_mounts/show.html.erb
Normal file
@@ -0,0 +1,17 @@
|
||||
<div class="row">
|
||||
<div class="col-5">
|
||||
<div class="card">
|
||||
<% if @wow_mount.asset_zoom %>
|
||||
<img src=<%= @wow_mount.asset_zoom %> class="card-img-top" alt="mount-zoom-image">
|
||||
<% end %>
|
||||
<div class="card-body">
|
||||
<h5 class="card-title"><%= @wow_mount.name %></h5>
|
||||
<p class="card-text">Description: <%= @wow_mount.description %></p>
|
||||
<p class="card-text">Owned: </p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-7">
|
||||
<h1>Suite de la page de la monture</h1>
|
||||
</div>
|
||||
</div>
|
||||
20
app/views/wow_pets/index.html.erb
Normal file
20
app/views/wow_pets/index.html.erb
Normal file
@@ -0,0 +1,20 @@
|
||||
<h2>Pet list</h2>
|
||||
|
||||
<table class="table table-hover table-dark table-image">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col"><%= t('pet_list.name') %></th>
|
||||
<th scope="col"><%= t('pet_list.description') %></th>
|
||||
<th scope="col"><%= t('pet_list.owned') %></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% @wow_pets.each do |pet| %>
|
||||
<tr>
|
||||
<td><%= link_to pet.name, pet %></td>
|
||||
<td><%= pet.description %></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
19
app/views/wow_pets/show.html.erb
Normal file
19
app/views/wow_pets/show.html.erb
Normal file
@@ -0,0 +1,19 @@
|
||||
<div class="row">
|
||||
<div class="col-5">
|
||||
<div class="card">
|
||||
<% if @wow_pet.icon %>
|
||||
<img src=<%= @wow_pet.icon %> class="card-img-top" alt="pet-icon-image">
|
||||
<% end %>
|
||||
<div class="card-body">
|
||||
<h5 class="card-title"><%= @wow_pet.name %></h5>
|
||||
<p class="card-text">Description: <%= @wow_pet.description %></p>
|
||||
<% @wow_pet.wow_pet_abilities.each do |ability| %>
|
||||
<p>Ability: <%= ability.name %></p>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-7">
|
||||
<h1>Suite de la page du pet</h1>
|
||||
</div>
|
||||
</div>
|
||||
Reference in New Issue
Block a user