Sha256: 7592622e7a24a8459c97acf10daa509c5a048e5bc1273045790225a0513e1eb9

Contents?: true

Size: 1.07 KB

Versions: 15

Compression:

Stored size: 1.07 KB

Contents

<% if current_user && current_user.can?(:access_admin, "Global") %>
<div id="admin_toolbar">
		<%= link_to("Admin", "/admin", :class => "awesome small blue") %>
		<%= link_to("Logout", destroy_user_session_path, :class => "awesome small black") %>
		&nbsp; 
		<strong>Logged in as:</strong> <u><%= current_user.email %></u>
  <div>
		<% if params[:controller] == "pages" %>
			Template: 
			<%= select_tag "page[template]", options_for_select(template_options("pages") , @page.template), 
						:onchange => "$.ajax({
							url: '#{admin_page_path(@page)}',
							data: {
								'page[template]': $('#page_template').val(),
								'page[id]': #{@page.id},
								authenticity_token: encodeURIComponent('#{form_authenticity_token.inspect}')
							}, 
							type: 'PUT',
							success: function(){
								location.reload(true);
							}
						})" 
			%>
		<% end %>
		<%= link_to "Edit this #{resource.class}", eval("edit_admin_#{resource.class.to_s.tableize.singularize}_path(resource)"), :class => "awesome black" if params[:id] %>
		<%= yield :admin_toolbar %>
  </div>
</div>
<% end %>

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
soapbox-0.2.10 app/views/layouts/_admin_toolbar.html.erb
soapbox-0.2.9 app/views/layouts/_admin_toolbar.html.erb
soapbox-0.2.8 app/views/layouts/_admin_toolbar.html.erb
soapbox-0.2.7 app/views/layouts/_admin_toolbar.html.erb
soapbox-0.2.6 app/views/layouts/_admin_toolbar.html.erb
soapbox-0.2.5 app/views/layouts/_admin_toolbar.html.erb
soapbox-0.2.4 app/views/layouts/_admin_toolbar.html.erb
soapbox-0.2.3 app/views/layouts/_admin_toolbar.html.erb
soapbox-0.2.2 app/views/layouts/_admin_toolbar.html.erb
soapbox-0.2.1 app/views/layouts/_admin_toolbar.html.erb
soapbox-0.2.0 app/views/layouts/_admin_toolbar.html.erb
soapbox-0.1.7 app/views/layouts/_admin_toolbar.html.erb
soapbox-0.1.3 app/views/layouts/_admin_toolbar.html.erb
soapbox-0.1.2 app/views/layouts/_admin_toolbar.html.erb
soapbox-0.1.1 app/views/layouts/_admin_toolbar.html.erb