Commit eb10b366 by tady

created show page

parent 05a96506
......@@ -9,7 +9,7 @@ class PostsController < ApplicationController
def show_fragment
@post = Post.find(params[:id])
render layout: false
render layout: false, partial: 'posts/show_fragment'
end
# GET /posts
......
<div class="text-box title" style="position:relative;">
<%= @post.title %>
<a href="<%= post_path(@post) %>"><%= @post.title %></a>
<a href="<%= edit_post_path(@post) %>" class="btn btn-primary navbar-btn" style="position:absolute;right:0;top:0;margin-top:2px;margin-top:3px;margin-right:3px;">
<span class="glyphicon glyphicon-pencil"></span>
</a>
......
<p id="notice"><%= notice %></p>
<p>
<strong>Title:</strong>
<%= @post.title %>
</p>
<div class="app">
<p>
<strong>Body:</strong>
<%= @post.body %>
</p>
<%= render partial: 'partials/app_header' %>
<%= link_to 'Edit', edit_post_path(@post) %> |
<%= link_to 'Back', posts_path %>
<div class="container">
<div class="row">
<div class="col-xs-9 col-md-9" id="sidebar" role="navigation">
<div id="xxxxxxxx">
<%= render partial: 'posts/show_fragment' %>
</div>
</div><!--/span-->
<div class="col-xs-12 col-sm-3 col-md-9">
</div><!--/span-->
</div><!--/row-->
<hr>
<footer>
</footer>
</div><!--/.container-->
</div>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment