fixes #944
This commit is contained in:
@@ -65,6 +65,8 @@ div#page {
|
|||||||
|
|
||||||
section#content {
|
section#content {
|
||||||
overflow: visible;
|
overflow: visible;
|
||||||
|
margin-left: 15em;
|
||||||
|
padding-left: 1em;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -9,8 +9,4 @@ div#c-favorites {
|
|||||||
margin-left: 0;
|
margin-left: 0;
|
||||||
margin-right: 6.5em;
|
margin-right: 6.5em;
|
||||||
}
|
}
|
||||||
|
|
||||||
#content {
|
|
||||||
margin-left: 15em;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -266,11 +266,6 @@ div#c-posts {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#content {
|
|
||||||
margin-left: 15em;
|
|
||||||
padding-left: 1em;
|
|
||||||
}
|
|
||||||
|
|
||||||
span.close-button {
|
span.close-button {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 5px;
|
top: 5px;
|
||||||
|
|||||||
@@ -3,11 +3,6 @@ div#c-wiki-pages {
|
|||||||
color: #AAA;
|
color: #AAA;
|
||||||
}
|
}
|
||||||
|
|
||||||
div#form-content {
|
|
||||||
float: left;
|
|
||||||
width: 30em;
|
|
||||||
}
|
|
||||||
|
|
||||||
del {
|
del {
|
||||||
background: #FCC;
|
background: #FCC;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
class WikiPagesController < ApplicationController
|
class WikiPagesController < ApplicationController
|
||||||
respond_to :html, :xml, :json, :js
|
respond_to :html, :xml, :json, :js
|
||||||
before_filter :member_only, :except => [:index, :show, :show_or_new]
|
before_filter :member_only, :except => [:index, :show, :show_or_new]
|
||||||
before_filter :moderator_only, :only => [:destroy]
|
before_filter :janitor_only, :only => [:destroy]
|
||||||
before_filter :normalize_search_params, :only => [:index]
|
before_filter :normalize_search_params, :only => [:index]
|
||||||
rescue_from ActiveRecord::StatementInvalid, :with => :rescue_exception
|
rescue_from ActiveRecord::StatementInvalid, :with => :rescue_exception
|
||||||
|
|
||||||
@@ -30,7 +30,7 @@ class WikiPagesController < ApplicationController
|
|||||||
if params[:id] =~ /[a-zA-Z]/
|
if params[:id] =~ /[a-zA-Z]/
|
||||||
@wiki_page = WikiPage.find_by_title(params[:id])
|
@wiki_page = WikiPage.find_by_title(params[:id])
|
||||||
else
|
else
|
||||||
@wiki_page = WikiPage.find(params[:id])
|
@wiki_page = WikiPage.find_by_id(params[:id])
|
||||||
end
|
end
|
||||||
respond_with(@wiki_page)
|
respond_with(@wiki_page)
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -4,16 +4,16 @@
|
|||||||
<li><%= link_to "Search", search_wiki_pages_path %></li>
|
<li><%= link_to "Search", search_wiki_pages_path %></li>
|
||||||
<li><%= link_to "New", new_wiki_page_path %></li>
|
<li><%= link_to "New", new_wiki_page_path %></li>
|
||||||
<li><%= link_to "Help", wiki_pages_path(:search => {:title => "help:wiki"}) %></li>
|
<li><%= link_to "Help", wiki_pages_path(:search => {:title => "help:wiki"}) %></li>
|
||||||
<% if @wiki_page && !@wiki_page.new_record? %>
|
<% if @wiki_page %>
|
||||||
<li>|</li>
|
<li>|</li>
|
||||||
<li><%= link_to "Posts (#{Post.fast_count(@wiki_page.title)})", posts_path(:tags => @wiki_page.title) %></li>
|
<li><%= link_to "Posts (#{Post.fast_count(@wiki_page.title)})", posts_path(:tags => @wiki_page.title) %></li>
|
||||||
<li><%= link_to "History", wiki_page_versions_path(:search => {:wiki_page_id => @wiki_page.id}) %></li>
|
<% unless @wiki_page.new_record? %>
|
||||||
<% if CurrentUser.is_member? %>
|
<li><%= link_to "History", wiki_page_versions_path(:search => {:wiki_page_id => @wiki_page.id}) %></li>
|
||||||
<% unless @wiki_page.new_record? %>
|
<% if CurrentUser.is_member? %>
|
||||||
<li><%= link_to "Edit", edit_wiki_page_path(@wiki_page) %></li>
|
<li><%= link_to "Edit", edit_wiki_page_path(@wiki_page) %></li>
|
||||||
<% if CurrentUser.is_moderator? %>
|
<% end %>
|
||||||
<li><%= link_to "Delete", wiki_page_path(@wiki_page), :remote => true, :method => :delete, :confirm => "Do you want to delete this wiki page?" %></li>
|
<% if CurrentUser.is_janitor? %>
|
||||||
<% end %>
|
<li><%= link_to "Delete", wiki_page_path(@wiki_page), :remote => true, :method => :delete, :confirm => "Do you want to delete this wiki page?" %></li>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|||||||
@@ -5,6 +5,14 @@
|
|||||||
<section id="content">
|
<section id="content">
|
||||||
<h1>New Wiki Page</h1>
|
<h1>New Wiki Page</h1>
|
||||||
<%= render "form" %>
|
<%= render "form" %>
|
||||||
|
|
||||||
|
<div id="wiki-page-posts">
|
||||||
|
<h2>Posts</h2>
|
||||||
|
<%= @wiki_page.post_set.presenter.post_previews_html(self) %>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="clearfix"></div>
|
||||||
|
|
||||||
</section>
|
</section>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
|
|
||||||
<section id="content">
|
<section id="content">
|
||||||
<h1 id="wiki-page-title">
|
<h1 id="wiki-page-title">
|
||||||
|
|
||||||
<%= @wiki_page.pretty_title %>
|
<%= @wiki_page.pretty_title %>
|
||||||
|
|
||||||
<% if @wiki_page.is_locked? %>
|
<% if @wiki_page.is_locked? %>
|
||||||
|
|||||||
Reference in New Issue
Block a user