Cherrypick of sandoz last commit

Conflicts:
	app/views/pages/all.html.haml
	public/stylesheets/main.css
	public/stylesheets/print.css
This commit is contained in:
Benjamin Meichsner 2009-08-16 10:13:50 +02:00
commit 42b5e7a73f
10 changed files with 145 additions and 63 deletions

View file

@ -13,8 +13,12 @@ module PagesHelper
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
def link_to_wikipage(page) def link_to_wikipage(page, text = nil)
if text == nil
link_to page.title, "/wiki/#{page.title}" link_to page.title, "/wiki/#{page.title}"
else
link_to text, "/wiki/#{page.title}"
end
end end
# def generate_toc(body) # def generate_toc(body)
# toc = "" # toc = ""

View file

@ -97,4 +97,4 @@
| |
= f.submit "Speichern" = f.submit "Speichern"
| |
= link_to "Abbrechen", :back = link_to "Abbrechen", @page

View file

@ -1,9 +1,17 @@
- title "Alle Wikiseiten" - title "Alle Wikiseiten", false
.wiki_all
#breadcrump
= link_to_wikipage(Page.find_by_permalink("Home"), "Foodcoop-Wiki")
%h1 Alle Wikiseite
%p= link_to "Neue Seite anlegen", new_page_path
%table %table
%tr %tr
%th Titel %th Titel
%th zuletzt aktualisiert %th Zuletzt aktualisiert
- 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)

View file

@ -1,3 +1,14 @@
- title "#{@page.title} bearbeiten" - title "#{@page.title} bearbeiten", false
.wiki_edit
#breadcrump
= link_to_wikipage(Page.find_by_permalink("Home"), "Foodcoop-Wiki")
- for page in @page.ancestors.reverse
%span.wikiSeparator >
= link_to_wikipage(page)
%span.wikiSeparator >
= link_to_wikipage(@page)
%h1 #{@page.title} bearbeiten
= render :partial => 'form' = render :partial => 'form'

View file

@ -1,3 +1,16 @@
- title "Neue Wikiseite anlegen" - title "Neue Wikiseite anlegen", false
.wiki_new
#breadcrump
= link_to_wikipage(Page.find_by_permalink("Home"), "Foodcoop-Wiki")
- parent_page = Page.find_by_permalink(params[:parent])
- if parent_page != nil
- for page in parent_page.ancestors.reverse
%span.wikiSeparator >
= link_to_wikipage(page)
%span.wikiSeparator >
= @page.title
%h1 Neue Wikiseite anlegen
= render :partial => 'form' = render :partial => 'form'

View file

@ -1,10 +1,16 @@
- title @page.title, false - title @page.title, false
%h1 .wiki_show
%span#breadcrump
#breadcrump
= link_to_wikipage(Page.find_by_permalink("Home"), "Foodcoop-Wiki")
- for page in @page.ancestors.reverse - for page in @page.ancestors.reverse
%span.wikiSeparator >
= link_to_wikipage(page) = link_to_wikipage(page)
>> %span.wikiSeparator >
= @page.title
%h1
= @page.title = @page.title
#sidebar #sidebar

View file

@ -1,4 +1,16 @@
- title @page.title - title @page.title, false
.wiki_version
#breadcrump
= link_to_wikipage(Page.find_by_permalink("Home"), "Foodcoop-Wiki")
- for page in @page.ancestors.reverse
%span.wikiSeparator >
= link_to_wikipage(page)
%span.wikiSeparator >
= link_to_wikipage(@page)
%h1
= @page.title
#sidebar #sidebar
%b= "Version vom #{format_datetime @version.updated_at}" %b= "Version vom #{format_datetime @version.updated_at}"

View file

@ -441,7 +441,6 @@ ul.autocomplete .informal {
top: -1em; top: -1em;
left: 5%; } left: 5%; }
.stats-bar { .stats-bar {
height: 20px; height: 20px;
min-width: 10px; min-width: 10px;
@ -450,6 +449,10 @@ ul.autocomplete .informal {
text-align: center; text-align: center;
margin: 0 10px 10px 0; } margin: 0 10px 10px 0; }
.wiki_show h1, .wiki_version h1, .wiki_new h1, .wiki_edit h1, .wiki_all h1 {
padding-left: 0;
padding-top: 10px; }
a.new_wiki_link { a.new_wiki_link {
color: grey; } color: grey; }
@ -461,15 +464,22 @@ a.new_wiki_link {
float: right; } float: right; }
#breadcrump { #breadcrump {
font-size: 0.5em; } font-size: 0.5em;
margin-bottom: 5px;
margin-top: 30px;
height: 1em;
color: #ED0606; }
#breadcrump a { #breadcrump a {
color: #ed0606; } color: #ed0606;
text-decoration: none; }
#breadcrump a:hover {
text-decoration: underline; }
#sidebar { #sidebar {
float: right; float: right;
width: 20%; } width: 20%; }
#sidebar #page-versions { #sidebar #page-versions {
margin-top: -4em; margin-top: -60px;
text-align: right; } text-align: right; }
#sidebar #subpages { #sidebar #subpages {
margin-top: 2em; } margin-top: 2em; }

View file

@ -441,7 +441,6 @@ ul.autocomplete .informal {
top: -1em; top: -1em;
left: 5%; } left: 5%; }
.stats-bar { .stats-bar {
height: 20px; height: 20px;
min-width: 10px; min-width: 10px;
@ -450,6 +449,10 @@ ul.autocomplete .informal {
text-align: center; text-align: center;
margin: 0 10px 10px 0; } margin: 0 10px 10px 0; }
.wiki_show h1, .wiki_version h1, .wiki_new h1, .wiki_edit h1, .wiki_all h1 {
padding-left: 0;
padding-top: 10px; }
a.new_wiki_link { a.new_wiki_link {
color: grey; } color: grey; }
@ -461,15 +464,22 @@ a.new_wiki_link {
float: right; } float: right; }
#breadcrump { #breadcrump {
font-size: 0.5em; } font-size: 0.5em;
margin-bottom: 5px;
margin-top: 30px;
height: 1em;
color: #ED0606; }
#breadcrump a { #breadcrump a {
color: #ed0606; } color: #ed0606;
text-decoration: none; }
#breadcrump a:hover {
text-decoration: underline; }
#sidebar { #sidebar {
float: right; float: right;
width: 20%; } width: 20%; }
#sidebar #page-versions { #sidebar #page-versions {
margin-top: -4em; margin-top: -60px;
text-align: right; } text-align: right; }
#sidebar #subpages { #sidebar #subpages {
margin-top: 2em; } margin-top: 2em; }

View file

@ -488,7 +488,6 @@ ul.autocomplete
top: -1em top: -1em
left: 5% left: 5%
<<<<<<< HEAD:public/stylesheets/sass/main.sass
// group stats // group stats
.stats-bar .stats-bar
height: 20px height: 20px
@ -497,8 +496,11 @@ ul.autocomplete
background-color: #fff background-color: #fff
text-align: center text-align: center
margin: 0 10px 10px 0 margin: 0 10px 10px 0
=======
// *** wiki // *** wiki
.wiki_show, .wiki_version, .wiki_new, .wiki_edit, .wiki_all
h1
padding-left: 0
padding-top: 10px
a.new_wiki_link a.new_wiki_link
color: grey color: grey
#preview #preview
@ -508,13 +510,20 @@ a.new_wiki_link
float: right float: right
#breadcrump #breadcrump
font-size: 0.5em font-size: 0.5em
margin-bottom: 5px
margin-top: 30px
height: 1em
color: #ED0606
a a
:color = !main_red :color = !main_red
:text-decoration = none
a:hover
:text-decoration = underline
#sidebar #sidebar
float: right float: right
width: 20% width: 20%
#page-versions #page-versions
margin-top: -4em margin-top: -60px
text-align: right text-align: right
#subpages #subpages
margin-top: 2em margin-top: 2em
@ -530,4 +539,3 @@ a.new_wiki_link
float: right float: right
table table
border-color: #78b74e border-color: #78b74e
>>>>>>> wiki:public/stylesheets/sass/main.sass