admin panel icons and sidebar layout

jamesperet 10 years ago
parent
commit
c3e18fa9e1

+ 6 - 1
app/assets/stylesheets/admin_panel.css.less

@@ -20,4 +20,9 @@ body {
20 20
 
21 21
 .bootstrap-switch.bootstrap-switch-large .bootstrap-switch-handle-on, .bootstrap-switch.bootstrap-switch-large .bootstrap-switch-handle-off, .bootstrap-switch.bootstrap-switch-large .bootstrap-switch-label {
22 22
 	font-size: 12px;
23
-}
23
+}
24
+
25
+.nav-tabs.nav-stacked > li.active > a {
26
+	background-color: #006dcc;
27
+	color: white;
28
+}

+ 8 - 8
app/views/admin_panel/_sidebar_nav.html.erb

@@ -1,23 +1,23 @@
1
-<div id="admin_navbar" data-spy="affix" data-offset-top="0px" class="span3" style="margin-top: 25px;">	
2
-	<ul class="nav nav-pills nav-stacked">
1
+<div id="admin_navbar" data-spy="affix" data-offset-top="0px" class="span3" style="margin-top: 20px;">	
2
+	<ul class="nav nav-tabs nav-stacked list-group ">
3 3
 	   
4 4
 	   <% if current_page?(:action => 'dashboard')%><li class="active"> <% else %><li><% end %>
5
-	   <%= link_to ('<i class="icon-home icon-white"></i> '+(t "admin_panel.dashboard")).html_safe, admin_dashboard_path %></li>
5
+	   <%= link_to ('<i class="fa fa-tachometer fa-fw"></i> '+(t "admin_panel.dashboard")).html_safe, admin_dashboard_path %></li>
6 6
 	   
7 7
 	   <% if current_page?(:action => 'posts')%><li class="active"> <% else %><li><% end %>
8
-	   <%= link_to ('<i class="icon-file icon-white"></i> '+(t "admin_panel.posts")).html_safe, admin_posts_path %></li>
8
+	   <%= link_to ('<i class="fa fa-file-text fa-fw"></i> '+(t "admin_panel.posts")).html_safe, admin_posts_path %></li>
9 9
 	   
10 10
 	   <% if current_page?(:action => 'files')%><li class="active"> <% else %><li><% end %>
11
-	   <%= link_to ('<i class="icon-file icon-white"></i> '+(t "admin_panel.files")).html_safe, admin_files_path %></li>
11
+	   <%= link_to ('<i class="fa fa-file-image-o fa-fw"></i> '+(t "admin_panel.files")).html_safe, admin_files_path %></li>
12 12
 	   
13 13
 	   <% if current_page?(:action => 'contact_messages')%><li class="active"> <% else %><li><% end %>
14
-	   <%= link_to ('<i class="icon-envelope icon-white"></i> '+(t "admin_panel.messages")).html_safe, admin_contact_messages_path %></li>
14
+	   <%= link_to ('<i class="fa fa-envelope fa-fw"></i> '+(t "admin_panel.messages")).html_safe, admin_contact_messages_path %></li>
15 15
 	   
16 16
 	   <% if current_page?(:action => 'users')%><li class="active"> <% else %><li><% end %>
17
-	   <%= link_to ('<i class="icon-user icon-white"></i> '+(t "admin_panel.users")).html_safe, admin_users_path %></li>
17
+	   <%= link_to ('<i class="fa fa-users fa-fw"></i> '+(t "admin_panel.users")).html_safe, admin_users_path %></li>
18 18
 	   
19 19
 	   <% if current_page?(:action => 'site_config')%><li class="active"> <% else %><li><% end %>
20
-	   <%= link_to ('<i class="icon-cog icon-white"></i> '+(t "admin_panel.configurations")).html_safe, admin_config_path %></li>
20
+	   <%= link_to ('<i class="fa fa-cog fa-fw"></i> '+(t "admin_panel.configurations")).html_safe, admin_config_path %></li>
21 21
 	   
22 22
 	</ul>
23 23
 </div>

+ 4 - 1
app/views/admin_panel/contact_messages.html.erb

@@ -2,7 +2,10 @@
2 2
 	<%= render 'admin_panel/sidebar_nav' %>
3 3
 	<div class="span9">
4 4
 		<div class="page-header">
5
-		  <h1><%= t "admin_panel.contact_messages" %></h1>
5
+		  <h1>
6
+  			<i class="fa fa-envelope"></i>
7
+			<%= t "admin_panel.contact_messages" %>
8
+		  </h1>
6 9
 		</div>
7 10
 		<%= bootstrap_flash %>
8 11
 		<% @contact_messages.each do |msg| %>

+ 7 - 3
app/views/admin_panel/dashboard.html.erb

@@ -1,9 +1,13 @@
1 1
 <div class="row">
2 2
 	<%= render 'admin_panel/sidebar_nav' %>
3 3
 	<div class="span9">
4
-		<div class="hero-unit">
5
-		  <h1><%= t "admin_panel.dashboard" %></h1>
6
-		  <p><%= t "admin_panel.welcome" %> <%= current_user.full_name%></p>
4
+		<div class="hero-unit well" style="margin-top: 20px; padding-top: 20px; padding-bottom: 30px;">
5
+		  <h1>
6
+			<span class="fa-stack fa-lg">
7
+			  <i class="fa fa-square-o fa-stack-2x"></i>
8
+			  <i class="fa fa-tachometer fa-stack-1x"></i>
9
+			</span>
10
+			   <%= t "admin_panel.dashboard" %></h1>
7 11
 		</div>
8 12
 		<%= bootstrap_flash %>
9 13
 		<div class="well summary">

+ 1 - 1
app/views/admin_panel/files.html.erb

@@ -2,7 +2,7 @@
2 2
 	<%= render 'admin_panel/sidebar_nav' %>
3 3
 	<div class="span9">
4 4
 		<div class="page-header">
5
-		  <h1><%= t "admin_panel.files" %> <%= link_to (t "admin_panel.upload_file"), new_upload_path, :class => 'btn btn-primary btn-mini' %></h1>
5
+		  <h1><i class="fa fa-file-image-o"></i> <%= t "admin_panel.files" %> <%= link_to (t "admin_panel.upload_file"), new_upload_path, :class => 'btn btn-primary btn-mini' %></h1>
6 6
 		</div>
7 7
 		<%= bootstrap_flash %>
8 8
 		<ul class="thumbnails">

+ 1 - 1
app/views/admin_panel/posts.html.erb

@@ -2,7 +2,7 @@
2 2
 	<%= render 'admin_panel/sidebar_nav' %>
3 3
 	<div class="span9">
4 4
 		<div class="page-header">
5
-		  <h1><%= t "admin_panel.posts" %> <%= link_to (t "admin_panel.new_blog_post"), new_blog_post_path, :class => 'btn btn-primary btn-mini' %></h1>
5
+		  <h1><i class="fa fa-file-text"></i> <%= t "admin_panel.posts" %> <%= link_to (t "admin_panel.new_blog_post"), new_blog_post_path, :class => 'btn btn-primary pull-right' %></h1>
6 6
 		</div>
7 7
 		<%= bootstrap_flash %>
8 8
 		<% @posts.each do |post| %>

+ 1 - 1
app/views/admin_panel/site_config.html.erb

@@ -2,7 +2,7 @@
2 2
 	<%= render 'admin_panel/sidebar_nav' %>
3 3
 	<div class="span9">
4 4
 		<div class="page-header">
5
-		  <h1><%= t "admin_panel.configurations" %> </h1>
5
+		  <h1><i class="fa fa-cog"></i> <%= t "admin_panel.configurations" %> </h1>
6 6
 		</div>
7 7
 		<%= bootstrap_flash %>
8 8
 		<div class="media thumbnail" style="padding: 10px; padding-bottom: 5px;">

+ 1 - 1
app/views/admin_panel/users.html.erb

@@ -2,7 +2,7 @@
2 2
 	<%= render 'admin_panel/sidebar_nav' %>
3 3
 	<div class="span9">
4 4
 		<div class="page-header">
5
-		  <h1><%= t "admin_panel.users" %></h1>
5
+		  <h1><i class="fa fa-users"></i> <%= t "admin_panel.users" %></h1>
6 6
 		</div>
7 7
 		<%= bootstrap_flash %>
8 8
 		<% @users.each do |user| %>

+ 1 - 1
app/views/devise/registrations/edit.html.erb

@@ -48,7 +48,7 @@
48 48
 			  <div class="form-actions" style="margin: 0px; margin-top: 15px;">
49 49
 			    <%= f.submit  t 'registration.update' %>
50 50
 			    <%= link_to (t 'nav.back'), :back, class: 'btn btn-link' %>
51
-			    <%= link_to (t 'registration.cancel_account'), registration_path(resource_name), data: { confirm: (t 'registration.cancel_confirmation') }, method: :delete, class: 'btn btn-danger btn-mini pull-right' %>
51
+			    <%= link_to ('<i class="fa fa-exclamation-triangle"></i> '+(t 'registration.cancel_account')).html_safe, registration_path(resource_name), data: { confirm: (t 'registration.cancel_confirmation') }, method: :delete, class: 'btn btn-danger pull-right' %>
52 52
 			  </div>
53 53
 		     </div>
54 54
 		 </div>

+ 1 - 1
config/locales/pt-BR.yml

@@ -205,7 +205,7 @@ pt-BR:
205 205
       short: ! '%d de %B, %H:%M'
206 206
     pm: ''
207 207
   admin_panel:
208
-    dashboard: Painel
208
+    dashboard: Dashboard
209 209
     files: Arquivos
210 210
     users: Usuários
211 211
     posts: Artigos

+ 0 - 4
readme.md

@@ -30,10 +30,6 @@ Other features are still under development:
30 30
 
31 31
 ## Todo's
32 32
 
33
-* Dashboard Contact_Messege Count / new messages
34
-* fix admin panel navbar
35
-
36
-
37 33
 * new admin email 
38 34
 * Invite user/admin
39 35
 * admin panel tour