fixed tab inconsistancy issues, moved create new project at top of container for better ui experience and remove if else project.length logic as it seemed uneeded - warvox - VoIP based wardialing tool, forked from rapid7/warvox.
DIR Log
DIR Files
DIR Refs
DIR README
---
DIR commit 91a334615ef8dd1585d142ce615b9683c7690fb3
DIR parent a7ed1585a04b520a7a84acf517968df24010170c
HTML Author: zeknox <mccann.brandon@gmail.com>
Date: Fri, 23 Oct 2015 23:32:56 -0500
fixed tab inconsistancy issues, moved create new project at top of container for better ui experience and remove if else project.length logic as it seemed uneeded
Diffstat:
M app/views/projects/index.html.erb | 72 ++++++++++++++-----------------
M spec/factories/jobs.rb | 2 +-
2 files changed, 34 insertions(+), 40 deletions(-)
---
DIR diff --git a/app/views/projects/index.html.erb b/app/views/projects/index.html.erb
@@ -1,46 +1,40 @@
-<% if @projects.length > 0 %>
<h1 class='title'>WarVOX Projects</h1>
+<p>
+ <a class="btn" href="<%= new_project_path %>">
+ <i class="fa fa-plus"></i> Create Project
+ </a>
+</p>
<%= will_paginate @projects, :renderer => BootstrapPagination::Rails %>
-<table id='projects-table' class='table table-striped ' width='90%'>
- <thead>
- <tr>
- <th>Name</th>
- <th>Description</th>
- <th>Jobs</th>
- <th>Calls</th>
- <th>Analyzed</th>
- <th>Created</th>
- <th>Actions</th>
- </tr>
- </thead>
- <tbody>
-
-<% @projects.each do |project| %>
- <tr>
- <td><%= link_to( h(project.name), project_path(project)) %></td>
- <td><%=truncate(project.description, :length => 40, :separator => '') %></td>
- <td><%= number_with_delimiter(project.jobs.count) %></td>
- <td><%= number_with_delimiter(project.calls.count) %></td>
- <td><%= number_with_delimiter(project.calls.where('analysis_completed_at IS NOT NULL').count) %></td>
- <td><%= time_ago_in_words(project.created_at) %> ago</td>
- <td>
- <a class="btn" href="<%= edit_project_path(project) %>"rel="tooltip" title="Update Project Information"><i class="fa fa-pencil"></i></a>
- <a class="btn" href="<%= project_path(project) %>" data-confirm="Delete this project?" data-method="delete" rel="nofollow tooltip" title="Delete Project"><i class="fa fa-trash"></i></a>
- </td>
- </tr>
-
-<% end %>
-</tbody>
+<table id='projects-table' class='table table-striped' width='90%'>
+ <thead>
+ <tr>
+ <th>Name</th>
+ <th>Description</th>
+ <th>Jobs</th>
+ <th>Calls</th>
+ <th>Analyzed</th>
+ <th>Created</th>
+ <th>Actions</th>
+ </tr>
+ </thead>
+ <tbody>
+ <% @projects.each do |project| %>
+ <tr>
+ <td><%= link_to( h(project.name), project_path(project)) %></td>
+ <td><%=truncate(project.description, :length => 40, :separator => '') %></td>
+ <td><%= number_with_delimiter(project.jobs.count) %></td>
+ <td><%= number_with_delimiter(project.calls.count) %></td>
+ <td><%= number_with_delimiter(project.calls.where('analysis_completed_at IS NOT NULL').count) %></td>
+ <td><%= time_ago_in_words(project.created_at) %> ago</td>
+ <td>
+ <a class="btn" href="<%= edit_project_path(project) %>"rel="tooltip" title="Update Project Information"><i class="fa fa-pencil"></i></a>
+ <a class="btn" href="<%= project_path(project) %>" data-confirm="Delete this project?" data-method="delete" rel="nofollow tooltip" title="Delete Project"><i class="fa fa-trash"></i></a>
+ </td>
+ </tr>
+ <% end %>
+ </tbody>
</table>
<%= will_paginate @projects, :renderer => BootstrapPagination::Rails %>
-<% else %>
-
-<h1 class='title'>No Projects</h1>
-<br/>
-
-<% end %>
-
-<a class="btn" href="<%= new_project_path %>"><i class="fa fa-plus"></i> Create Project </a>
DIR diff --git a/spec/factories/jobs.rb b/spec/factories/jobs.rb
@@ -27,7 +27,7 @@ FactoryGirl.define do
error nil
range { Faker::PhoneNumber.phone_number }
cid_mask { Faker::PhoneNumber.phone_number }
- seconds { Faker::Number.between(1, 300) }
+ seconds { Faker::Number.between(1, 299) }
lines { Faker::Number.between(1, 10000) }
end