mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-05-18 21:56:55 -04:00
Use Markdown to display updates
This commit is contained in:
3
Gemfile
3
Gemfile
@@ -48,7 +48,8 @@ gem 'capistrano-ext'
|
||||
# To use debugger
|
||||
# gem 'debugger'
|
||||
|
||||
# GROWSTUFF ADDITIONS BELOW HERE
|
||||
# Markdown formatting for updates etc
|
||||
gem 'bluecloth'
|
||||
|
||||
# user signup/login/etc
|
||||
gem 'devise'
|
||||
|
||||
@@ -30,6 +30,7 @@ GEM
|
||||
multi_json (~> 1.0)
|
||||
arel (3.0.2)
|
||||
bcrypt-ruby (3.0.1)
|
||||
bluecloth (2.2.0)
|
||||
builder (3.0.4)
|
||||
cape (1.5.0)
|
||||
capistrano (2.13.5)
|
||||
@@ -188,6 +189,7 @@ PLATFORMS
|
||||
ruby
|
||||
|
||||
DEPENDENCIES
|
||||
bluecloth
|
||||
bundler (>= 1.1.5)
|
||||
cape
|
||||
capistrano
|
||||
|
||||
@@ -6,4 +6,4 @@
|
||||
%h3 Updates
|
||||
%table
|
||||
- @user.updates.each do |update|
|
||||
= render :partial => "updates/single", :locals => { :update => update }
|
||||
= render :partial => "updates/single", :locals => { :update => update, :subject => true }
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
%div.update
|
||||
%h3= link_to update.subject, update
|
||||
- if subject
|
||||
%h3= link_to strip_tags(update.subject), update
|
||||
|
||||
%div.update-meta
|
||||
Posted by
|
||||
@@ -7,7 +8,9 @@
|
||||
at
|
||||
= update.created_at
|
||||
|
||||
%div.update-body= update.body
|
||||
%div.update-body
|
||||
:markdown
|
||||
#{ strip_tags update.body }
|
||||
|
||||
- if current_user == update.user
|
||||
%div.update-actions
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
= content_for :title, "Recent Growstuff member updates"
|
||||
|
||||
- @updates.each do |update|
|
||||
= render :partial => "single", :locals => { :update => update }
|
||||
= render :partial => "single", :locals => { :update => update, :subject => true }
|
||||
|
||||
= link_to 'New Update', new_update_path
|
||||
|
||||
@@ -1,13 +1,6 @@
|
||||
= content_for :title, @update.subject
|
||||
|
||||
%p
|
||||
%i
|
||||
= "By "
|
||||
= link_to @update.user.username, member_path(@update.user)
|
||||
= " at #{@update.created_at}"
|
||||
|
||||
%p
|
||||
= @update.body
|
||||
= render :partial => "single", :locals => { :update => @update, :subject => false }
|
||||
|
||||
= link_to 'Edit', edit_update_path(@update)
|
||||
\|
|
||||
|
||||
Reference in New Issue
Block a user