diff options
| author | mo khan <mo@mokhan.ca> | 2015-02-03 21:51:27 -0700 |
|---|---|---|
| committer | mo khan <mo@mokhan.ca> | 2015-02-03 21:51:27 -0700 |
| commit | ffd510c781a76c97172f369ce54db1322fd49791 (patch) | |
| tree | a366e13f934899d3353bf9ffcf4eea78caffedb7 | |
| parent | 2e606951fa8ec259f41820192e768566fae1804f (diff) | |
add foundation classes and nav.
| -rw-r--r-- | app/views/agents/edit.html.erb | 12 | ||||
| -rw-r--r-- | app/views/agents/index.html.erb | 52 | ||||
| -rw-r--r-- | app/views/agents/new.html.erb | 10 | ||||
| -rw-r--r-- | app/views/agents/show.html.erb | 19 | ||||
| -rw-r--r-- | app/views/dispositions/edit.html.erb | 14 | ||||
| -rw-r--r-- | app/views/dispositions/index.html.erb | 53 | ||||
| -rw-r--r-- | app/views/dispositions/new.html.erb | 10 | ||||
| -rw-r--r-- | app/views/dispositions/show.html.erb | 26 | ||||
| -rw-r--r-- | app/views/events/index.html.erb | 53 | ||||
| -rw-r--r-- | app/views/events/new.html.erb | 10 | ||||
| -rw-r--r-- | app/views/layouts/application.html.erb | 18 |
11 files changed, 166 insertions, 111 deletions
diff --git a/app/views/agents/edit.html.erb b/app/views/agents/edit.html.erb index bed9b23..7e8b939 100644 --- a/app/views/agents/edit.html.erb +++ b/app/views/agents/edit.html.erb @@ -1,6 +1,10 @@ -<h1>Editing Agent</h1> +<div class="row"> + <div class="small-12 columns"> + <h1>Editing Agent</h1> -<%= render 'form' %> + <%= render 'form' %> -<%= link_to 'Show', @agent %> | -<%= link_to 'Back', agents_path %> + <%= link_to 'Show', @agent %> | + <%= link_to 'Back', agents_path %> + </div> +</div> diff --git a/app/views/agents/index.html.erb b/app/views/agents/index.html.erb index 48a36e2..3a6b738 100644 --- a/app/views/agents/index.html.erb +++ b/app/views/agents/index.html.erb @@ -1,28 +1,28 @@ -<p id="notice"><%= notice %></p> +<div class="row"> + <div class="small-12 columns"> + <p id="notice"><%= notice %></p> -<h1>Listing Agents</h1> + <h1>Listing Agents</h1> + <%= link_to 'New Agent', new_agent_path, class: 'button' %> -<table> - <thead> - <tr> - <th>Hostname</th> - <th colspan="4"></th> - </tr> - </thead> - - <tbody> - <% @agents.each do |agent| %> - <tr> - <td><%= agent.hostname %></td> - <td><%= link_to 'Events', agent_events_path(agent) %></td> - <td><%= link_to 'Show', agent %></td> - <td><%= link_to 'Edit', edit_agent_path(agent) %></td> - <td><%= link_to 'Destroy', agent, method: :delete, data: { confirm: 'Are you sure?' } %></td> - </tr> - <% end %> - </tbody> -</table> - -<br> - -<%= link_to 'New Agent', new_agent_path %> + <table> + <thead> + <tr> + <th>Hostname</th> + <th colspan="4"></th> + </tr> + </thead> + <tbody> + <% @agents.each do |agent| %> + <tr> + <td><%= agent.hostname %></td> + <td><%= link_to 'Events', agent_events_path(agent) %></td> + <td><%= link_to 'Show', agent %></td> + <td><%= link_to 'Edit', edit_agent_path(agent) %></td> + <td><%= link_to 'Destroy', agent, method: :delete, data: { confirm: 'Are you sure?' } %></td> + </tr> + <% end %> + </tbody> + </table> + </div> +</div> diff --git a/app/views/agents/new.html.erb b/app/views/agents/new.html.erb index 782236f..ce5d37a 100644 --- a/app/views/agents/new.html.erb +++ b/app/views/agents/new.html.erb @@ -1,5 +1,9 @@ -<h1>New Agent</h1> +<div class="row"> + <div class="small-12 columns"> + <h1>New Agent</h1> -<%= render 'form' %> + <%= render 'form' %> -<%= link_to 'Back', agents_path %> + <%= link_to 'Back', agents_path %> + </div> +</div> diff --git a/app/views/agents/show.html.erb b/app/views/agents/show.html.erb index 0e7a061..61fad2c 100644 --- a/app/views/agents/show.html.erb +++ b/app/views/agents/show.html.erb @@ -1,9 +1,14 @@ -<p id="notice"><%= notice %></p> +<div class="row"> + <div class="small-12 columns"> + <p id="notice"><%= notice %></p> -<p> - <strong>Hostname:</strong> - <%= @agent.hostname %> -</p> + <p> + <strong>Hostname:</strong> + <%= @agent.hostname %> + </p> -<%= link_to 'Edit', edit_agent_path(@agent) %> | -<%= link_to 'Back', agents_path %> + <%= link_to 'Edit', edit_agent_path(@agent) %> | + <%= link_to 'Events', agent_events_path(@agent) %> | + <%= link_to 'Back', agents_path %> + </div> +</div> diff --git a/app/views/dispositions/edit.html.erb b/app/views/dispositions/edit.html.erb index 6d50123..4bdd9b4 100644 --- a/app/views/dispositions/edit.html.erb +++ b/app/views/dispositions/edit.html.erb @@ -1,6 +1,12 @@ -<h1>Editing Disposition</h1> +<div class="row"> + <div class="small-12 columns"> -<%= render 'form' %> + <h1>Editing Disposition</h1> + -<%= link_to 'Show', @disposition %> | -<%= link_to 'Back', dispositions_path %> + <%= render 'form' %> + + <%= link_to 'Show', @disposition %> | + <%= link_to 'Back', dispositions_path %> + </div> +</div> diff --git a/app/views/dispositions/index.html.erb b/app/views/dispositions/index.html.erb index 903acbb..c4f8023 100644 --- a/app/views/dispositions/index.html.erb +++ b/app/views/dispositions/index.html.erb @@ -1,29 +1,34 @@ -<p id="notice"><%= notice %></p> -<h1>Listing Dispositions</h1> +<div class="row"> + <div class="small-12 columns"> + <p id="notice"><%= notice %></p> -<table> - <thead> - <tr> - <th>Fingerprint</th> - <th>State</th> - <th colspan="3"></th> - </tr> - </thead> + <h1>Listing Dispositions</h1> + <ul class="button-group"> + <li> <%= link_to 'New Disposition', new_disposition_path, class: 'button' %> </li> + </ul> - <tbody> - <% @dispositions.each do |disposition| %> - <tr> - <td><%= disposition.fingerprint %></td> - <td><%= disposition.state %></td> - <td><%= link_to 'Show', disposition %></td> - <td><%= link_to 'Edit', edit_disposition_path(disposition) %></td> - <td><%= link_to 'Destroy', disposition, method: :delete, data: { confirm: 'Are you sure?' } %></td> - </tr> - <% end %> - </tbody> -</table> + <table> + <thead> + <tr> + <th>Fingerprint</th> + <th>State</th> + <th colspan="3"></th> + </tr> + </thead> -<br> + <tbody> + <% @dispositions.each do |disposition| %> + <tr> + <td><%= disposition.fingerprint %></td> + <td><%= disposition.state %></td> + <td><%= link_to 'Show', disposition %></td> + <td><%= link_to 'Edit', edit_disposition_path(disposition) %></td> + <td><%= link_to 'Destroy', disposition, method: :delete, data: { confirm: 'Are you sure?' } %></td> + </tr> + <% end %> + </tbody> + </table> -<%= link_to 'New Disposition', new_disposition_path %> + </div> +</div> diff --git a/app/views/dispositions/new.html.erb b/app/views/dispositions/new.html.erb index 103c10a..46a801c 100644 --- a/app/views/dispositions/new.html.erb +++ b/app/views/dispositions/new.html.erb @@ -1,5 +1,9 @@ -<h1>New Disposition</h1> +<div class="row"> + <div class="small-12 columns"> + <h1>New Disposition</h1> -<%= render 'form' %> + <%= render 'form' %> -<%= link_to 'Back', dispositions_path %> + <%= link_to 'Back', dispositions_path %> + </div> +</div> diff --git a/app/views/dispositions/show.html.erb b/app/views/dispositions/show.html.erb index c9437f4..b60f875 100644 --- a/app/views/dispositions/show.html.erb +++ b/app/views/dispositions/show.html.erb @@ -1,14 +1,18 @@ -<p id="notice"><%= notice %></p> +<div class="row"> + <div class="small-12 columns"> + <p id="notice"><%= notice %></p> -<p> - <strong>Fingerprint:</strong> - <%= @disposition.fingerprint %> -</p> + <p> + <strong>Fingerprint:</strong> + <%= @disposition.fingerprint %> + </p> -<p> - <strong>State:</strong> - <%= @disposition.state %> -</p> + <p> + <strong>State:</strong> + <%= @disposition.state %> + </p> -<%= link_to 'Edit', edit_disposition_path(@disposition) %> | -<%= link_to 'Back', dispositions_path %> + <%= link_to 'Edit', edit_disposition_path(@disposition) %> | + <%= link_to 'Back', dispositions_path %> + </div> +</div> diff --git a/app/views/events/index.html.erb b/app/views/events/index.html.erb index bf0480c..32f6562 100644 --- a/app/views/events/index.html.erb +++ b/app/views/events/index.html.erb @@ -1,29 +1,30 @@ -<p id="notice"><%= notice %></p> +<div class="row"> + <div class="small-12 columns"> + <p id="notice"><%= notice %></p> -<h1>Listing Events</h1> + <h1>Listing Events</h1> + <%= link_to 'New Event', new_agent_event_path(@agent), class: 'button' %> -<table> - <thead> - <tr> - <th>Name</th> - <th>Data</th> - <th>Created At</th> - <th></th> - </tr> - </thead> + <table> + <thead> + <tr> + <th>Name</th> + <th>Data</th> + <th>Created At</th> + <th></th> + </tr> + </thead> - <tbody> - <% @events.each do |event| %> - <tr> - <td><%= event.name %></td> - <td><%= event.data %></td> - <td><%= event.created_at %></td> - <td><%= link_to 'Destroy', [@agent, event], method: :delete, data: { confirm: 'Are you sure?' } %></td> - </tr> - <% end %> - </tbody> -</table> - -<br> - -<%= link_to 'New Event', new_agent_event_path(@agent) %> + <tbody> + <% @events.each do |event| %> + <tr> + <td><%= event.name %></td> + <td><%= event.data %></td> + <td><%= event.created_at %></td> + <td><%= link_to 'Destroy', [@agent, event], method: :delete, data: { confirm: 'Are you sure?' } %></td> + </tr> + <% end %> + </tbody> + </table> + </div> +</div> diff --git a/app/views/events/new.html.erb b/app/views/events/new.html.erb index 1c0b206..ed30f02 100644 --- a/app/views/events/new.html.erb +++ b/app/views/events/new.html.erb @@ -1,5 +1,9 @@ -<h1>New Event</h1> +<div class="row"> + <div class="small-12 columns"> + <h1>New Event</h1> -<%= render 'form' %> + <%= render 'form' %> -<%= link_to 'Back', agent_events_path(@agent) %> + <%= link_to 'Back', agent_events_path(@agent) %> + </div> +</div> diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index 7222aa8..dde8e33 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -13,6 +13,24 @@ </head> <body> + <div class="contain-to-grid sticky"> + <nav class="top-bar" data-topbar role="navigation" data-options="sticky_on: large"> + <ul class="title-area"> + <li class="name"> + <h1><a href="#">malwer</a></h1> + </li> + <!-- Remove the class "menu-icon" to get rid of menu icon. Take out "Menu" to just have icon alone --> + <li class="toggle-topbar menu-icon"><a href="#"><span>Menu</span></a></li> + </ul> + + <section class="top-bar-section"> + <ul class="left"> + <li><%= link_to "Agents", agents_path %></li> + <li><%= link_to "Dispositions", dispositions_path %></li> + </ul> + </section> + </nav> + </div> <%= yield %> |
