diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index e0a78a9f..733a3e16 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -12,6 +12,10 @@ module ApplicationHelper def format_datetime(time = Time.now) I18n.l(time) unless time.nil? 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 # see also the plugin "will_paginate" diff --git a/app/views/pages/_form.html.haml b/app/views/pages/_form.html.haml index c085900c..2f00aea9 100644 --- a/app/views/pages/_form.html.haml +++ b/app/views/pages/_form.html.haml @@ -3,82 +3,81 @@ #preview= render :partial => 'body' #wiki-syntax-help - %p - .box_title - %h2 Schnelle Formatierungshilfe - .column_content - %table(frame="void") - %tbody - %tr - %td(colspan=2) - %b Zeichenformatierung - %tr - %td - %i kursiv - %td - %pre - ''kursiv''
- %tr - %td - %b fett - %td - %pre '''Fett'''
- %tr - %td - Keine Wiki-
Formatierung - %td - %pre <nowiki>text</nowiki> - %tr - %td(colspan=2) - %b Block-Formatierung - %tr - %td - Überschriften - %td - %pre - \== Ebene 1 == - %pre - \=== Ebene 2 === - %pre - \==== Ebene 3 ==== - %tr - %td - Listen mit Punkten - %td - %pre - * Erster Punkt - %pre - ** Zweiter Punkt - %tr - %td - Listen mit Zahlen - %td - %pre - 1. Ersten Punkt - %pre - 1. Zweiter Punkt - %tr - %td(colspan=2) - %b Link-Formatierung - %tr - %td - Wiki-Links - %td - %pre - [[Foodsoft Wiki Seite]] - %tr - %td - Externe Links - %td - %pre - [http://addresse.net Externe Seite] - %tr - %td(colspan=2) - %b Tabellenformatierung - %tr - %td - Siehe - = link_to "Tabellen", "http://www.mediawiki.org/wiki/Help:Tables", :target => '_blank' + .box_title + %h2 Schnelle Formatierungshilfe + .column_content + %table(frame="void") + %tbody + %tr + %td(colspan=2) + %b Zeichenformatierung + %tr + %td + %i kursiv + %td + %pre + ''kursiv''
+ %tr + %td + %b fett + %td + %pre '''Fett'''
+ %tr + %td + Keine Wiki-
Formatierung + %td + %pre <nowiki>text</nowiki> + %tr + %td(colspan=2) + %b Block-Formatierung + %tr + %td + Überschriften + %td + %pre + \== Ebene 1 == + %pre + \=== Ebene 2 === + %pre + \==== Ebene 3 ==== + %tr + %td + Listen mit Punkten + %td + %pre + * Erster Punkt + %pre + ** Zweiter Punkt + %tr + %td + Listen mit Zahlen + %td + %pre + 1. Ersten Punkt + %pre + 1. Zweiter Punkt + %tr + %td(colspan=2) + %b Link-Formatierung + %tr + %td + Wiki-Links + %td + %pre + [[Foodsoft Wiki Seite]] + %tr + %td + Externe Links + %td + %pre + [http://addresse.net Externe Seite] + %tr + %td(colspan=2) + %b Tabellenformatierung + %tr + %td + Siehe + = link_to "Tabellen", "http://www.mediawiki.org/wiki/Help:Tables", :target => '_blank' - form_for @page do |f| = f.error_messages @@ -97,4 +96,6 @@ | = f.submit "Speichern" | - = link_to "Abbrechen", @page \ No newline at end of file + = link_to "Abbrechen", @page + +%div(style="clear:right; height:1px") \ No newline at end of file diff --git a/app/views/pages/show.html.haml b/app/views/pages/show.html.haml index 55f94eb7..e5ab69a4 100644 --- a/app/views/pages/show.html.haml +++ b/app/views/pages/show.html.haml @@ -17,7 +17,12 @@ #page-versions = link_to "Bearbeiten", edit_page_path(@page) = 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 - for version in @page.versions.reverse %li @@ -26,10 +31,12 @@ - unless @page.children.empty? #subpages - %h2 Unterseiten - %ul - - for page in @page.children - %li= link_to_wikipage(page) + .box_title + %h2 Unterseiten + .column_content + %ul + - for page in @page.children + %li= link_to_wikipage(page) = render :partial => 'body' diff --git a/app/views/pages/version.html.haml b/app/views/pages/version.html.haml index f1b6467c..369fa375 100644 --- a/app/views/pages/version.html.haml +++ b/app/views/pages/version.html.haml @@ -13,11 +13,15 @@ = @page.title #sidebar - %b= "Version vom #{format_datetime @version.updated_at}" - %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) + .box_title + %h2 Version + .column_content + %b= "#{format_datetime_timespec(@version.updated_at, "%a, %d.%m.%Y, %H:%M Uhr") }" + %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 + %div(style="clear:right") diff --git a/public/stylesheets/main.css b/public/stylesheets/main.css index 5d37d4d3..826a963b 100644 --- a/public/stylesheets/main.css +++ b/public/stylesheets/main.css @@ -308,7 +308,6 @@ div.box { border-left: 2px solid #78b74e; padding-left: 5px; } - div.single_column { width: 100%; } @@ -455,6 +454,8 @@ ul.autocomplete .informal { 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; } @@ -508,14 +509,24 @@ a.new_wiki_link { #sidebar { float: right; - width: 20%; } + width: 290px; + margin-top: -60px; } #sidebar #page-versions { - margin-top: -60px; + margin-bottom: 18px; text-align: right; } #sidebar #subpages { - margin-top: 2em; } + border: 1px solid #78b74e; + margin-top: 10px; + padding: 0 0 0 0; } + #sidebar #versions { + margin-top: 10px; + border: 1px solid #78b74e; } #wiki-syntax-help { float: right; } #wiki-syntax-help table { border-color: #78b74e; } + +.wiki_version #sidebar { + margin-top: -23px; + border: 1px solid #78b74e; } diff --git a/public/stylesheets/print.css b/public/stylesheets/print.css index 4f6816b8..3bc01659 100644 --- a/public/stylesheets/print.css +++ b/public/stylesheets/print.css @@ -308,7 +308,6 @@ div.box { border-left: 2px solid #78b74e; padding-left: 5px; } - div.single_column { width: 100%; } @@ -455,6 +454,8 @@ ul.autocomplete .informal { 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; } @@ -508,18 +509,28 @@ a.new_wiki_link { #sidebar { float: right; - width: 20%; } + width: 290px; + margin-top: -60px; } #sidebar #page-versions { - margin-top: -60px; + margin-bottom: 18px; text-align: right; } #sidebar #subpages { - margin-top: 2em; } + border: 1px solid #78b74e; + margin-top: 10px; + padding: 0 0 0 0; } + #sidebar #versions { + margin-top: 10px; + border: 1px solid #78b74e; } #wiki-syntax-help { float: right; } #wiki-syntax-help table { border-color: #78b74e; } +.wiki_version #sidebar { + margin-top: -23px; + border: 1px solid #78b74e; } + #logininfo, #header, #footer { display: none; } diff --git a/public/stylesheets/sass/main.sass b/public/stylesheets/sass/main.sass index b31a53c0..17c82e49 100644 --- a/public/stylesheets/sass/main.sass +++ b/public/stylesheets/sass/main.sass @@ -503,6 +503,8 @@ ul.autocomplete padding-top: 10px border-bottom: :style solid + .column_content + margin-bottom: 0 #wiki_content min-height: 400px @@ -553,14 +555,25 @@ a.new_wiki_link :text-decoration = underline #sidebar float: right - width: 20% + width: 290px + margin-top: -60px #page-versions - margin-top: -60px + margin-bottom: 18px text-align: right #subpages - margin-top: 2em + border: 1px solid #78b74e + margin-top: 10px + padding: 0 0 0 0 + #versions + margin-top: 10px + border: 1px solid #78b74e #wiki-syntax-help float: right table border-color: #78b74e + +.wiki_version + #sidebar + margin-top: -23px + border: 1px solid #78b74e \ No newline at end of file