Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
chris flöß
committed
Sep 17, 2010
1 parent
e04cf4c
commit c9904c2
Showing
121 changed files
with
5,780 additions
and
7,477 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,5 @@ | |
db/*.sqlite3 | ||
log/*.log | ||
tmp/**/* | ||
.swp | ||
.swo |
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,23 @@ | ||
<% if article %> | ||
<div id="<%= dom_id article %>" class="entry clearing"> | ||
<div class="content"> | ||
<h2> | ||
<%= link_to_content article %> | ||
</h2> | ||
<div class="meta"> | ||
<p> | ||
posted by <%= article.author_name %> | ||
on <%= article.published_at.to_formatted_s(:long) if article.published_at %> | ||
<%= links_to_content_categories article, " · in: %s" %> | ||
<%= links_to_content_tags article, " · tagged: %s" %> | ||
<%= '· ' + link_to_content_comments(article).to_s if mode != :single and article.accept_comments? %> | ||
</p> | ||
</div> | ||
<% if article.has_excerpt? %> | ||
<%= article.excerpt_html %> | ||
<p><%= link_to_content "Read the rest of this entry", article unless mode == :single %></p> | ||
<% end %> | ||
<%= article.body_html if mode == :single || !article.has_excerpt? %> | ||
</div> | ||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
class Blogs::Show < Minimal::Template | ||
def to_html | ||
unless resource.posts.empty? | ||
ul :class => 'posts' do | ||
resource.posts.order('created_at DESC').each do |post| | ||
li :class => 'post hentry' do | ||
#h2 do | ||
# link_to(post.title, [resource, post], :class => 'entry-title', :rel => 'bookmark') | ||
#end | ||
#render :partial => 'posts/meta', :locals => { :post => post } | ||
div truncate_html(post.body, :length => 500, :omission => ' …'), :class => 'entry-content' | ||
p do | ||
link_to('Read the rest of this entry', [resource, post]) | ||
end | ||
end | ||
end | ||
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 |
---|---|---|
@@ -0,0 +1,43 @@ | ||
<% if @comment %> | ||
<div id="comment_form"> | ||
<h2> | ||
<% if @comment.new_record? %> | ||
Leave your reply | ||
<% else %> | ||
Edit your comment | ||
<% end %> | ||
</h2> | ||
<% form_for :comment, @comment, :url => (@comment.new_record? ? comments_path : comment_path(@comment)), :html => {:method => (@comment.new_record? ? :post : :put)} do |f| -%> | ||
<%= comment_form_hidden_fields commentable %> | ||
<div id="registered_author" style="display: none;"> | ||
<p>Hi <span>user</span>, you are logged in.</p> | ||
</div> | ||
<% fields_for @comment.author do |author| %> | ||
<div id="anonymous_author"> | ||
<p> | ||
<%= author.label :name, 'Name' %> | ||
<%= author.text_field :name %> | ||
</p> | ||
<p> | ||
<%= author.label :email, 'E-Mail' %> | ||
<%= author.text_field :email %> | ||
</p> | ||
<p> | ||
<%= author.label :homepage %> | ||
<%= author.text_field :homepage %> | ||
</p> | ||
</div> | ||
<% end %> | ||
<p> | ||
<%= f.text_area :body %> | ||
</p> | ||
<p id="preview"></p> | ||
<p> | ||
<%= submit_tag (@comment.new_record? ? 'Submit Comment' : 'Save Comment') %> | ||
<%= link_to_remote_comment_preview %> | ||
<img src="/images/indicator.gif" id="comment-preview-spinner" style="display: none;" /> | ||
</p> | ||
<% end %> | ||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | ||
<html xmlns="http://www.w3.org/1999/xhtml"> | ||
<head> | ||
<meta http-equiv="Content-type" content="text/html; charset=utf-8" /> | ||
<title><%= site.title %></title> | ||
<%= stylesheet_link_tag 'default', 'layout', 'styles', 'widgets', 'comments', 'forms' %> | ||
<%= javascript_include_tag :common, :default %> | ||
<%= yield :head %> | ||
<%# authorize_elements %> | ||
</head> | ||
<body> | ||
<div id="header"> | ||
<h1><%= site.title %></h1> | ||
<h2><%= site.subtitle %></h2> | ||
<ul id="sections"> | ||
<li class="item active"> | ||
<a href="/" id="show_section">Blog</a> | ||
</li> | ||
<li class="item"> | ||
<a href="/wiki" id="show_section">Wiki</a> | ||
</li> | ||
</ul> | ||
</div> | ||
|
||
<div id="main"> | ||
<div id="flashes"> | ||
</div> | ||
<div id="content"> | ||
<%= yield %> | ||
</div> | ||
</div> | ||
|
||
<div id="sidebar"> | ||
<p> | ||
adva-cms is an open source cms platform based on Ruby on Rails and Rails Engines. | ||
</p> | ||
<h4>Resources</h4> | ||
<p> | ||
<a href="http://github.com/svenfuchs/adva_cms">GitHub Repository</a><br> | ||
<a href="http://artweb-design.lighthouseapp.com/projects/13992-adva_cms">Lighthouse Tracker</a><br> | ||
<a href="http://groups.google.com/group/adva-cms">Google Mailinglist</a><br> | ||
<a href="irc://irc.freenode.net#adva-cms">irc.freenode.net#adva-cms</a> | ||
</p> | ||
|
||
<%= yield :sidebar %> | ||
</div> | ||
|
||
<%#= yield :footer or render :partial => 'shared/footer' %> | ||
</body> | ||
</html> |
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,12 @@ | ||
<div id="<%= dom_id @page %>" class="entry clearing"> | ||
<div class="content"> | ||
<%= @page.article.body.html_safe %> | ||
</div> | ||
</div> | ||
|
||
<% content_for :sidebar do %> | ||
<h4>Related Pages</h4> | ||
<% @page.parent.children.each do |p| %> | ||
<%= link_to p.title, "/#{p.path}" %><br> | ||
<%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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<div id="<%= dom_id @post %>" class="entry clearing"> | ||
<div class="content"> | ||
<%= @post.body.html_safe %> | ||
</div> | ||
</div> |
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,30 @@ | ||
<div id="<%= dom_id @wikipage %>" class="entry clearing"> | ||
<div class="content"> | ||
<h2><%= @wikipage.title %></h2> | ||
<%= wikify @wikipage.body %> | ||
</div> | ||
<div class="wiki meta"> | ||
<%= wiki_edit_links(@wikipage, :prepend => link_to('all pages', wikipages_path)) %> | ||
<p> | ||
revision: <%= @wikipage.version %> | ||
last updated: <%= @wikipage.updated_at.to_s(:long) %> | ||
by: <%= @wikipage.author_link %> | ||
<%= links_to_content_categories(@wikipage, 'in: %s') %> | ||
<%= links_to_content_tags(@wikipage, 'tagged: %s') %> | ||
</p> | ||
</div> | ||
</div> | ||
|
||
<%= render :partial => 'comments/list', :locals => {:commentable => @wikipage, :comments => @wikipage.approved_comments} %> | ||
<% if @wikipage.accept_comments? %> | ||
<%= render :partial => 'comments/form', :locals => {:commentable => @wikipage} %> | ||
<% end %> | ||
<%= render :partial => 'footer' %> | ||
<% content_for :sidebar do %> | ||
<h4>All Wikipages</h4> | ||
<%= @section.wikipages.each do |content| %> | ||
<%= link_to_content content %><br> | ||
<% end %> | ||
<% end %> |
Oops, something went wrong.