diff --git a/app/assets/stylesheets/main.css b/app/assets/stylesheets/main.css index d611301..6fdd88d 100755 --- a/app/assets/stylesheets/main.css +++ b/app/assets/stylesheets/main.css @@ -811,7 +811,9 @@ table { max-width: 100%; background-color: transparent; border-collapse: collapse; - border-spacing: 0; } + border-spacing: 0; + table-layout: fixed; +} .table { width: 100%; diff --git a/app/controllers/admin_controller.rb b/app/controllers/admin_controller.rb index 69655f9..e39c011 100644 --- a/app/controllers/admin_controller.rb +++ b/app/controllers/admin_controller.rb @@ -1,2 +1,7 @@ class AdminController < ApplicationController + + def dashboard + @users = User.all + end + end diff --git a/app/views/admin/dashboard.html.erb b/app/views/admin/dashboard.html.erb new file mode 100644 index 0000000..39a95ed --- /dev/null +++ b/app/views/admin/dashboard.html.erb @@ -0,0 +1,84 @@ +
+
+
+
+
+
+
+ + Manage Users +
+
+
+
+ + + + + + + + + + + <% @users.each do |u|%> + + + + + + + <% end %> + +
+ Name + + Email + + Admin User + + Action +
+ <%= "#{u.first_name} #{u.last_name}"%> + + <%= u.email%> + + <%= u.admin ? "Yes" : nil %> + + <%= link_to "Edit", "#", {:class => "btn btn-inverse"}%> + <%= link_to "Delete", "#", {:class => "btn btn-danger"}%> + +
+
+
+ +
+
+
+
+
+
+
+ + + + +<%= javascript_include_tag "jquery.dataTables.js"%> + + \ No newline at end of file diff --git a/app/views/layouts/shared/_sidebar.html.erb b/app/views/layouts/shared/_sidebar.html.erb index de6da6e..f4789d1 100755 --- a/app/views/layouts/shared/_sidebar.html.erb +++ b/app/views/layouts/shared/_sidebar.html.erb @@ -1,6 +1,6 @@