diff --git a/app/views/pages/_actions.html.haml b/app/views/pages/_actions.html.haml
index 228f4f65..e0683df7 100644
--- a/app/views/pages/_actions.html.haml
+++ b/app/views/pages/_actions.html.haml
@@ -1,5 +1,12 @@
.navbar
.navbar-inner
- = link_to icon('file')+" Add New Page", new_admin_page_path, :id => "add_block", :class => 'btn'
- = link_to icon('th-list')+" List All Pages", admin_pages_path, :id => "add_block", :class => 'btn'
- = link_to icon('edit')+" Edit This Page", edit_page_path(@page), :id => "add_block", :class => 'btn'
\ No newline at end of file
+ .pull-left
+ = link_to icon('file')+" New Page", new_admin_page_path, :id => "add_block", :class => 'btn'
+ = link_to icon('th-list')+" Pages", admin_pages_path, :id => "add_block", :class => 'btn'
+ = link_to icon('cog')+" Settings", edit_admin_page_path(@page), :id => "add_block", :class => 'btn'
+ %a.btn{ :id => "add_section", :role => "button", :"data-toggle" => "modal", :"href" => "#section-catalog"}= icon('plus')+" Add Section"
+ .pull-right
+ .btn-group{:"data-toggle" => "buttons-radio"}
+ %button.btn.active{ type: "button"}= icon("pencil")+" Edit"
+ %button.btn{ type: "button"}= icon("th")+" Organize"
+ %button.btn{ type: "button"}= icon("eye-open")+" Preview"
\ No newline at end of file
diff --git a/app/views/pages/edit.html.haml b/app/views/pages/edit.html.haml
index 73da0827..6b6b41b3 100644
--- a/app/views/pages/edit.html.haml
+++ b/app/views/pages/edit.html.haml
@@ -1,12 +1,6 @@
- title "Edit " + @page.title
-.navbar
- .navbar-inner
- = link_to "Hide Controls", "#", :id => "toggle_editor", :class => 'btn'
- = link_to icon('file')+" New Page", new_admin_page_path, :id => "add_block", :class => 'btn'
- = link_to icon('th-list')+" Pages", admin_pages_path, :id => "add_block", :class => 'btn'
- = link_to icon('cog')+" Settings", edit_admin_page_path(@page), :id => "add_block", :class => 'btn'
- %a.btn{ :id => "add_section", :role => "button", :"data-toggle" => "modal", :"href" => "#section-catalog"}= icon('plus')+" Add Section"
+= render :partial => "actions"
#sections
= render :partial => "admin/sections/section", :collection => @page.sections.asc(:position)
@@ -66,7 +60,9 @@
:javascript
$(function() {
$("#toggle_editor").click(function(){
- if ($(this).text() == 'Show Controls') {
+ if ($(this).hasClass('icon-eye-close')) {
+ $(this).removeClass('icon-eye-close');
+ $(this).addClass('icon-eye-open');
$('.block').addClass('editable');
$(this).text('Hide Controls');
} else {
@@ -102,7 +98,14 @@
$('#block_type').val( $(this).attr('data-block_type') );
});
});
-
+
+ function toggleVisibleIcon(control) {
+ if (control.hasClass('icon-eye-close')) {
+ control.removeClass('icon-eye-close').addClass('icon-eye-open');
+ } else {
+ control.removeClass('icon-eye-open').addClass('icon-eye-close');
+ }
+ }
function toggleEditor($button){
var $block = $button.closest('.block');