Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
rendezvous
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
VeNtura
rendezvous
Commits
eb10b366
Commit
eb10b366
authored
Dec 06, 2013
by
tady
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
created show page
parent
05a96506
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
13 deletions
+31
-13
app/controllers/posts_controller.rb
+1
-1
app/views/posts/_show_fragment.html.erb
+1
-1
app/views/posts/show.html.erb
+29
-11
No files found.
app/controllers/posts_controller.rb
View file @
eb10b366
...
...
@@ -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
...
...
app/views/posts/show_fragment.html.erb
→
app/views/posts/
_
show_fragment.html.erb
View file @
eb10b366
<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>
...
...
app/views/posts/show.html.erb
View file @
eb10b366
<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>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment