Items UI changes
This commit is contained in:
parent
247b8ec4dc
commit
a695b9ad29
|
@ -9,14 +9,16 @@ module Admin::ItemHelper
|
||||||
when 'Link'
|
when 'Link'
|
||||||
dest = admin_link_path(node)
|
dest = admin_link_path(node)
|
||||||
end
|
end
|
||||||
|
ret << "<ul>"
|
||||||
ret << "<li>"
|
ret << "<li>"
|
||||||
ret << (link_to node.name, dest)
|
ret << (link_to node.name, dest)
|
||||||
ret << ' | ' << (link_to t('admin.code'), eval("edit_admin_#{node._type.downcase}_path(node, :code => true)")) if node._type.eql?('Page')
|
ret << ' | ' << (link_to t('admin.code'), eval("edit_admin_#{node._type.downcase}_path(node, :code => true)")) if node._type.eql?('Page')
|
||||||
ret << ' | ' << (link_to t('admin.new_page'), new_admin_page_path(:parent_id => node.id)) if node._type.eql?('Page')
|
ret << ' | ' << (link_to t('admin.new_page'), new_admin_page_path(:parent_id => node.id), :class => 'new_page') if node._type.eql?('Page')
|
||||||
ret << ' | ' << (link_to t('admin.new_link'), new_admin_link_path(:parent_id => node.id)) if node._type.eql?('Page')
|
ret << ' | ' << (link_to t('admin.new_link'), new_admin_link_path(:parent_id => node.id), :class => 'new_link') if node._type.eql?('Page')
|
||||||
ret << ' | ' << (link_to t(:delete), eval("delete_admin_#{node._type.downcase}_path(node, :authenticity_token => form_authenticity_token)"), :confirm => t('sure?'), :class => 'delete')
|
ret << ' | ' << (link_to t(:delete), eval("delete_admin_#{node._type.downcase}_path(node, :authenticity_token => form_authenticity_token)"), :confirm => t('sure?'), :class => 'delete')
|
||||||
ret << render_children(node)
|
ret << render_children(node)
|
||||||
ret << "</li>"
|
ret << "</li>"
|
||||||
|
ret << "</ul>"
|
||||||
end
|
end
|
||||||
ret.html_safe
|
ret.html_safe
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<% content_for :sidebar do %>
|
<% content_for :sidebar do %>
|
||||||
<div id='sidebar'><%= render 'admin/items/site_map_left_bar' %></div>
|
<%= render 'admin/items/site_map_left_bar' %>
|
||||||
<% end -%>
|
<% end -%>
|
||||||
|
|
||||||
<% content_for :page_specific_javascript do %>
|
<% content_for :page_specific_javascript do %>
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
$('#main').empty();
|
$('#panel_main').empty();
|
||||||
switch ("<%= escape_javascript(@item._type)%>") {
|
switch ("<%= escape_javascript(@item._type)%>") {
|
||||||
case 'Link':
|
case 'Link':
|
||||||
$('#main').append("<%= escape_javascript(render(:partial => 'admin/links/show')) %>");
|
$('#panel_main').append("<%= escape_javascript(render(:partial => 'admin/links/show')) %>");
|
||||||
break;
|
break;
|
||||||
case 'Page':
|
case 'Page':
|
||||||
$('#main').append("<%= escape_javascript(render(:partial => 'admin/pages/show')) %>");
|
$('#panel_main').append("<%= escape_javascript(render(:partial => 'admin/pages/show')) %>");
|
||||||
break;
|
break;
|
||||||
};
|
};
|
|
@ -1,3 +1,3 @@
|
||||||
$('#sidebar').html("<%= escape_javascript(render(:partial => 'admin/items/site_map_left_bar')) %>");
|
$('#panel_sidebar').html("<%= escape_javascript(render(:partial => 'admin/items/site_map_left_bar')) %>");
|
||||||
$('#main').html("<%= escape_javascript(render(:partial => 'admin/links/show')) %>");
|
$('#panel_main').html("<%= escape_javascript(render(:partial => 'admin/links/show')) %>");
|
||||||
history.pushState(null, document.title, "<%= escape_javascript(admin_link_url(@item)) %>");
|
history.pushState(null, document.title, "<%= escape_javascript(admin_link_url(@item)) %>");
|
|
@ -1 +1 @@
|
||||||
$('#sidebar').html("<%= escape_javascript(render(:partial => 'admin/items/site_map_left_bar')) %>");
|
$('#panel_sidebar').html("<%= escape_javascript(render(:partial => 'admin/items/site_map_left_bar')) %>");
|
|
@ -1,5 +1,5 @@
|
||||||
<% content_for :sidebar do %>
|
<% content_for :sidebar do %>
|
||||||
<div id='sidebar'><%= render 'admin/items/site_map_left_bar' %></div>
|
<%= render 'admin/items/site_map_left_bar' %>
|
||||||
<% end -%>
|
<% end -%>
|
||||||
|
|
||||||
<%= render 'edit' %>
|
<%= render 'edit' %>
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
$('#main').html("<%= escape_javascript(render(:partial => 'admin/links/edit')) %>");
|
$('#panel_main').html("<%= escape_javascript(render(:partial => 'admin/links/edit')) %>");
|
|
@ -1,5 +1,5 @@
|
||||||
<% content_for :sidebar do %>
|
<% content_for :sidebar do %>
|
||||||
<div id='sidebar'><%= render 'admin/items/site_map_left_bar' %></div>
|
<%= render 'admin/items/site_map_left_bar' %>
|
||||||
<% end -%>
|
<% end -%>
|
||||||
|
|
||||||
<%= render 'new' %>
|
<%= render 'new' %>
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
$('#main').html("<%= escape_javascript(render(:partial => 'admin/links/new')) %>");
|
$('#panel_main').html("<%= escape_javascript(render(:partial => 'admin/links/new')) %>");
|
|
@ -1,5 +1,5 @@
|
||||||
<% content_for :sidebar do %>
|
<% content_for :sidebar do %>
|
||||||
<div id='sidebar'><%= render 'admin/items/site_map_left_bar' %></div>
|
<%= render 'admin/items/site_map_left_bar' %>
|
||||||
<% end -%>
|
<% end -%>
|
||||||
|
|
||||||
<%= render 'show' %>
|
<%= render 'show' %>
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
$('#main').html("<%= escape_javascript(render(:partial => 'show')) %>");
|
$('#panel_main').html("<%= escape_javascript(render(:partial => 'show')) %>");
|
|
@ -1,2 +1,2 @@
|
||||||
$('#main').html("<%= escape_javascript(render(:partial => 'admin/links/show')) %>");
|
$('#panel_main').html("<%= escape_javascript(render(:partial => 'admin/links/show')) %>");
|
||||||
history.pushState(null, document.title, "<%= escape_javascript(admin_link_url(@item)) %>");
|
history.pushState(null, document.title, "<%= escape_javascript(admin_link_url(@item)) %>");
|
|
@ -1,5 +1,5 @@
|
||||||
<% content_for :sidebar do %>
|
<% content_for :sidebar do %>
|
||||||
<div id='sidebar'><%= render 'admin/items/site_map_left_bar' %></div>
|
<%= render 'admin/items/site_map_left_bar' %>
|
||||||
<% end -%>
|
<% end -%>
|
||||||
|
|
||||||
<%= render @partial %>
|
<%= render @partial %>
|
|
@ -1 +1 @@
|
||||||
$('#main').html("<%= escape_javascript(render(:partial => @partial)) %>");
|
$('#panel_main').html("<%= escape_javascript(render(:partial => @partial)) %>");
|
|
@ -1,2 +1,2 @@
|
||||||
$('#main').html("<%= escape_javascript(render(:partial => 'admin/pages/show' )) %>");
|
$('#panel_main').html("<%= escape_javascript(render(:partial => 'admin/pages/show' )) %>");
|
||||||
history.pushState(null, document.title, "<%= escape_javascript(admin_page_url(@item)) %>");
|
history.pushState(null, document.title, "<%= escape_javascript(admin_page_url(@item)) %>");
|
|
@ -1,3 +1,3 @@
|
||||||
$('#sidebar').html("<%= escape_javascript(render(:partial => 'admin/items/site_map_left_bar')) %>");
|
$('#panel_sidebar').html("<%= escape_javascript(render(:partial => 'admin/items/site_map_left_bar')) %>");
|
||||||
$('#main').html("<%= escape_javascript(render(:partial => 'admin/pages/show')) %>");
|
$('#panel_main').html("<%= escape_javascript(render(:partial => 'admin/pages/show')) %>");
|
||||||
history.pushState(null, document.title, "<%= escape_javascript(admin_page_url(@item)) %>");
|
history.pushState(null, document.title, "<%= escape_javascript(admin_page_url(@item)) %>");
|
|
@ -1 +1 @@
|
||||||
$('#sidebar').html("<%= escape_javascript(render(:partial => 'admin/items/site_map_left_bar')) %>");
|
$('#panel_sidebar').html("<%= escape_javascript(render(:partial => 'admin/items/site_map_left_bar')) %>");
|
|
@ -1,3 +1,7 @@
|
||||||
|
<% content_for :sidebar do %>
|
||||||
|
<%= render 'admin/items/site_map_left_bar' %>
|
||||||
|
<% end -%>
|
||||||
|
|
||||||
<h1><%= t('admin.editing_page') %></h1>
|
<h1><%= t('admin.editing_page') %></h1>
|
||||||
|
|
||||||
<%= form_for @item, :url => admin_page_path(@item) do |f| %>
|
<%= form_for @item, :url => admin_page_path(@item) do |f| %>
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
$('#main').html("<%= escape_javascript(render(:partial => @code ? 'edit_code' : 'edit')) %>");
|
$('#panel_main').html("<%= escape_javascript(render(:partial => @code ? 'edit_code' : 'edit')) %>");
|
|
@ -1,5 +1,5 @@
|
||||||
<% content_for :sidebar do %>
|
<% content_for :sidebar do %>
|
||||||
<div id='sidebar'><%= render 'admin/items/site_map_left_bar' %></div>
|
<%= render 'admin/items/site_map_left_bar' %>
|
||||||
<% end -%>
|
<% end -%>
|
||||||
|
|
||||||
<%= render 'new' %>
|
<%= render 'new' %>
|
|
@ -1 +1 @@
|
||||||
$('#main').html("<%= escape_javascript(render(:partial => 'admin/pages/new')) %>");
|
$('#panel_main').html("<%= escape_javascript(render(:partial => 'admin/pages/new')) %>");
|
|
@ -1 +1,5 @@
|
||||||
|
<% content_for :sidebar do %>
|
||||||
|
<%= render 'admin/items/site_map_left_bar' %>
|
||||||
|
<% end -%>
|
||||||
|
|
||||||
<%= render @code ? 'show_code' : 'show' %>
|
<%= render @code ? 'show_code' : 'show' %>
|
|
@ -1 +1 @@
|
||||||
$('#main').html("<%= escape_javascript(render(:partial => 'show')) %>");
|
$('#panel_main').html("<%= escape_javascript(render(:partial => 'show')) %>");
|
|
@ -1,2 +1,2 @@
|
||||||
$('#main').html("<%= escape_javascript(render(:partial => 'admin/pages/show')) %>");
|
$('#panel_main').html("<%= escape_javascript(render(:partial => 'admin/pages/show')) %>");
|
||||||
history.pushState(null, document.title, "<%= escape_javascript(admin_page_url(@item)) %>");
|
history.pushState(null, document.title, "<%= escape_javascript(admin_page_url(@item)) %>");
|
|
@ -5,8 +5,7 @@
|
||||||
<title><%= @title || 'R4 rescue title' %></title>
|
<title><%= @title || 'R4 rescue title' %></title>
|
||||||
<link rel="shortcut icon" href="/favicon.ico">
|
<link rel="shortcut icon" href="/favicon.ico">
|
||||||
<%= yield :page_specific_link %>
|
<%= yield :page_specific_link %>
|
||||||
<%= stylesheet_link_tag "easy", "main", "devise", "content", :media => "screen, projection" %>
|
<%= stylesheet_link_tag "content", :media => "screen, projection" %>
|
||||||
<%= stylesheet_link_tag "easyprint", :media => "print" %>
|
|
||||||
<%= javascript_include_tag :ckeditor %>
|
<%= javascript_include_tag :ckeditor %>
|
||||||
|
|
||||||
<%= javascript_include_tag "jquery", "jquery-ui", "rails", "easy", "application", :cache => 'all' %>
|
<%= javascript_include_tag "jquery", "jquery-ui", "rails", "easy", "application", :cache => 'all' %>
|
||||||
|
@ -18,8 +17,8 @@
|
||||||
<%= csrf_meta_tag %>
|
<%= csrf_meta_tag %>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="header">
|
<div id="panel_header">
|
||||||
<ul id="nav">
|
<ul id="panel_nav">
|
||||||
<li><%= link_to t('homepage'), root_path %></li>
|
<li><%= link_to t('homepage'), root_path %></li>
|
||||||
<li><%= link_to t('admin.item'), admin_items_path %></li>
|
<li><%= link_to t('admin.item'), admin_items_path %></li>
|
||||||
<li><%= link_to t('admin.layout'), admin_layouts_path %></li>
|
<li><%= link_to t('admin.layout'), admin_layouts_path %></li>
|
||||||
|
@ -28,7 +27,7 @@
|
||||||
<li><%= link_to t('admin.user_role'), admin_user_role_models_path %></li>
|
<li><%= link_to t('admin.user_role'), admin_user_role_models_path %></li>
|
||||||
<li><%= link_to t('admin.translation'), admin_translations_path %></li>
|
<li><%= link_to t('admin.translation'), admin_translations_path %></li>
|
||||||
</ul>
|
</ul>
|
||||||
<ul class="hmenu">
|
<ul class="panel_hmenu">
|
||||||
<li>
|
<li>
|
||||||
<%= render 'layouts/lang_menu' %>
|
<%= render 'layouts/lang_menu' %>
|
||||||
</li>
|
</li>
|
||||||
|
@ -36,12 +35,11 @@
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="content" class="content">
|
<div id="panel_content" class="content">
|
||||||
<div id="sidebar" style='float: left;'><%= yield :sidebar %></div>
|
<div id="panel_sidebar" style='float: left;'><%= yield :sidebar %></div>
|
||||||
<div id="main" style='float: left;'><%= yield %></div>
|
<div id="panel_main" style='float: left;'><%= yield %></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="footer">
|
<div id="panel_footer"><%= yield :footer %></div>
|
||||||
</div>
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
Binary file not shown.
After Width: | Height: | Size: 157 B |
Binary file not shown.
After Width: | Height: | Size: 857 B |
Binary file not shown.
After Width: | Height: | Size: 181 B |
Binary file not shown.
After Width: | Height: | Size: 184 B |
|
@ -2,7 +2,7 @@
|
||||||
// This file is automatically included by javascript_include_tag :defaults
|
// This file is automatically included by javascript_include_tag :defaults
|
||||||
|
|
||||||
$(function () {
|
$(function () {
|
||||||
$('#sidebar a, #main a.nav').live('click',
|
$('#panel_sidebar a, #panel_main a.nav').live('click',
|
||||||
function () {
|
function () {
|
||||||
$.getScript(this.href);
|
$.getScript(this.href);
|
||||||
history.pushState(null, document.title, this.href);
|
history.pushState(null, document.title, this.href);
|
||||||
|
@ -10,7 +10,7 @@ $(function () {
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
$('#main a.reload').live('click',
|
$('#panel_main a.reload').live('click',
|
||||||
function () {
|
function () {
|
||||||
$.getScript(this.href);
|
$.getScript(this.href);
|
||||||
history.replaceState(null, document.title, this.href);
|
history.replaceState(null, document.title, this.href);
|
||||||
|
|
|
@ -1,4 +1,96 @@
|
||||||
|
#panel_header ul, #panel_sidebar ul{
|
||||||
|
margin:0;
|
||||||
|
padding:0;
|
||||||
|
}
|
||||||
|
#panel_header ul li, #panel_sidebar ul li{
|
||||||
|
list-style:none;
|
||||||
|
}
|
||||||
|
#panel_header a, #panel_sidebar a {
|
||||||
|
text-decoration:none;
|
||||||
|
}
|
||||||
html{
|
html{
|
||||||
height:100%;
|
height:100%;
|
||||||
width:100%;
|
width:100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
body{
|
||||||
|
height:100%;
|
||||||
|
margin:0;
|
||||||
|
width:100%;
|
||||||
|
}
|
||||||
|
#panel_content{
|
||||||
|
height:100%;
|
||||||
|
width:100%;
|
||||||
|
}
|
||||||
|
#panel_header{
|
||||||
|
background:url(../images/bar_bg.png) repeat-x 0 0;
|
||||||
|
font-size:12px;
|
||||||
|
height:41px;
|
||||||
|
}
|
||||||
|
#panel_header ul{
|
||||||
|
margin:0 0 0 10px;
|
||||||
|
}
|
||||||
|
#panel_header a:link,#panel_header a:visited{
|
||||||
|
color:#fff;
|
||||||
|
}
|
||||||
|
#panel_header a:hover,#panel_header a:active{
|
||||||
|
color:#ececec;
|
||||||
|
}
|
||||||
|
#panel_nav{
|
||||||
|
float:left;
|
||||||
|
margin:0 0 0 10px;
|
||||||
|
}
|
||||||
|
#panel_nav li{
|
||||||
|
float: left;
|
||||||
|
line-height: 38px;
|
||||||
|
list-style: none outside none;
|
||||||
|
margin: 0 10px 0 0;
|
||||||
|
}
|
||||||
|
.panel_hmenu{
|
||||||
|
color: #FFFFFF;
|
||||||
|
float: right;
|
||||||
|
}
|
||||||
|
.panel_hmenu li{
|
||||||
|
float: left;
|
||||||
|
line-height: 41px;
|
||||||
|
list-style: none outside none;
|
||||||
|
margin: 0 10px 0 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#panel_sidebar{
|
||||||
|
background: none repeat scroll 0 0 #323232;
|
||||||
|
color: #FFFFFF;
|
||||||
|
float: left;
|
||||||
|
height: 100%;
|
||||||
|
min-width: 250px;
|
||||||
|
padding:5px 5px 0 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#panel_sidebar a:link,#panel_sidebar a:visited{
|
||||||
|
color:#fff;
|
||||||
|
}
|
||||||
|
#panel_sidebar a:hover,#panel_sidebar a:active{
|
||||||
|
color:#ececec;
|
||||||
|
}
|
||||||
|
#panel_sidebar ul{
|
||||||
|
background: url("../images/tree_list.png") repeat scroll 0 0 transparent;
|
||||||
|
}
|
||||||
|
#panel_sidebar li{
|
||||||
|
font-size: 12px;
|
||||||
|
line-height: 29px;
|
||||||
|
list-style:none;
|
||||||
|
padding: 0 0 0 10px;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#panel_sidebar ul {
|
||||||
|
}
|
||||||
|
#panel_sidebar ul li{
|
||||||
|
padding:0 0 0 20px;
|
||||||
|
}
|
||||||
|
.new_page{}
|
||||||
|
.new_link{}
|
||||||
|
.del_page{}
|
||||||
|
#panel_main{
|
||||||
|
margin:10px;
|
||||||
|
}
|
Loading…
Reference in New Issue