Permalink
Browse files

Initial test for admin bar

  • Loading branch information...
1 parent 5c5a996 commit ec371a933da06651d01c3a28993b10e5cfe8da3b @marvinbarretto marvinbarretto committed Jul 12, 2011
Showing with 34 additions and 2 deletions.
  1. +6 −0 app/views/organisations/show.html.erb
  2. +28 −2 public/stylesheets/v1.css
@@ -1,6 +1,12 @@
<% content_for :page_title, @organisation.name + " plaques" %>
<div class="panel clearfix">
+ <% if current_user && current_user.is_admin? %>
+ <section class="admin_panel">
+ <%= link_to("Edit", edit_organisation_path(@organisation), {:class => :edit, :title => "edit location"})%>
+ </section>
+ <% end %>
+
<h1 property="dc:title rdfs:label foaf:name" about="#this"><%= h @organisation.name %> plaques</h1>
<%= link_to("Edit", edit_organisation_path(@organisation), {:class => :edit, :title => "edit location"}) if current_user %>
<%= content_tag("p", link_to(h(@organisation.website),@organisation.website), {:rel => "foaf:homepage vcard:url"}) unless @organisation.website.blank? %>
View
@@ -3,9 +3,11 @@
1. RESET
2. CORE
- 2.1 Development elements
+ 2.1 Flash and error elements
+ 2.2 Global buttons
+ 2.3 Admin panel
3. PLAQUE PAGE
-
+ 3.1 Inscriptions
*/
/**
@@ -193,6 +195,30 @@ a.secondary_button:hover, div.secondary_button:hover input {
text-shadow: 0 -1px 1px rgba(255, 255, 255, 0.25);
}
+/**
+ 2.3 admin_panel
+*/
+
+.admin_panel {
+ background: #CCC;
+ /*background: #EEE;*/
+ border-radius: 8px;
+ margin: 8px 0;
+ padding: 4px;
+}
+
+.admin_panel a {
+ color: #333;
+ padding: 8px;
+ border-radius: 8px;
+ text-decoration: none;
+}
+
+.admin_panel a:hover {
+ background: #333;
+ color: #FFF;
+ text-decoration: underline;
+}

0 comments on commit ec371a9

Please sign in to comment.