added default bootstrap navbar

This commit is contained in:
Bret Haynie 2014-04-24 21:32:32 -04:00
parent e63409d72a
commit ca2c204b67
4 changed files with 67 additions and 43 deletions

View File

@ -1,3 +1,10 @@
nav {
background: #f9f9f9;
}
section {
margin-top: 70px;
}
$medgray: #3A9AC9;
.videolisting {

View File

@ -1,36 +1,36 @@
<h1>Listing campaigns</h1>
<table class="table table-striped">
<thead>
<tr>
<th>Listing Code(Form Hash)</th>
<th>Processed?</th>
<th>Billing Code</th>
<th>Address</th>
<th>City</th>
<th>State</th>
<th>ZIP</th>
<th></th>
<th></th>
</tr>
</thead>
<tbody>
<% @campaigns.each do |campaign| %>
<tr>
<td><%= link_to campaign.listingcode, campaign_path(campaign.listingcode) %></td>
<td><i class="glyphicon glyphicon-<% if campaign.processed? %>ok<% else %>remove<% end %>"></i> </td>
<td><%= campaign.billingcode %></td>
<td><%= campaign.address %></td>
<td><%= campaign.city %></td>
<td><%= campaign.state %></td>
<td><%= campaign.zip %></td>
<td><%= link_to 'Edit', edit_campaign_path(campaign.listingcode) %></td>
<td><%= link_to 'Destroy', campaign_path(campaign.listingcode), method: :delete, data: { confirm: 'Are you sure?' } %></td>
</tr>
<% end %>
</tbody>
</table>
<br>
<%= link_to 'New Campaign', new_campaign_path %>
<div class="container">
<section>
<h1>Listing Campaigns</h1>
<table class="table table-striped">
<thead>
<tr>
<th>Listing Code (Form Hash)</th>
<th>Processed?</th>
<th>Billing Code</th>
<th>Address</th>
<th>City</th>
<th>State</th>
<th>ZIP</th>
<th></th>
<th></th>
</tr>
</thead>
<tbody>
<% @campaigns.each do |campaign| %>
<tr>
<td><%= link_to campaign.listingcode, campaign_path(campaign.listingcode) %></td>
<td><i class="glyphicon glyphicon-<% if campaign.processed? %>ok<% else %>remove<% end %>"></i> </td>
<td><%= campaign.billingcode %></td>
<td><%= campaign.address %></td>
<td><%= campaign.city %></td>
<td><%= campaign.state %></td>
<td><%= campaign.zip %></td>
<td><%= link_to 'Edit', edit_campaign_path(campaign.listingcode) %></td>
<td><%= link_to 'Destroy', campaign_path(campaign.listingcode), method: :delete, data: { confirm: 'Are you sure?' } %></td>
</tr>
<% end %>
</tbody>
</table>
<%= link_to 'Add New Campaign', new_campaign_path %>
</section>
</div>

View File

@ -1,3 +1,4 @@
<br><br><br>
<%= link_to 'Edit', edit_campaign_path(@campaign.listingcode) %> |
<%= link_to 'Back', campaigns_path %>

View File

@ -1,7 +1,23 @@
<% if user_signed_in? %>
<%= link_to "Profile", edit_user_registration_path %>
<%= link_to "Logout", destroy_user_session_path, :method => :delete %>
<% else %>
<%= link_to "Sign in", new_user_session_path %>
<% end %>
-----
<div class="navbar navbar-inverse navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="/">VidPush</a>
</div>
<div class="navbar-collapse collapse">
<ul class="nav navbar-nav navbar-right">
<% if user_signed_in? %>
<li><%= link_to "Profile", edit_user_registration_path %></li>
<li><%= link_to "Logout", destroy_user_session_path, :method => :delete %></li>
<% else %>
<li><%= link_to "Sign in", new_user_session_path %></li>
<% end %>
</ul>
</div>
</div>
</div>