Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
submissions
Project
Project
Details
Activity
Releases
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
mis21-intersession-2016
submissions
Commits
0e64f0f3
Commit
0e64f0f3
authored
Jul 16, 2016
by
Francesco Martin Mamaradlo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
resubmitted lab
parent
dce0e7c3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
10 deletions
+25
-10
index.html.erb
142503/Lab3/blog_mamaradlo/app/views/pages/index.html.erb
+9
-7
show.html.erb
142503/Lab3/blog_mamaradlo/app/views/posts/show.html.erb
+16
-3
No files found.
142503/Lab3/blog_mamaradlo/app/views/pages/index.html.erb
View file @
0e64f0f3
...
...
@@ -5,6 +5,15 @@
<hr>
<%=
link_to
"View Posts"
,
posts_path
%>
<%=
link_to
"Edit Posts"
,
admin_posts_path
%>
<%
else
%>
You are not signed in
<hr>
<%=
link_to
"Login"
,
new_user_session_path
%>
or
<%=
link_to
"Sign Up"
,
new_user_registration_path
%>
<%
end
%>
<hr>
<%
@categories
.
each
do
|
c
|
%>
<h2>
(
<%=
c
.
id
%>
)
<%=
c
.
name
%>
</h2>
...
...
@@ -15,11 +24,4 @@
</ul>
<%=
link_to
"View all Posts"
,
"/categories/
#{
c
.
id
}
"
%>
<%
end
%>
<%
else
%>
You are not signed in
<hr>
<%=
link_to
"Login"
,
new_user_session_path
%>
or
<%=
link_to
"Sign Up"
,
new_user_registration_path
%>
<%
end
%>
142503/Lab3/blog_mamaradlo/app/views/posts/show.html.erb
View file @
0e64f0f3
<%
if
user_signed_in?
%>
<h1>
<%=
@post
.
title
%>
</h1>
<h3>
<%=
@post
.
published_at
%>
</h3>
<h4>
by
<%=
current_user
.
email
%>
</h4>
<p>
<h3>
<%=
@post
.
published_at
%>
</h3><p>
<%=
@post
.
content
%>
</p>
<h4>
by
<%=
current_user
.
email
%>
</h4>
<%
else
%>
<h1>
<%=
@post
.
title
%>
</h1>
<h3>
<%=
@post
.
published_at
%>
</h3><p>
<hr>
<%=
link_to
"Login"
,
new_user_session_path
%>
or
<%=
link_to
"Sign Up"
,
new_user_registration_path
%>
to read blog
<%
end
%>
<hr>
<%=
link_to
"Back to Posts"
,
posts_path
%>
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