wiki pages
This commit is contained in:
@@ -4,6 +4,7 @@ module PostSets
|
||||
|
||||
def initialize(tag_name)
|
||||
@tag_name = tag_name
|
||||
super()
|
||||
end
|
||||
|
||||
def load_posts
|
||||
@@ -17,6 +18,10 @@ module PostSets
|
||||
def offset
|
||||
0
|
||||
end
|
||||
|
||||
def tags
|
||||
[@tag_name]
|
||||
end
|
||||
|
||||
def use_sequential_paginator?
|
||||
false
|
||||
|
||||
@@ -56,6 +56,10 @@ class WikiPage < ActiveRecord::Base
|
||||
def creator_name
|
||||
User.id_to_name(user_id).tr("_", " ")
|
||||
end
|
||||
|
||||
def category_name
|
||||
Tag.category_for(title)
|
||||
end
|
||||
|
||||
def pretty_title
|
||||
title.tr("_", " ")
|
||||
|
||||
@@ -5,4 +5,6 @@
|
||||
<% if CurrentUser.is_janitor? %>
|
||||
<%= f.input :is_locked %>
|
||||
<% end %>
|
||||
<%= f.button :submit, "Save" %><%= f.button :submit, "Cancel" %><%= f.button :submit "Preview" %>
|
||||
<div id="multiple-buttons">
|
||||
<%= f.button :submit, "Save" %><%= f.button :submit, "Cancel" %><%= f.button :submit, "Preview" %>
|
||||
</div>
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<aside id="sidebar">
|
||||
<section>
|
||||
<h1>Search</h1>
|
||||
<%= simple_form_for(@search) do |f| %>
|
||||
<%= f.input :title_contains %>
|
||||
<%= form_tag(wiki_pages_path, :method => :get) do %>
|
||||
<%= text_field_tag "title", params[:title], :size => 20 %>
|
||||
<% end %>
|
||||
</section>
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<%= render "sidebar" %>
|
||||
|
||||
<section id="content">
|
||||
<h1>New Wiki Page</h1>
|
||||
<div id="preview">
|
||||
</div>
|
||||
|
||||
|
||||
@@ -15,3 +15,5 @@
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<%= render "secondary_links" %>
|
||||
Reference in New Issue
Block a user