1
0
mirror of https://github.com/jcwimer/wrestlingApp synced 2026-05-12 16:59:00 +00:00

Removing bootstrap buttons all over the place and replacing with font awesome icons

This commit is contained in:
2019-02-11 16:29:00 +00:00
parent 5a800fccb9
commit 77c416597a
8 changed files with 89 additions and 132 deletions

View File

@@ -9,33 +9,29 @@
// pagingType: "bootstrap";
// } );
</script>
<% if user_signed_in? %>
<%= link_to 'New Tournament', new_tournament_path, :class=>"btn btn-success" %>
<% end %>
</br>
</br>
<table class="table table-striped table-bordered table-condensed" id="tournamentList">
<br>
<table class="table table-hover table-condensed" id="tournamentList">
<thead>
<tr>
<th>Name</th>
<th>Date</th>
<th></th>
<th><% if user_signed_in? %><%= link_to ' New Tournament', new_tournament_path, :class=>"fas fa-plus" %></th><% end %>
</tr>
</thead>
<tbody>
<% @tournaments.each do |tournament| %>
<tr>
<td><%= tournament.name %></td>
<td><%= link_to "#{tournament.name}", tournament %></td>
<td><%= tournament.date %></td>
<td><%= link_to 'Show', tournament, :class=>"btn btn-default btn-sm" %>
<% if can? :manage, tournament %>
<%= link_to 'Edit', edit_tournament_path(tournament), :class=>"btn btn-primary btn-sm" %>
<% end %>
<% if can? :destroy, tournament %>
<%= link_to 'Destroy', tournament, method: :delete, data: { confirm: 'Are you sure?' }, :class=>"btn btn-danger btn-sm" %>
<% end %>
</td>
<td>
<%= link_to '', edit_tournament_path(tournament), :class=>"fas fa-edit" %>
<% if can? :destroy, tournament %>
<%= link_to '', tournament, method: :delete, data: { confirm: "Are you sure you want to delete #{tournament.name}?" }, :class=>"fas fa-trash-alt" %>
<% end %>
</td>
<% end %>
</tr>
<% end %>
</tbody>

View File

@@ -27,16 +27,11 @@
<br>
<h3>School Lineups</h3>
<br>
<% if can? :manage, @tournament %>
<%= link_to "New #{@tournament.name} School" , "/schools/new?tournament=#{@tournament.id}", :class=>"btn btn-success btn-sm" %>
<br>
<br>
<% end %>
<table class="table table-striped table-bordered table-condensed">
<table class="table table-hover table-condensed">
<thead>
<tr>
<th>Name</th>
<th></th>
<% if can? :manage, @tournament %><th><%= link_to " New School" , "/schools/new?tournament=#{@tournament.id}", :class=>"fas fa-plus" %></th><% end %>
</tr>
</thead>
@@ -44,14 +39,15 @@
<tbody>
<% @schools.each do |school| %>
<tr>
<td><%= school.name %></td>
<td><%= link_to 'Show', school, :class=>"btn btn-default btn-sm" %>
<td><%= link_to "#{school.name}", school %>
<% if can? :manage, school %>
<%= link_to 'Edit', edit_school_path(school), :class=>"btn btn-primary btn-sm" %>
<% end %>
<% if can? :manage, @tournament %>
<%= link_to 'Destroy', school, method: :delete, data: { confirm: 'Are you sure?' }, :class=>"btn btn-danger btn-sm" %>
<td><%= link_to '', edit_school_path(school), :class=>"fas fa-edit" %>
<% if can? :manage, @tournament %>
<%= link_to '', school, method: :delete, data: { confirm: "Are you sure you want to delete #{school.name}?" }, :class=>"fas fa-trash-alt" %>
<% end %>
</td>
<% end %>
</td>
</tr>
<% end %>
@@ -63,31 +59,26 @@
<h3>Weight Class Seeds</h3>
<br>
<% if can? :manage, @tournament %>
<%= link_to "New #{@tournament.name} Weight" , "/weights/new?tournament=#{@tournament.id}", :class=>"btn btn-success btn-sm" %>
<br>
<br>
<% end %>
<table class="table table-striped table-bordered table-condensed">
<table class="table table-hover table-condensed">
<thead>
<tr>
<th>Weight Class</th>
<th>Bracket Size</th>
<th></th>
<% if can? :manage, @tournament %><th><%= link_to " New Weight Class" , "/weights/new?tournament=#{@tournament.id}", :class=>"fas fa-plus" %></th><% end %>
</tr>
</thead>
<tbody>
<% @weights.each do |weight| %>
<tr>
<td><%= weight.max %></td>
<td><%= link_to "#{weight.max} lbs", weight %></td>
<td><%= weight.bracket_size %></td>
<td><%= link_to 'Show', weight, :class=>"btn btn-default btn-sm" %>
<% if can? :manage, @tournament %>
<%= link_to 'Edit', edit_weight_path(weight), :class=>"btn btn-primary btn-sm" %>
<%= link_to 'Destroy', weight, method: :delete, data: { confirm: 'Are you sure?' }, :class=>"btn btn-danger btn-sm" %>
<td>
<%= link_to '', edit_weight_path(weight), :class=>"fas fa-edit" %>
<%= link_to '', weight, method: :delete, data: { confirm: "Are you sure you want to delete the #{weight.max} weight class?" }, :class=>"fas fa-trash-alt" %>
</td>
<% end %>
</td>
</tr>
<% end %>
</tbody>
@@ -96,29 +87,24 @@
<% if can? :manage, @tournament %>
<br>
<br>
<h3>Mats</h3>
<br>
<%= link_to "New #{@tournament.name} Mat" , "/mats/new?tournament=#{@tournament.id}", :class=>"btn btn-success btn-sm" %>
<br>
<br>
<table class="table table-striped table-bordered table-condensed">
<h3>Mats</h3><br>
<table class="table table-hover table-condensed">
<thead>
<tr>
<th>Name</th>
<th></th>
<th><%= link_to " New Mat" , "/mats/new?tournament=#{@tournament.id}", :class=>"fas fa-plus" %></th>
</tr>
</thead>
<tbody>
<% @mats.each do |mat| %>
<tr>
<td><%= mat.name %></td>
<td>
<td><%= link_to "Mat #{mat.name}", mat %></td>
<% if can? :manage, @tournament %>
<%= link_to 'Show', mat, :class=>"btn btn-default btn-sm" %>
<%= link_to 'Destroy', mat, method: :delete, data: { confirm: 'Are you sure?' }, :class=>"btn btn-danger btn-sm" %>
<td>
<%= link_to '', mat, method: :delete, data: { confirm: "Are you sure you want to delete Mat #{mat.name}?" }, :class=>"fas fa-trash-alt" %>
</td>
<% end %>
</td>
</tr>
<% end %>
</tbody>