APP fronted showing
This commit is contained in:
parent
cb07a35cc9
commit
0e252cf93c
|
@ -10,6 +10,8 @@
|
||||||
<r:javascripts>
|
<r:javascripts>
|
||||||
<!-- your javascripts here -->
|
<!-- your javascripts here -->
|
||||||
</r:javascripts>
|
</r:javascripts>
|
||||||
|
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
|
@ -24,11 +26,25 @@
|
||||||
<div id="main_content" class="content">
|
<div id="main_content" class="content">
|
||||||
<r:content name='content_1'>
|
<r:content name='content_1'>
|
||||||
</r:content>
|
</r:content>
|
||||||
|
<div class="dymanic_load" path="/panel/blog/widget_latest_post"></div>
|
||||||
|
<div class="dymanic_load" path="/panel/blog/widget_index"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="footer" class="footer">
|
<div id="footer" class="footer">
|
||||||
This is the footer
|
This is the footer
|
||||||
</div>
|
</div>
|
||||||
|
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script>
|
||||||
|
<script>
|
||||||
|
$.each($(".dymanic_load"),function(){
|
||||||
|
$(this).load($(this).attr("path"),
|
||||||
|
function(respText,textSta,XML){
|
||||||
|
if(textSta == 'error')
|
||||||
|
{$(this).html("Loading Failed");}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
);
|
||||||
|
</script>
|
||||||
<!-- END example -->
|
<!-- END example -->
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -116,6 +116,11 @@ namespace :dev do
|
||||||
|
|
||||||
home = Page.create!( :i18n_variable_id => var_10.id, :design_id => design_1.id, :name => 'home', :is_published => true, :theme_id => theme.id )
|
home = Page.create!( :i18n_variable_id => var_10.id, :design_id => design_1.id, :name => 'home', :is_published => true, :theme_id => theme.id )
|
||||||
home.page_parts.create!( :name => 'content_1', :content => File.open("#{Rails.root}/lib/template/home.page").read, :kind => 'text', :i18n_variable_id => var_13.id )
|
home.page_parts.create!( :name => 'content_1', :content => File.open("#{Rails.root}/lib/template/home.page").read, :kind => 'text', :i18n_variable_id => var_13.id )
|
||||||
|
|
||||||
|
Post.create(:title=>"1st post",:body=>"Long long time ago.....")
|
||||||
|
Post.create(:title=>"2ec post",:body=>"And?.....")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -1,10 +0,0 @@
|
||||||
Rails.application.routes.draw do
|
|
||||||
|
|
||||||
namespace :panel do
|
|
||||||
namespace :blog do
|
|
||||||
resources :posts
|
|
||||||
resources :comments
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
end
|
|
|
@ -1,4 +1,4 @@
|
||||||
<%= stylesheet_link_tag "production"%>
|
<%= stylesheet_link_tag "production"%>
|
||||||
<div class="wapper">
|
<div class="production">
|
||||||
<%= yield %>
|
<%= yield %>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<%=stylesheet_link_tag "NewBlog/application"%>
|
<%=stylesheet_link_tag "NewBlog/application"%>
|
||||||
<h1><%= @post.title %> </h1>
|
<h2><%= @post.title %> </h2>
|
||||||
<p>
|
<p>
|
||||||
<%= @post.body %>
|
<%= @post.body %>
|
||||||
</p>
|
</p>
|
||||||
|
|
Reference in New Issue