Move plugins to separate directory.

This commit is contained in:
wvengen 2014-11-22 00:43:24 +01:00
parent 6e990fed4c
commit 6aa8ee7968
59 changed files with 4 additions and 4 deletions

View file

@ -0,0 +1,9 @@
- content = wikified_body @page.body, @page.title
- toc = generate_toc @page.body
- unless toc.blank? or params[:preview]
- content_for :sidebar do
#wikitoc.well.well-small
%h3= t '.title_toc'
= toc
= content

View file

@ -0,0 +1,85 @@
- if params[:preview]
%section#wikiContent
= render 'body'
.row-fluid
.span8
= simple_form_for @page do |f|
= f.hidden_field :lock_version
= f.input :title, input_html: {class: 'input-xxlarge'}
= f.input :body, input_html: {class: 'input-xxlarge', rows: 20}
= f.input :parent_id, as: :select, collection: parent_pages_to_select(@page)
.form-actions
= button_tag :name => 'preview', class: 'btn' do
%i.icon-search= t '.preview'
= button_tag class: 'btn' do
%i.icon-save= t 'ui.save'
= link_to t('ui.or_cancel'), @page
.span4
%h3= t '.help.title'
%table.table
%tbody
%tr
%td(colspan=2)
%b= t '.help.section_character'
%tr
%td
%i= t '.help.italic'
%td
%pre
''#{t '.help.italic'}''<br />
%tr
%td
%b= t '.help.bold'
%td
%pre '''#{t '.help.bold'}'''<br />
%tr
%td= t '.help.noformat'
%td
%pre &lt;nowiki&gt;#{t '.help.text'}&lt;/nowiki&gt;
%tr
%td(colspan=2)
%b= t '.help.section_block'
%tr
%td= t '.help.headings'
%td
%pre
\== #{t '.help.heading', level: 1} ==
%pre
\=== #{t '.help.heading', level: 2} ===
%pre
\==== #{t '.help.heading', level: 3} ====
%tr
%td= t '.help.unordered_list'
%td
%pre
* #{t '.help.list_item_1'}
%pre
** #{t '.help.list_item_2'}
%tr
%td= t '.help.ordered_list'
%td
%pre
\# #{t '.help.list_item_1'}
%pre
\# #{t '.help.list_item_2'}
%tr
%td(colspan=2)
%b= t '.help.section_link'
%tr
%td= t '.help.wiki_links'
%td
%pre
[[#{t '.help.wiki_link_ex'}]]
%tr
%td= t '.help.external_links'
%td
%pre
[http://example.net #{t '.help.external_link_ex'}]
%tr
%td(colspan=2)
%b= t '.help.section_table'
%tr
%td!= t '.help.see_tables', tables_link: link_to(t('.help.tables_link'), "http://www.mediawiki.org/wiki/Help:Tables", :target => '_blank')

View file

@ -0,0 +1,8 @@
-ident = 20 * level
%tr
%td{:style => "padding-left: #{ident}px"}
= link_to page.title, wiki_page_path(page.permalink)
%td #{show_user page.user} (#{format_datetime_timespec(page.updated_at, t('.date_format'))})
-if siteMap == 1
-for child in page.children.all
= render :partial => 'page_list_item', :locals => {:page => child, :level => level+1, :siteMap => 1}

View file

@ -0,0 +1,8 @@
%table.table.table-striped
%thead
%tr
%th= t 'pages.title'
%th= t 'pages.last_updated'
%tbody
- for page in @pages
= render :partial => "page_list_item", :locals => {:page => page, :level => 0, :siteMap => 0}

View file

@ -0,0 +1,12 @@
%table.table.table-striped
%thead
%tr
%th= t 'pages.title'
%th= t 'pages.last_updated'
- homepage = Page.find_by_permalink('Home')
- unless homepage.nil?
= render :partial => 'page_list_item', :locals => {:page => homepage, :level => 0, :siteMap => 1}
%tbody
- for page in @pages
- if page.id != homepage.try(:id)
= render :partial => 'page_list_item', :locals => {:page => page, :level => 0, :siteMap => 1}

View file

@ -0,0 +1,8 @@
%table.table.table-striped
%thead
%tr
%th= t 'pages.title'
%th= t 'pages.last_updated'
%tbody
- for page in @pages
= render :partial => "page_list_item", :locals => {:page => page, :level => 0, :siteMap => 0}

View file

@ -0,0 +1,18 @@
- title t('.title'), false
- content_for :sidebar do
= link_to t('.new_page'), new_page_path, class: 'btn btn-primary'
.navbar
.navbar-inner
%ul.nav
%li= link_to t('.recent_changes'), all_pages_path(:view => 'recent_changes')
%li= link_to t('.title_list'), all_pages_path(:view => 'title_list')
%li= link_to t('.site_map'), all_pages_path(:view => 'site_map')
%li= link_to image_tag('icons/feed-icon-14x14.png', :alt => 'RSS Feed'), all_pages_rss_url
= form_tag all_pages_path, method: :get, class: 'form-search pull-right' do
= text_field_tag :name, params[:name], class: 'input-medium search-query',
placeholder: t('.search.placeholder')
= submit_tag t('.search.action'), class: 'btn'
= render @partial

View file

@ -0,0 +1,19 @@
xml.instruct! :xml, :version => "1.0"
xml.rss :version => "2.0" do
xml.channel do
xml.title FoodsoftConfig[:name] + " Wiki"
xml.description ""
xml.link FoodsoftConfig[:homepage]
for page in @pages
xml.item do
xml.title page.title
xml.description page.diff, :type => "html"
xml.author User.find_by_id(page.updated_by).try(:display)
xml.pubDate page.updated_at.to_s(:rfc822)
xml.link wiki_page_path(page.permalink)
xml.guid page.updated_at.to_i
end
end
end
end

View file

@ -0,0 +1,3 @@
- title t('.title')
= render 'form'

View file

@ -0,0 +1,3 @@
- title t('.title')
= render 'form'

View file

@ -0,0 +1,51 @@
- title @page.title, false
- content_for :sidebar do
%p
= link_to edit_page_path(@page), class: 'btn btn-primary' do
%i.icon-edit= t '.edit'
.well.well-small
%ul.nav.nav-list
%li
%li= link_to t('.versions', count: @page.versions.count), "#versions", 'data-toggle-this' => '#versions'
- unless @page.children.empty?
%li= link_to t('.subpages'), "#subpages", 'data-toggle-this' => '#subpages'
#versions.well.well-small{:style => "display:none"}
%h3= t '.title_versions'
%ul.unstyled
- @page.versions.reverse.each do |version|
%li
= link_to I18n.l(version.updated_at, :format => t('.date_format')), version_page_path(@page, :version => version.lock_version)
= "(#{show_user(User.find_by_id(version.updated_by))})"
- unless @page.children.empty?
#subpages.well.well-small{:style => "display:none"}
%h3= t '.subpages'
%ul.unstyled
- @page.children.each do |page|
%li= link_to_wikipage(page)
%ul.breadcrumb
%li
= link_to_wikipage_by_permalink("Home", "Foodcoop-Wiki")
%span.divider /
- for page in @page.ancestors.reverse
%li
= link_to_wikipage(page)
%span.divider /
%li.active= @page.title
#wikiContent
.page-header
%h1= @page.title
= render :partial => 'body'
%hr.clear/
%p
= link_to edit_page_path(@page), class: 'btn btn-primary' do
%i.icon-edit= t '.edit'
= link_to t('.delete'), @page, class: 'btn btn-danger', :method => :delete,
:data => {:confirm => t('.delete_confirm')}
!= '| ' + t('.last_updated', user: show_user(@page.user), when: format_datetime(@page.updated_at))

View file

@ -0,0 +1,11 @@
- title t('.title', title: @page.title, version: @version.lock_version)
- content_for :sidebar do
%h3= t '.title_version'
%b= "#{format_datetime_timespec(@version.updated_at, t('.date_format'))}"
%ul
%li= t '.author', user: show_user(User.find(@version.updated_by))
%li= link_to t('.view_current'), wiki_page_path(:permalink => @page.permalink)
%li= link_to t('.revert'), revert_page_path(@page, :version => @version.lock_version)
= wikified_body @version.body