forked from saurabh/orbit4-5
mobile view changed with live preview
This commit is contained in:
parent
98efc38566
commit
8676e06c87
|
@ -266,13 +266,13 @@ class PagesController < ApplicationController
|
|||
OrbitHelper.set_widget_custom_value custom_value
|
||||
end
|
||||
if @editmode
|
||||
partials << "<div class='editmode-ps' title='#{subpart.module}'> " + render_widget_for_frontend(subpart.module,subpart.widget_method,subpart.widget_type) + "<a href='/page_parts/edit_sub_part?page_id=#{page.id.to_s}&part_id=#{part.id.to_s}&sub_part_id=#{subpart.id.to_s}#{(params[:mobile_view] ? '&mobile_view=1' : '')}'> </a></div>"
|
||||
partials << "<div class='editmode-ps' title='#{subpart.module}'> " + render_widget_for_frontend(subpart.module,subpart.widget_method,subpart.widget_type) + "<a href='/page_parts/edit_sub_part?page_id=#{page.id.to_s}&part_id=#{part.id.to_s}&sub_part_id=#{subpart.id.to_s}#{(!$mobile.blank? ? '&mobile_view=1' : '')}'> </a></div>"
|
||||
else
|
||||
partials << render_widget_for_frontend(subpart.module,subpart.widget_method,subpart.widget_type)
|
||||
end
|
||||
elsif subpart.kind == "text"
|
||||
if @editmode
|
||||
partials << "<div class='editmode-ps' title='text'> " + subpart.content + "<a href='/page_parts/edit_sub_part?page_id=#{part.page_id.to_s}&part_id=#{part.id.to_s}&sub_part_id=#{subpart.id.to_s}#{(params[:mobile_view] ? '&mobile_view=1' : '')}'> </a></div>"
|
||||
partials << "<div class='editmode-ps' title='text'> " + subpart.content + "<a href='/page_parts/edit_sub_part?page_id=#{part.page_id.to_s}&part_id=#{part.id.to_s}&sub_part_id=#{subpart.id.to_s}#{(!$mobile.blank? ? '&mobile_view=1' : '')}'> </a></div>"
|
||||
else
|
||||
partials << subpart.content
|
||||
end
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
<% end %>
|
||||
<div class="item-menu">
|
||||
<%= link_to content_tag(:i, nil, class: "icon-eye-open"), (node.root? ? "/?editmode=on" : "/" + I18n.locale.to_s + node.url + "?editmode=on"), class: "view-page open-slide tip", title: "View", data: {title: node.name} if node.page_type.eql?('page') %>
|
||||
<%= link_to content_tag(:i, nil, class: "icons-mobile"), pages_edit_view_path(:id => node.id.to_s, :mobile_view=>1), class: "view-page open-slide tip mobile-view-btn", title: "Edit Mobile Page", data: {title: "Edit Mobile Page"} if node.page_type.eql?("page") && current_site.mobile_on && node.enabled_for_mobile %>
|
||||
<%= link_to content_tag(:i, nil, class: "icons-mobile"), (node.root? ? "/?editmode=on&mobile=1" : "/" + I18n.locale.to_s + node.url + "?editmode=on&mobile=1"), class: "view-page open-slide tip mobile-view-btn", title: "Edit Mobile Page", data: {title: "Edit Mobile Page"} if node.page_type.eql?("page") && current_site.mobile_on && node.enabled_for_mobile %>
|
||||
<% unless name.eql? "sitemap" %>
|
||||
<%= link_to content_tag(:i, nil, class: "icon-edit"), edit_page_path(node.id,:type => node.page_type), class: "open-slide tip page edit", title: "Edit #{node.page_type.capitalize}", data: {title: "Edit #{node.page_type.capitalize}"} if node.class.to_s.downcase.eql?("page") && !node.root? %>
|
||||
<%= link_to content_tag(:i, nil, class: "icons-link"), new_page_path(:parent_page => node.id.to_s,:type => "link"), class: "open-slide tip link", title: "Add Link", data: {title: "Add Link", id: 'new', parent: node.id.to_s} if node.class.to_s.eql?('Page') && level < 3 %>
|
||||
|
|
Loading…
Reference in New Issue