Skip to content

Commit

Permalink
Merge pull request #37 from StemboltHQ/users_can_access_any_bet_from_…
Browse files Browse the repository at this point in the history
…view_bets_page_raw

Add view button for every displayed Bet in /bets
  • Loading branch information
LeonTenko authored Apr 5, 2017
2 parents b036dee + df3143b commit d876757
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
5 changes: 5 additions & 0 deletions app/assets/stylesheets/bets/view-all-bets.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.view-all-bets{
.view-button-text{
font-size: 0.8em;
}
}
11 changes: 9 additions & 2 deletions app/views/bets/_bet.html.erb
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
<tr>
<tr class="row view-all-bets">
<td class="col-md-2"><%= bet.creator_id %></td>
<td class="col-md-2"><%= bet.created_at %></td>
<td class="col-md-2"><%= bet.expires_at %></td>
<td class="col-md-2"><%= bet.bet_total %></td>
<td class="col-md-4"><%= bet.bet %></td>
<td class="col-md-3"><%= bet.bet %></td>
<td class="col-md-1">
<%= link_to bet, class: 'btn btn-secondary', role: 'button' do %>
<div class="text-center view-button-text">
<span>View <i class="fa fa-eye"></i></span>
</div>
<% end %>
</td>
</tr>
2 changes: 1 addition & 1 deletion app/views/bets/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<div class="col col-lg-12">
<table class="table table-hover">
<thead class="thead-default">
<tr>
<tr class="row">
<th class="col-md-2">Created By</th>
<th class="col-md-2">Created at</th>
<th class="col-md-2">Expires at</th>
Expand Down

0 comments on commit d876757

Please sign in to comment.