forked from sudara/alonetone
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add atom posts to latest posts, forums, topics and clean up forum views
- Loading branch information
Showing
16 changed files
with
100 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
xml.instruct! :xml, :version => "1.0" | ||
xml.feed(:xmlns => "http://www.w3.org/2005/Atom") do |feed| | ||
feed.title "Posts for #{["alonetone forums", @forum.try(:name), @topic.try(:title)].compact * ' > '}" | ||
feed.link :href => request.url | ||
feed.updated((@posts.first || @topic || current_site).created_at.to_s(:rfc3339)) | ||
feed.id request.url | ||
for post in @posts do | ||
feed.entry do |entry| | ||
entry.id forum_topic_url(post.topic.forum, post.topic, | ||
:anchor => dom_id(post)) | ||
entry.title post.topic.title | ||
entry.content post.body | ||
entry.updated post.updated_at.to_s(:rfc3339) | ||
entry.link :href => forum_topic_url(post.topic.forum, post.topic, | ||
:anchor => dom_id(post)) | ||
|
||
entry.author do |author| | ||
author.name post.user.name | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,25 @@ | ||
<% render :layout => 'forums/forums' do %> | ||
<% content_for :h1 do %>alonetone forums: Starting a new topic <% end %> | ||
<% content_for :breadcrumbs do %> | ||
<%= link_to 'Forums', forums_path %> <span class="arrow">→</span> | ||
<%= link_to h(@forum.name), forum_path(@forum) %> <span class="arrow">→</span> New Topic | ||
<%= link_to 'Forums', forums_path %> <span class="arrow">→</span> | ||
<%= link_to h(@forum.name), forum_path(@forum) %> <span class="arrow">→</span> New Topic | ||
<% end %> | ||
|
||
<h1 id="new_topic"><%= "Start a New Topic" %></h1> | ||
|
||
<h1 id="new_topic"><%= 'New Topic' %></h1> | ||
<p class="subtitle">by <%= current_user.name %></p> | ||
|
||
|
||
<div class="container static_content"> | ||
<p class="subtitle">Post will be by <%= current_user.name %> in the "<%= @forum.name %>" forum</p> | ||
<%= error_messages_for :topic %> | ||
<% form_for :topic, | ||
:url => forum_topics_path(@forum) do |f| -%> | ||
<%= render :partial => "form", :object => f %> | ||
<%= submit_tag 'Post Topic', :or => link_to('Cancel', forum_path(@forum)) %> | ||
<div class="submit_wrapper"> | ||
<%= submit_tag 'Post Topic', :or => link_to('Cancel', forum_path(@forum)) %> | ||
</div> | ||
<% end -%> | ||
<%= render :partial => 'posts/formatting' %> | ||
|
||
</div> | ||
|
||
<% end %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,13 @@ | ||
--- | ||
docroot: /home/alonetone.com/web/alonetone/current/ | ||
log_file: /home/alonetone.com/web/alonetone/current/log/mongrel.log | ||
port: "8000" | ||
environment: production | ||
pid_file: /home/alonetone.com/web/alonetone/current/tmp/pids/mongrel.pid | ||
servers: 4 | ||
port: 5000 | ||
servers: 3 | ||
docroot: public | ||
environment: production | ||
cwd: /data/alonetone/current | ||
log_file: /var/log/engineyard/mongrel/alonetone/mongrel.log | ||
pid_file: /var/run/mongrel/alonetone/mongrel.pid | ||
user: alonetone | ||
group: alonetone | ||
|
||
|
||
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,4 +4,5 @@ | |
require 'haml' # From gem | ||
end | ||
|
||
# Load Haml and Sass | ||
Haml.init_rails(binding) |