Merge branch 'wiki'

Conflicts:
	app/helpers/pages_helper.rb
	public/stylesheets/main.css
	public/stylesheets/print.css
This commit is contained in:
Benjamin Meichsner 2009-09-28 15:04:07 +02:00
commit 529956ea5a
15 changed files with 381 additions and 180 deletions

View file

@ -60,6 +60,8 @@ class PagesController < ApplicationController
render :action => 'edit' render :action => 'edit'
else else
if @page.save if @page.save
@page.parent_id = parent_id if (!params[:parent_id].blank? \
and params[:parent_id] != @page_id)
flash[:notice] = 'Seite wurde aktualisiert.' flash[:notice] = 'Seite wurde aktualisiert.'
redirect_to wiki_page_path(@page.permalink) redirect_to wiki_page_path(@page.permalink)
else else
@ -83,7 +85,7 @@ class PagesController < ApplicationController
end end
def all def all
@pages = Page.all :order => 'created_at', :conditions => {:redirect => nil} @pages = Page.all :order => 'updated_at DESC', :conditions => {:redirect => nil}
end end
def version def version

View file

@ -13,6 +13,10 @@ module ApplicationHelper
I18n.l(time) unless time.nil? I18n.l(time) unless time.nil?
end end
def format_datetime_timespec(time, format)
I18n.l(time, :format => format) unless (time.nil? or format.nil?)
end
# Creates ajax-controlled-links for pagination # Creates ajax-controlled-links for pagination
# see also the plugin "will_paginate" # see also the plugin "will_paginate"
def pagination_links_remote(collection, options = {}) def pagination_links_remote(collection, options = {})

View file

@ -1,14 +1,6 @@
module PagesHelper module PagesHelper
include WikiCloth include WikiCloth
# def build_anchors(body)
# body.gsub(/(<h\d{1}>(.+)<\/h\d{1}>)/) do
# header = $1
# token = $2.downcase.gsub(' ', '-')
# "<a name='#{token}'> </a>#{header}"
# end
# end
def wikified_body(body, title = nil) def wikified_body(body, title = nil)
WikiCloth.new({:data => body+"\n", :link_handler => Wikilink.new, :params => {:referer => title}}).to_html WikiCloth.new({:data => body+"\n", :link_handler => Wikilink.new, :params => {:referer => title}}).to_html
end end
@ -36,22 +28,24 @@ module PagesHelper
end end
end end
end end
# def generate_toc(body)
# toc = ""
# body.gsub(/^([=]{1,6})\s*(.*?)\s*(\1)/) do
# number = $1.length - 1
# name = $2
#
# toc << "#" * number + " #{name}\n"
# end
# toc = WikiCloth.new({:data => toc, :link_handler => Wikilink.new}).to_html
#
# toc.gsub(/<li>([^<>\n]*)/) do
# name = $1
# token = name.downcase.gsub(' ', '-')
#
# "<li><a href='##{token}'>#{name}</a>"
# end
# end
def generate_toc(body)
toc = String.new
body.gsub(/^([=]{1,6})\s*(.*?)\s*(\1)/) do
number = $1.length - 1
name = $2
toc << "*" * number + " #{name}\n"
end
logger.debug toc.inspect
unless toc.blank?
toc = WikiCloth.new({:data => toc, :link_handler => Wikilink.new}).to_html
section_count = 0
toc.gsub(/<li>([^<>\n]*)/) do
section_count += 1
"<li><a href='#section-#{section_count}'>#{$1}</a>"
end
end
end
end end

View file

@ -10,7 +10,7 @@
= render :partial => "summary", :locals => {:order => @order} = render :partial => "summary", :locals => {:order => @order}
- unless @order.stockit? - unless @order.stockit?
.left_column{:style => 'width: 24em'} .middle_column{:style => 'width: 24em'}
.box_title .box_title
%h2 Rechnung %h2 Rechnung
.column_content#invoice .column_content#invoice

View file

@ -1,5 +1,9 @@
- content = wikified_body @page.body, @page.title - content = wikified_body @page.body, @page.title
//#toc - toc = generate_toc @page.body
//%h2 Inhaltsverzeichnis - unless toc.blank?
//= generate_toc @page.body #wikitoc
%h2
Inhaltsverzeichnis
%span= link_to_function "[verstecken]", "Element.toggle('wikitoc-content')"
#wikitoc-content= toc
#wiki_content= content #wiki_content= content

View file

@ -3,87 +3,85 @@
#preview= render :partial => 'body' #preview= render :partial => 'body'
#wiki-syntax-help #wiki-syntax-help
%p .box_title
.box_title %h2 Schnelle Formatierungshilfe
%h2 Schnelle Formatierungshilfe .column_content
.column_content %table(frame="void")
%table(frame="void") %tbody
%tbody %tr
%tr %td(colspan=2)
%td(colspan=2) %b Zeichenformatierung
%b Zeichenformatierung %tr
%tr %td
%td %i kursiv
%i kursiv %td
%td %pre
%pre ''kursiv''<br />
''kursiv''<br /> %tr
%tr %td
%td %b fett
%b fett %td
%td %pre '''Fett'''<br />
%pre '''Fett'''<br /> %tr
%tr %td
%td Keine Wiki-<br/>Formatierung
Keine Wiki-<br/>Formatierung %td
%td %pre &lt;nowiki&gt;text&lt;/nowiki&gt;
%pre &lt;nowiki&gt;text&lt;/nowiki&gt; %tr
%tr %td(colspan=2)
%td(colspan=2) %b Block-Formatierung
%b Block-Formatierung %tr
%tr %td
%td Überschriften
Überschriften %td
%td %pre
%pre \== Ebene 1 ==
\== Ebene 1 == %pre
%pre \=== Ebene 2 ===
\=== Ebene 2 === %pre
%pre \==== Ebene 3 ====
\==== Ebene 3 ==== %tr
%tr %td
%td Listen mit Punkten
Listen mit Punkten %td
%td %pre
%pre * Erster Punkt
* Erster Punkt %pre
%pre ** Zweiter Punkt
** Zweiter Punkt %tr
%tr %td
%td Listen mit Zahlen
Listen mit Zahlen %td
%td %pre
%pre \# Ersten Punkt
1. Ersten Punkt %pre
%pre \# Zweiter Punkt
1. Zweiter Punkt %tr
%tr %td(colspan=2)
%td(colspan=2) %b Link-Formatierung
%b Link-Formatierung %tr
%tr %td
%td Wiki-Links
Wiki-Links %td
%td %pre
%pre [[Foodsoft Wiki Seite]]
[[Foodsoft Wiki Seite]] %tr
%tr %td
%td Externe Links
Externe Links %td
%td %pre
%pre [http://addresse.net Externe Seite]
[http://addresse.net Externe Seite] %tr
%tr %td(colspan=2)
%td(colspan=2) %b Tabellenformatierung
%b Tabellenformatierung %tr
%tr %td
%td Siehe
Siehe = link_to "Tabellen", "http://www.mediawiki.org/wiki/Help:Tables", :target => '_blank'
= link_to "Tabellen", "http://www.mediawiki.org/wiki/Help:Tables", :target => '_blank'
- form_for @page do |f| - form_for @page do |f|
= f.error_messages = f.error_messages
= f.hidden_field :lock_version = f.hidden_field :lock_version
= f.hidden_field :parent_id
%p %p
%b Titel %b Titel
%br/ %br/
@ -91,10 +89,14 @@
%p %p
%b Inhalt %b Inhalt
%br/ %br/
= f.text_area :body, :size => "60x30" = f.text_area :body, :size => "65x30"
%p %p
= f.submit "Vorschau", :name => 'preview' = f.submit "Vorschau", :name => 'preview'
| |
= f.submit "Speichern" = f.submit "Speichern"
| |
= link_to "Abbrechen", @page = link_to "Abbrechen", @page
| Oberseite ändern:
= collection_select(:page, :parent_id, Page.all, :id, :permalink, {:prompt => "Neue Oberseite?"})
%div(style="clear:right; height:1px")

View file

@ -4,7 +4,7 @@
#breadcrump #breadcrump
= link_to_wikipage_by_permalink("Home", "Foodcoop-Wiki") = link_to_wikipage_by_permalink("Home", "Foodcoop-Wiki")
%h1 Alle Wikiseite %h1 Alle Wikiseiten
%p= link_to "Neue Seite anlegen", new_page_path %p= link_to "Neue Seite anlegen", new_page_path
@ -15,4 +15,4 @@
- for page in @pages - for page in @pages
%tr %tr
%td= link_to page.title, wiki_page_path(page.permalink) %td= link_to page.title, wiki_page_path(page.permalink)
%td= format_date page.updated_at %td= format_datetime page.updated_at

View file

@ -17,7 +17,12 @@
#page-versions #page-versions
= link_to "Bearbeiten", edit_page_path(@page) = link_to "Bearbeiten", edit_page_path(@page)
= link_to_function "Versionen (#{@page.versions.count})", "Element.toggle('versions')" = link_to_function "Versionen (#{@page.versions.count})", "Element.toggle('versions')"
#versions{:style => "display:none"} - unless @page.children.empty?
= link_to_function "Unterseiten", "Element.toggle('subpages')"
#versions{:style => "display:none"}
.box_title
%h2 Versionen
.column_content
%ul %ul
- for version in @page.versions.reverse - for version in @page.versions.reverse
%li %li
@ -25,11 +30,13 @@
= "(#{User.find(version.updated_by).nick})" = "(#{User.find(version.updated_by).nick})"
- unless @page.children.empty? - unless @page.children.empty?
#subpages #subpages{:style => "display:none"}
%h2 Unterseiten .box_title
%ul %h2 Unterseiten
- for page in @page.children .column_content
%li= link_to_wikipage(page) %ul
- for page in @page.children
%li= link_to_wikipage(page)
= render :partial => 'body' = render :partial => 'body'
@ -38,5 +45,7 @@
= link_to "Seite bearbeiten", edit_page_path(@page) = link_to "Seite bearbeiten", edit_page_path(@page)
| |
= link_to "Seite löschen", @page, :method => :delete, :confirm => "Achtung, auch alle Unterseiten werden gelöscht. Bist Du sicher?" = link_to "Seite löschen", @page, :method => :delete, :confirm => "Achtung, auch alle Unterseiten werden gelöscht. Bist Du sicher?"
| | Zuletzt bearbeitet von
= "Zuletzt bearbeitet am #{format_datetime @page.updated_at} (#{@page.user.nick})" %b
= "#{@page.user.nick}"
= "am #{format_datetime @page.updated_at}"

View file

@ -13,11 +13,15 @@
= @page.title = @page.title
#sidebar #sidebar
%b= "Version vom #{format_datetime @version.updated_at}" .box_title
%ul %h2 Version
%li= "Autor: #{User.find(@version.updated_by).nick}" .column_content
%li= link_to "Aktuelle Version sehen", wiki_page_path(:permalink => @page.permalink) %b= "#{format_datetime_timespec(@version.updated_at, "%a, %d.%m.%Y, %H:%M Uhr") }"
%li= link_to "Auf diese Version zurücksetzen", revert_page_path(@page, :version => @version.lock_version) %ul
%li= "Autor: #{User.find(@version.updated_by).nick}"
%li= link_to "Aktuelle Version sehen", wiki_page_path(:permalink => @page.permalink)
%li= link_to "Auf diese Version zurücksetzen", revert_page_path(@page, :version => @version.lock_version)
= wikified_body @version.body = wikified_body @version.body
%div(style="clear:right")

View file

@ -146,7 +146,7 @@ span.click-me {
#main { #main {
background: #FFF; background: #FFF;
padding: 0; padding: 0;
margin: 0; } margin: 0 15px 0 15px; }
#infobar { #infobar {
width: 10%; width: 10%;
@ -205,10 +205,10 @@ span.click-me {
#content { #content {
padding: .5em 0 2.5em 0; padding: .5em 0 2.5em 0;
margin: 0 0 0 1em; margin: 0;
background: #FFF; background: #FFF;
font-size: 1.3em; font-size: 1.3em;
width: 95%; width: 100%;
float: left; } float: left; }
/* *********************************** tables */ /* *********************************** tables */
@ -311,9 +311,6 @@ div.box {
border-left: 2px solid #78b74e; border-left: 2px solid #78b74e;
padding-left: 5px; } padding-left: 5px; }
div.single_column, div.left_column, div.right_column {
margin: .5em .5em 1.5em .5em; }
div.single_column { div.single_column {
width: 100%; } width: 100%; }
@ -321,6 +318,11 @@ div.left_column {
width: 40%; width: 40%;
float: left; } float: left; }
div.middle_column {
width: 40%;
margin-left: 10px;
float: left; }
div.right_column { div.right_column {
margin-bottom: 3em; margin-bottom: 3em;
width: 55%; width: 55%;
@ -441,6 +443,7 @@ ul.autocomplete .informal {
top: -1em; top: -1em;
left: 5%; } left: 5%; }
<<<<<<< HEAD:public/stylesheets/main.css
.stats-bar { .stats-bar {
height: 20px; height: 20px;
min-width: 10px; min-width: 10px;
@ -452,6 +455,51 @@ ul.autocomplete .informal {
.wiki_show h1, .wiki_version h1, .wiki_new h1, .wiki_edit h1, .wiki_all h1 { .wiki_show h1, .wiki_version h1, .wiki_new h1, .wiki_edit h1, .wiki_all h1 {
padding-left: 0; padding-left: 0;
padding-top: 10px; } padding-top: 10px; }
=======
#wiki_content {
border-style: none;
color: black;
line-height: 1.5em; }
.wiki_show, .wiki_version, .wiki_new, .wiki_edit, .wiki_all {
margin-top: 30px;
padding: 10px; }
.wiki_show h1, .wiki_version h1, .wiki_new h1, .wiki_edit h1, .wiki_all h1 {
padding-left: 0;
padding-top: 10px;
border-bottom-style: solid; }
.wiki_show .column_content, .wiki_version .column_content, .wiki_new .column_content, .wiki_edit .column_content, .wiki_all .column_content {
margin-bottom: 0; }
#wiki_content {
min-height: 400px; }
#wiki_content span.editsection {
display: none; }
#wiki_content h2, #wiki_content h3, #wiki_content h4, #wiki_content h5, #wiki_content h6 {
background: transparent none repeat scroll 0 0;
border-bottom: 1px solid #AAAAAA;
padding-bottom: 0,17em;
padding-top: 0,5em;
font-weight: normal;
font-size: 150%;
color: black; }
#wiki_content h3, #wiki_content h4, #wiki_content h5, #wiki_content h6 {
border-bottom: medium none;
font-weight: bold; }
#wiki_content h3 {
font-size: 132%; }
#wiki_content h4 {
font-size: 116%; }
#wiki_content ul {
line-height: 1.5em;
margin: 0.3em 0 0 1.5em;
padding: 0; }
#wiki_content ol {
line-height: 1.5em;
margin: 0.3em 0 0 3.2em;
padding: 0;
list-style-image: none; }
>>>>>>> wiki:public/stylesheets/main.css
a.new_wiki_link { a.new_wiki_link {
color: grey; } color: grey; }
@ -460,13 +508,22 @@ a.new_wiki_link {
border: 1px dotted grey; border: 1px dotted grey;
padding: 0 1em; } padding: 0 1em; }
#toc { #wikitoc {
float: right; } padding: 5px;
margin-bottom: 2em;
width: 25em;
border: 1px solid grey;
background-color: #efefef; }
#wikitoc h2 {
font-size: 1em;
color: black; }
#wikitoc h2 span a {
font-size: 0.5em;
color: grey; }
#breadcrump { #breadcrump {
font-size: 0.5em; font-size: 0.5em;
margin-bottom: 5px; margin-bottom: 5px;
margin-top: 30px;
height: 1em; height: 1em;
color: #ED0606; } color: #ED0606; }
#breadcrump a { #breadcrump a {
@ -477,19 +534,24 @@ a.new_wiki_link {
#sidebar { #sidebar {
float: right; float: right;
width: 20%; } width: 290px;
margin-top: -60px; }
#sidebar #page-versions { #sidebar #page-versions {
margin-top: -60px; margin-bottom: 18px;
text-align: right; } text-align: right; }
#sidebar #subpages { #sidebar #subpages {
margin-top: 2em; } border: 1px solid #78b74e;
margin-top: 10px;
#wiki_content h1, #wiki_content h2, #wiki_content h3, #wiki_content h4, #wiki_content h5 { padding: 0 0 0 0; }
color: black; } #sidebar #versions {
#wiki_content span.editsection { margin-top: 10px;
display: none; } border: 1px solid #78b74e; }
#wiki-syntax-help { #wiki-syntax-help {
float: right; } float: right; }
#wiki-syntax-help table { #wiki-syntax-help table {
border-color: #78b74e; } border-color: #78b74e; }
.wiki_version #sidebar {
margin-top: -23px;
border: 1px solid #78b74e; }

View file

@ -146,7 +146,7 @@ span.click-me {
#main { #main {
background: #FFF; background: #FFF;
padding: 0; padding: 0;
margin: 0; } margin: 0 15px 0 15px; }
#infobar { #infobar {
width: 10%; width: 10%;
@ -205,10 +205,10 @@ span.click-me {
#content { #content {
padding: .5em 0 2.5em 0; padding: .5em 0 2.5em 0;
margin: 0 0 0 1em; margin: 0;
background: #FFF; background: #FFF;
font-size: 1.3em; font-size: 1.3em;
width: 95%; width: 100%;
float: left; } float: left; }
/* *********************************** tables */ /* *********************************** tables */
@ -311,9 +311,6 @@ div.box {
border-left: 2px solid #78b74e; border-left: 2px solid #78b74e;
padding-left: 5px; } padding-left: 5px; }
div.single_column, div.left_column, div.right_column {
margin: .5em .5em 1.5em .5em; }
div.single_column { div.single_column {
width: 100%; } width: 100%; }
@ -321,6 +318,11 @@ div.left_column {
width: 40%; width: 40%;
float: left; } float: left; }
div.middle_column {
width: 40%;
margin-left: 10px;
float: left; }
div.right_column { div.right_column {
margin-bottom: 3em; margin-bottom: 3em;
width: 55%; width: 55%;
@ -441,6 +443,7 @@ ul.autocomplete .informal {
top: -1em; top: -1em;
left: 5%; } left: 5%; }
<<<<<<< HEAD:public/stylesheets/print.css
.stats-bar { .stats-bar {
height: 20px; height: 20px;
min-width: 10px; min-width: 10px;
@ -452,6 +455,51 @@ ul.autocomplete .informal {
.wiki_show h1, .wiki_version h1, .wiki_new h1, .wiki_edit h1, .wiki_all h1 { .wiki_show h1, .wiki_version h1, .wiki_new h1, .wiki_edit h1, .wiki_all h1 {
padding-left: 0; padding-left: 0;
padding-top: 10px; } padding-top: 10px; }
=======
#wiki_content {
border-style: none;
color: black;
line-height: 1.5em; }
.wiki_show, .wiki_version, .wiki_new, .wiki_edit, .wiki_all {
margin-top: 30px;
padding: 10px; }
.wiki_show h1, .wiki_version h1, .wiki_new h1, .wiki_edit h1, .wiki_all h1 {
padding-left: 0;
padding-top: 10px;
border-bottom-style: solid; }
.wiki_show .column_content, .wiki_version .column_content, .wiki_new .column_content, .wiki_edit .column_content, .wiki_all .column_content {
margin-bottom: 0; }
#wiki_content {
min-height: 400px; }
#wiki_content span.editsection {
display: none; }
#wiki_content h2, #wiki_content h3, #wiki_content h4, #wiki_content h5, #wiki_content h6 {
background: transparent none repeat scroll 0 0;
border-bottom: 1px solid #AAAAAA;
padding-bottom: 0,17em;
padding-top: 0,5em;
font-weight: normal;
font-size: 150%;
color: black; }
#wiki_content h3, #wiki_content h4, #wiki_content h5, #wiki_content h6 {
border-bottom: medium none;
font-weight: bold; }
#wiki_content h3 {
font-size: 132%; }
#wiki_content h4 {
font-size: 116%; }
#wiki_content ul {
line-height: 1.5em;
margin: 0.3em 0 0 1.5em;
padding: 0; }
#wiki_content ol {
line-height: 1.5em;
margin: 0.3em 0 0 3.2em;
padding: 0;
list-style-image: none; }
>>>>>>> wiki:public/stylesheets/print.css
a.new_wiki_link { a.new_wiki_link {
color: grey; } color: grey; }
@ -460,13 +508,22 @@ a.new_wiki_link {
border: 1px dotted grey; border: 1px dotted grey;
padding: 0 1em; } padding: 0 1em; }
#toc { #wikitoc {
float: right; } padding: 5px;
margin-bottom: 2em;
width: 25em;
border: 1px solid grey;
background-color: #efefef; }
#wikitoc h2 {
font-size: 1em;
color: black; }
#wikitoc h2 span a {
font-size: 0.5em;
color: grey; }
#breadcrump { #breadcrump {
font-size: 0.5em; font-size: 0.5em;
margin-bottom: 5px; margin-bottom: 5px;
margin-top: 30px;
height: 1em; height: 1em;
color: #ED0606; } color: #ED0606; }
#breadcrump a { #breadcrump a {
@ -477,23 +534,28 @@ a.new_wiki_link {
#sidebar { #sidebar {
float: right; float: right;
width: 20%; } width: 290px;
margin-top: -60px; }
#sidebar #page-versions { #sidebar #page-versions {
margin-top: -60px; margin-bottom: 18px;
text-align: right; } text-align: right; }
#sidebar #subpages { #sidebar #subpages {
margin-top: 2em; } border: 1px solid #78b74e;
margin-top: 10px;
#wiki_content h1, #wiki_content h2, #wiki_content h3, #wiki_content h4, #wiki_content h5 { padding: 0 0 0 0; }
color: black; } #sidebar #versions {
#wiki_content span.editsection { margin-top: 10px;
display: none; } border: 1px solid #78b74e; }
#wiki-syntax-help { #wiki-syntax-help {
float: right; } float: right; }
#wiki-syntax-help table { #wiki-syntax-help table {
border-color: #78b74e; } border-color: #78b74e; }
.wiki_version #sidebar {
margin-top: -23px;
border: 1px solid #78b74e; }
#logininfo, #header, #footer { #logininfo, #header, #footer {
display: none; } display: none; }

View file

@ -162,7 +162,7 @@ span.click-me
#main #main
:background #FFF :background #FFF
:padding 0 :padding 0
:margin 0 :margin 0 15px 0 15px
// ************************************* infobar // ************************************* infobar
#infobar #infobar
@ -226,10 +226,10 @@ span.click-me
// ************************************** content // ************************************** content
#content #content
:padding .5em 0 2.5em 0 :padding .5em 0 2.5em 0
:margin 0 0 0 1em :margin 0
:background #FFF :background #FFF
:font-size 1.3em :font-size 1.3em
:width 95% :width 100%
:float left :float left
@ -342,9 +342,6 @@ div.box
:border-left 2px solid #78b74e :border-left 2px solid #78b74e
:padding-left 5px :padding-left 5px
div.single_column, div.left_column, div.right_column
:margin .5em .5em 1.5em .5em
div.single_column div.single_column
:width 100% :width 100%
@ -352,6 +349,11 @@ div.left_column
:width 40% :width 40%
:float left :float left
div.middle_column
:width 40%
:margin-left 10px
:float left
div.right_column div.right_column
:margin-bottom 3em :margin-bottom 3em
:width 55% :width 55%
@ -497,21 +499,73 @@ ul.autocomplete
text-align: center text-align: center
margin: 0 10px 10px 0 margin: 0 10px 10px 0
// *** wiki // *** wiki
#wiki_content
border-style: none
color: black
line-height: 1.5em
.wiki_show, .wiki_version, .wiki_new, .wiki_edit, .wiki_all .wiki_show, .wiki_version, .wiki_new, .wiki_edit, .wiki_all
margin-top: 30px
padding: 10px
h1 h1
padding-left: 0 padding-left: 0
padding-top: 10px padding-top: 10px
border-bottom:
:style solid
.column_content
margin-bottom: 0
#wiki_content
min-height: 400px
span.editsection
display: none
h2, h3, h4, h5, h6
background: transparent none repeat scroll 0 0
border-bottom: 1px solid #AAAAAA
padding-bottom: 0,17em
padding-top: 0,5em
font-weight: normal
font-size: 150%
color: black
h3, h4, h5, h6
border-bottom: medium none
font-weight: bold
h3
font-size: 132%
h4
font-size: 116%
ul
line-height: 1.5em
margin: 0.3em 0 0 1.5em
padding: 0
ol
line-height: 1.5em
margin: 0.3em 0 0 3.2em
padding: 0
list-style-image: none
li margin-bottom: 0.1em
a.new_wiki_link a.new_wiki_link
color: grey color: grey
#preview #preview
border: 1px dotted grey border: 1px dotted grey
padding: 0 1em padding: 0 1em
#toc #wikitoc
float: right padding: 5px
margin-bottom: 2em
width: 25em
border: 1px solid grey
:background-color= !lightGrey
h2
font-size: 1em
color: black
span a
font-size: 0.5em
color: grey
#breadcrump #breadcrump
font-size: 0.5em font-size: 0.5em
margin-bottom: 5px margin-bottom: 5px
margin-top: 30px
height: 1em height: 1em
color: #ED0606 color: #ED0606
a a
@ -521,21 +575,25 @@ a.new_wiki_link
:text-decoration = underline :text-decoration = underline
#sidebar #sidebar
float: right float: right
width: 20% width: 290px
margin-top: -60px
#page-versions #page-versions
margin-top: -60px margin-bottom: 18px
text-align: right text-align: right
#subpages #subpages
margin-top: 2em border: 1px solid #78b74e
margin-top: 10px
padding: 0 0 0 0
#wiki_content #versions
h1, h2, h3, h4, h5 margin-top: 10px
color: black border: 1px solid #78b74e
span.editsection
display: none
#wiki-syntax-help #wiki-syntax-help
float: right float: right
table table
border-color: #78b74e border-color: #78b74e
.wiki_version
#sidebar
margin-top: -23px
border: 1px solid #78b74e

View file

@ -127,7 +127,7 @@ class WikiBuffer
self.data.gsub!(/^([-]{4,})/) { |r| "<hr />" } self.data.gsub!(/^([-]{4,})/) { |r| "<hr />" }
self.data.gsub!(/^([=]{1,6})\s*(.*?)\s*(\1)/) { |r| self.data.gsub!(/^([=]{1,6})\s*(.*?)\s*(\1)/) { |r|
@section_count += 1 @section_count += 1
"<h#{$1.length}>" + (@noeditsection == true ? "" : "<a name='section-#{@section_count}' /><h#{$1.length}>" + (@noeditsection == true ? "" :
"<span class=\"editsection\">[<a href=\"" + @options[:link_handler].section_link(@section_count) + "<span class=\"editsection\">[<a href=\"" + @options[:link_handler].section_link(@section_count) +
"\" title=\"Edit section: #{$2}\">edit</a>]</span>") + "\" title=\"Edit section: #{$2}\">edit</a>]</span>") +
" <span class=\"mw-headline\">#{$2}</span></h#{$1.length}>" " <span class=\"mw-headline\">#{$2}</span></h#{$1.length}>"