spree_static_content 0.40.2 → 0.60.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/Rakefile +2 -1
- data/VERSION +1 -1
- data/Versionfile +3 -1
- data/app/controllers/admin/pages_controller.rb +4 -17
- data/app/controllers/spree/base_controller_decorator.rb +4 -0
- data/app/models/page.rb +2 -1
- data/app/views/admin/pages/_form.html.erb +16 -52
- data/app/views/admin/pages/edit.html.erb +3 -5
- data/app/views/admin/pages/index.html.erb +7 -9
- data/app/views/admin/pages/new.html.erb +3 -5
- data/app/views/static_content/show.html.erb +3 -7
- data/config/locales/de-CH.yml +21 -20
- data/config/locales/en-AU.yml +21 -20
- data/config/locales/en-GB.yml +21 -20
- data/config/locales/en.yml +30 -20
- data/config/locales/es-ES.yml +15 -14
- data/config/locales/fr-FR.yml +21 -20
- data/config/locales/nl-BE.yml +21 -20
- data/config/locales/nl-NL.yml +21 -20
- data/config/locales/pl.yml +19 -18
- data/config/locales/pt-BR.yml +13 -12
- data/config/locales/ru.yml +31 -20
- data/lib/generators/spree_static_content/install_generator.rb +4 -0
- data/lib/generators/templates/public/stylesheets/formtastic.css +145 -0
- data/lib/generators/templates/public/stylesheets/formtastic_changes.css +14 -0
- data/spree_static_content.gemspec +10 -5
- metadata +22 -6
data/Rakefile
CHANGED
@@ -21,8 +21,9 @@ Jeweler::Tasks.new do |s|
|
|
21
21
|
#s.email = ""
|
22
22
|
s.homepage = "http://github.com/spree/spree-static-content"
|
23
23
|
s.authors = ["Peter Berkenbosch", "Roman Smirnov"]
|
24
|
-
s.add_dependency 'spree_core', ['>= 0.
|
24
|
+
s.add_dependency 'spree_core', ['>= 0.60.0']
|
25
25
|
s.add_dependency 'spree_editor'
|
26
|
+
s.add_dependency 'formtastic', '1.2.3'
|
26
27
|
#s.has_rdoc = false
|
27
28
|
#s.extra_rdoc_files = [ "README.rdoc"]
|
28
29
|
#s.rdoc_options = ["--main", "README.rdoc", "--inline-source", "--line-numbers"]
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.60.0
|
data/Versionfile
CHANGED
@@ -1 +1,3 @@
|
|
1
|
-
"0.
|
1
|
+
"0.60.x" => { :version => '0.40.2', :ref => '45b0050b96809c8fb0f21940f9407e9012a6d420' }
|
2
|
+
"0.50.x" => { :version => '0.40.2', :ref => '45b0050b96809c8fb0f21940f9407e9012a6d420' }
|
3
|
+
"0.40.x" => { :version => '0.40.2', :ref => '45b0050b96809c8fb0f21940f9407e9012a6d420' }
|
@@ -1,21 +1,8 @@
|
|
1
|
-
class Admin::PagesController < Admin::
|
2
|
-
|
1
|
+
class Admin::PagesController < Admin::ResourceController
|
2
|
+
update.after :expire_cache
|
3
3
|
|
4
|
-
|
5
|
-
|
6
|
-
end
|
7
|
-
|
8
|
-
update.after do
|
4
|
+
private
|
5
|
+
def expire_cache
|
9
6
|
expire_page :controller => '/static_content', :action => 'show', :path => @page.slug
|
10
|
-
Rails.cache.delete('page_not_exist/'+@page.slug)
|
11
|
-
end
|
12
|
-
|
13
|
-
create.response do |wants|
|
14
|
-
wants.html { redirect_to collection_url }
|
15
|
-
end
|
16
|
-
|
17
|
-
create.after do
|
18
|
-
Rails.cache.delete('page_not_exist/'+@page.slug)
|
19
7
|
end
|
20
|
-
|
21
8
|
end
|
@@ -16,6 +16,10 @@ Spree::BaseController.class_eval do
|
|
16
16
|
return if Rails.cache.fetch('page_not_exist/'+request.path)
|
17
17
|
|
18
18
|
if @page = Page.visible.find_by_slug(request.path)
|
19
|
+
|
20
|
+
#load @content object to load correct meta_keywords & meta_description
|
21
|
+
@content = @page
|
22
|
+
|
19
23
|
if @page.layout && !@page.layout.empty?
|
20
24
|
render :template => 'static_content/show', :layout => @page.layout
|
21
25
|
else
|
data/app/models/page.rb
CHANGED
@@ -1,52 +1,16 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
<td valign="top"><%=t("ext_static_content_foreign_link")%>:</td>
|
18
|
-
<td><%= f.text_field :foreign_link, {"style" => "width:500px"} %></td>
|
19
|
-
</tr>
|
20
|
-
<tr>
|
21
|
-
<td valign="top"><%=t("ext_static_content_meta_keywords")%>:</td>
|
22
|
-
<td><%= f.text_field :meta_keywords, {"style" => "width:500px"} %></td>
|
23
|
-
</tr>
|
24
|
-
<tr>
|
25
|
-
<td valign="top"><%=t("ext_static_content_meta_description")%>:</td>
|
26
|
-
<td><%= f.text_field :meta_description, {"style" => "width:500px"} %></td>
|
27
|
-
</tr>
|
28
|
-
<tr>
|
29
|
-
<td valign="top"><%=t("ext_static_content_show_in_sidebar")%>:</td>
|
30
|
-
<td><%= f.check_box :show_in_sidebar %></td>
|
31
|
-
</tr>
|
32
|
-
<tr>
|
33
|
-
<td valign="top"><%=t("ext_static_content_show_in_header")%>:</td>
|
34
|
-
<td><%= f.check_box :show_in_header %></td>
|
35
|
-
</tr>
|
36
|
-
<tr>
|
37
|
-
<td valign="top"><%=t("ext_static_content_show_in_footer")%>:</td>
|
38
|
-
<td><%= f.check_box :show_in_footer %></td>
|
39
|
-
</tr>
|
40
|
-
<tr>
|
41
|
-
<td valign="top"><%=t("ext_static_content_position")%>:</td>
|
42
|
-
<td><%= f.text_field :position %></td>
|
43
|
-
</tr>
|
44
|
-
<tr>
|
45
|
-
<td valign="top"><%=t("ext_static_content_layout")%>:</td>
|
46
|
-
<td><%= f.text_field :layout %></td>
|
47
|
-
</tr>
|
48
|
-
<tr>
|
49
|
-
<td valign="top"><%=t("ext_static_content_visible")%>:</td>
|
50
|
-
<td><%= f.check_box :visible %></td>
|
51
|
-
</tr>
|
52
|
-
</table>
|
1
|
+
<%= stylesheet_link_tag 'formtastic', 'formtastic_changes' %>
|
2
|
+
|
3
|
+
<%= f.inputs do %>
|
4
|
+
<%= f.input :title %>
|
5
|
+
<%= f.input :slug %>
|
6
|
+
<%= f.input :body %>
|
7
|
+
<%= f.input :foreign_link %>
|
8
|
+
<%= f.input :meta_keywords %>
|
9
|
+
<%= f.input :meta_description %>
|
10
|
+
<%= f.input :show_in_sidebar %>
|
11
|
+
<%= f.input :show_in_header %>
|
12
|
+
<%= f.input :show_in_footer %>
|
13
|
+
<%= f.input :position %>
|
14
|
+
<%= f.input :layout %>
|
15
|
+
<%= f.input :visible %>
|
16
|
+
<% end %>
|
@@ -1,12 +1,10 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
<h1><%= t("ext_static_content_editing_page") %></h1>
|
1
|
+
<h1><%= t("static_content.editing_page") %></h1>
|
4
2
|
<%= render "shared/error_messages", :target => @page %>
|
5
3
|
|
6
|
-
<%
|
4
|
+
<% semantic_form_for([:admin, @page]) do |f| -%>
|
7
5
|
<%= render :partial => "form", :locals => { :f => f } %>
|
8
6
|
<p class="form-buttons">
|
9
7
|
<%= button t("actions.update"), nil, 'submit' %>
|
10
|
-
<%= t("or") %> <%= link_to t("actions.cancel"),
|
8
|
+
<%= t("or") %> <%= link_to t("actions.cancel"), admin_pages_path %>
|
11
9
|
</p>
|
12
10
|
<% end %>
|
@@ -1,22 +1,20 @@
|
|
1
|
-
<%= render :partial => 'admin/shared/configuration_menu' %>
|
2
|
-
|
3
1
|
<div class='toolbar'>
|
4
2
|
<ul class='actions'>
|
5
3
|
<li id="new_product_link">
|
6
|
-
<%= button_link_to t("
|
4
|
+
<%= button_link_to t("static_content.new_page"), new_object_url, {:icon => 'add'} %>
|
7
5
|
</li>
|
8
6
|
</ul>
|
9
7
|
<br class='clear' />
|
10
8
|
</div>
|
11
9
|
|
12
|
-
<h1><%=t("
|
10
|
+
<h1><%=t("static_content.static_pages") %></h1>
|
13
11
|
|
14
12
|
<table class="index">
|
15
13
|
<tr>
|
16
|
-
<th><%=
|
17
|
-
<th><%=t("
|
18
|
-
<th><%=
|
19
|
-
<th><%=t("action")%></th>
|
14
|
+
<th><%= Page.human_attribute_name(:title) %></th>
|
15
|
+
<th><%= t("static_content.link") %></th>
|
16
|
+
<th><%= Page.human_attribute_name(:visible) %></th>
|
17
|
+
<th><%= t("action") %></th>
|
20
18
|
</tr>
|
21
19
|
<tbody>
|
22
20
|
<% @pages.each do |page| %>
|
@@ -28,7 +26,7 @@
|
|
28
26
|
<%= link_to page.link, page.link %>
|
29
27
|
</td>
|
30
28
|
<td>
|
31
|
-
<%= page.visible %>
|
29
|
+
<%= icon('tick') if page.visible %>
|
32
30
|
</td>
|
33
31
|
<td>
|
34
32
|
<%= link_to_edit page %>
|
@@ -1,12 +1,10 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
<h1><%= t("ext_static_content_new_page") %></h1>
|
1
|
+
<h1><%= t("static_content.new_page") %></h1>
|
4
2
|
<%= render "shared/error_messages", :target => @page %>
|
5
3
|
|
6
|
-
|
4
|
+
<%= semantic_form_for([:admin, @page]) do |f| %>
|
7
5
|
<%= render :partial => "form", :locals => { :f => f } %>
|
8
6
|
<p class="form-buttons">
|
9
7
|
<%= button t("actions.create"), nil, 'submit' %>
|
10
|
-
<%= t("or") %> <%= link_to t("actions.cancel"),
|
8
|
+
<%= t("or") %> <%= link_to t("actions.cancel"), admin_pages_path %>
|
11
9
|
</p>
|
12
10
|
<% end %>
|
@@ -1,11 +1,5 @@
|
|
1
1
|
<% content_for :head do -%>
|
2
2
|
<meta name="title" content="<%=@page.title%>">
|
3
|
-
<% if @page.attribute_present? :meta_keywords -%>
|
4
|
-
<meta name="keywords" content="<%=@page.meta_keywords%>">
|
5
|
-
<% end -%>
|
6
|
-
<% if @page.attribute_present? :meta_description -%>
|
7
|
-
<meta name="description" content="<%=@page.meta_description%>">
|
8
|
-
<% end -%>
|
9
3
|
<% end -%>
|
10
4
|
<% content_for :sidebar do %>
|
11
5
|
<% if "products" == @current_controller && @taxon %>
|
@@ -15,4 +9,6 @@
|
|
15
9
|
<% end %>
|
16
10
|
<% end %>
|
17
11
|
<h1><%= @page.title %></h1>
|
18
|
-
|
12
|
+
<div id="page_content">
|
13
|
+
<%= raw @page.body %>
|
14
|
+
</div>
|
data/config/locales/de-CH.yml
CHANGED
@@ -1,22 +1,23 @@
|
|
1
1
|
---
|
2
2
|
de-CH:
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
3
|
+
pages: Seiten
|
4
|
+
static_content:
|
5
|
+
static_pages: Statische Seiten
|
6
|
+
static_pages_desc: Manage static page with WYSIWYG editor.
|
7
|
+
title: Titel
|
8
|
+
slug: Slug
|
9
|
+
body: Body
|
10
|
+
new_page: Neue Seite
|
11
|
+
editing_page: Seite bearbeiten
|
12
|
+
foreign_link: Externer Link (URL)
|
13
|
+
show_in_sidebar: In der Sidebar anzeigen
|
14
|
+
show_in_header: Im Header anzeigen
|
15
|
+
show_in_footer: Im Footer anzeigen
|
16
|
+
position: Position
|
17
|
+
visible: Sichtbar
|
18
|
+
confirm_delete: Bist du sicher?
|
19
|
+
link: Link
|
20
|
+
meta_title: Meta-Titel
|
21
|
+
meta_keywords: Meta-Schlüsselwörter
|
22
|
+
meta_description: Meta-Beschreibung
|
23
|
+
layout: Layout
|
data/config/locales/en-AU.yml
CHANGED
@@ -1,22 +1,23 @@
|
|
1
1
|
---
|
2
2
|
en-AU:
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
3
|
+
pages: Pages
|
4
|
+
static_content:
|
5
|
+
static_pages: Static pages
|
6
|
+
static_pages_desc: Manage static page with WYSIWYG editor.
|
7
|
+
title: Title
|
8
|
+
slug: Slug
|
9
|
+
body: Body
|
10
|
+
new_page: New page
|
11
|
+
editing_page: Editing page
|
12
|
+
foreign_link: Foreign link (URL)
|
13
|
+
show_in_sidebar: Show in sidebar
|
14
|
+
show_in_header: Show in header
|
15
|
+
show_in_footer: Show in footer
|
16
|
+
position: Position
|
17
|
+
visible: Visible
|
18
|
+
confirm_delete: Are you sure?
|
19
|
+
link: Link
|
20
|
+
meta_title: Meta Title
|
21
|
+
meta_keywords: Meta Keywords
|
22
|
+
meta_description: Meta Description
|
23
|
+
layout: Layout
|
data/config/locales/en-GB.yml
CHANGED
@@ -1,22 +1,23 @@
|
|
1
1
|
---
|
2
2
|
en-GB:
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
3
|
+
pages: Pages
|
4
|
+
static_content:
|
5
|
+
static_pages: Static pages
|
6
|
+
static_pages_desc: Manage static page with WYSIWYG editor.
|
7
|
+
title: Title
|
8
|
+
slug: Slug
|
9
|
+
body: Body
|
10
|
+
new_page: New page
|
11
|
+
editing_page: Editing page
|
12
|
+
foreign_link: Foreign link (URL)
|
13
|
+
show_in_sidebar: Show in sidebar
|
14
|
+
show_in_header: Show in header
|
15
|
+
show_in_footer: Show in footer
|
16
|
+
position: Position
|
17
|
+
visible: Visible
|
18
|
+
confirm_delete: Are you sure?
|
19
|
+
link: Link
|
20
|
+
meta_title: Meta Title
|
21
|
+
meta_keywords: Meta Keywords
|
22
|
+
meta_description: Meta Description
|
23
|
+
layout: Layout
|
data/config/locales/en.yml
CHANGED
@@ -1,22 +1,32 @@
|
|
1
1
|
---
|
2
2
|
en:
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
3
|
+
activerecord:
|
4
|
+
attributes:
|
5
|
+
page:
|
6
|
+
title: Title
|
7
|
+
slug: Slug
|
8
|
+
body: Body
|
9
|
+
foreign_link: Foreign link (URL)
|
10
|
+
show_in_sidebar: Show in sidebar
|
11
|
+
show_in_header: Show in header
|
12
|
+
show_in_footer: Show in footer
|
13
|
+
position: Position
|
14
|
+
visible: Visible
|
15
|
+
meta_keywords: Meta Keywords
|
16
|
+
meta_description: Meta Description
|
17
|
+
layout: Layout
|
18
|
+
models:
|
19
|
+
page:
|
20
|
+
one: Page
|
21
|
+
many: Pages
|
22
|
+
|
23
|
+
page: Page
|
24
|
+
pages: Pages
|
25
|
+
static_content:
|
26
|
+
static_pages: Static pages
|
27
|
+
static_pages_desc: Manage static page with WYSIWYG editor.
|
28
|
+
new_page: New page
|
29
|
+
editing_page: Editing page
|
30
|
+
confirm_delete: Are you sure ?
|
31
|
+
link: Link
|
32
|
+
meta_title: Meta Title
|
data/config/locales/es-ES.yml
CHANGED
@@ -1,17 +1,18 @@
|
|
1
1
|
---
|
2
2
|
es-ES:
|
3
3
|
pages: Pages
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
4
|
+
static_content:
|
5
|
+
static_pages: Páginas estáticas
|
6
|
+
static_pages_desc: Administrar página estática con el editor WYSIWYG.
|
7
|
+
title: Título
|
8
|
+
slug: Slug
|
9
|
+
body: Cuerpo
|
10
|
+
new_page: Nueva página
|
11
|
+
editing_page: Edición de página
|
12
|
+
foreign_link: Enlace externo (URL)
|
13
|
+
show_in_header: Mostrar en la cabecera
|
14
|
+
show_in_footer: Mostrar en el pié de página
|
15
|
+
position: Posición
|
16
|
+
visible: Visible
|
17
|
+
confirm_delete: ¿ Estás seguro ?
|
18
|
+
link: Enlace
|
data/config/locales/fr-FR.yml
CHANGED
@@ -1,22 +1,23 @@
|
|
1
1
|
---
|
2
2
|
fr-FR:
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
3
|
+
pages: Pages
|
4
|
+
static_content:
|
5
|
+
static_pages: Pages statiques
|
6
|
+
static_pages_desc: "Gérer les pages statiques avec l'éditeur WYSIWYG."
|
7
|
+
title: Titre
|
8
|
+
slug: Slug
|
9
|
+
body: Corps
|
10
|
+
new_page: Nouvelle page
|
11
|
+
editing_page: Edition de la page
|
12
|
+
foreign_link: Lien extérieur (URL)
|
13
|
+
show_in_sidebar: Visible dans la sidebar
|
14
|
+
show_in_header: Visible en entête
|
15
|
+
show_in_footer: Visible en pied de page
|
16
|
+
position: Position
|
17
|
+
visible: Visible
|
18
|
+
confirm_delete: êtes-vous sûr ?
|
19
|
+
link: Lien
|
20
|
+
meta_title: Meta Titre
|
21
|
+
meta_keywords: Meta Mots-clés
|
22
|
+
meta_description: Meta Description
|
23
|
+
layout: Layout
|
data/config/locales/nl-BE.yml
CHANGED
@@ -1,22 +1,23 @@
|
|
1
1
|
---
|
2
2
|
nl-BE:
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
3
|
+
pages: Statische pagina's
|
4
|
+
static_content:
|
5
|
+
static_pages: Statische pagina's
|
6
|
+
static_pages_desc: Beheer statische pagina's met een WYSIWYG editor.
|
7
|
+
title: Titel
|
8
|
+
slug: Slug
|
9
|
+
body: Body
|
10
|
+
new_page: Nieuwe pagina
|
11
|
+
editing_page: Pagina bewerken
|
12
|
+
foreign_link: Externe link (URL)
|
13
|
+
show_in_header: Toon in header
|
14
|
+
show_in_footer: Toon in footer
|
15
|
+
position: Positie
|
16
|
+
visible: Zichtbaar?
|
17
|
+
confirm_delete: Weet u zeker dat u deze pagina wilt verwijderen ?
|
18
|
+
link: Link
|
19
|
+
meta_title: Meta Titel
|
20
|
+
meta_keywords: Meta Keywords
|
21
|
+
meta_description: Meta Description
|
22
|
+
layout: Layout
|
23
|
+
show_in_sidebar: Toon in zijbalk?
|
data/config/locales/nl-NL.yml
CHANGED
@@ -1,22 +1,23 @@
|
|
1
1
|
---
|
2
2
|
nl-NL:
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
3
|
+
pages: Statische pagina's
|
4
|
+
static_content:
|
5
|
+
static_pages: Statische pagina's
|
6
|
+
static_pages_desc: Beheer statische pagina's met een WYSIWYG editor.
|
7
|
+
title: Titel
|
8
|
+
slug: Slug
|
9
|
+
body: Body
|
10
|
+
new_page: Nieuwe pagina
|
11
|
+
editing_page: Pagina bewerken
|
12
|
+
foreign_link: Externe link (URL)
|
13
|
+
show_in_header: Toon in header
|
14
|
+
show_in_footer: Toon in footer
|
15
|
+
position: Positie
|
16
|
+
visible: Zichtbaar?
|
17
|
+
confirm_delete: Weet u zeker dat u deze pagina wilt verwijderen ?
|
18
|
+
link: Link
|
19
|
+
meta_title: Meta Titel
|
20
|
+
meta_keywords: Meta Keywords
|
21
|
+
meta_description: Meta Description
|
22
|
+
layout: Layout
|
23
|
+
show_in_sidebar: Toon in zijbalk?
|
data/config/locales/pl.yml
CHANGED
@@ -1,20 +1,21 @@
|
|
1
1
|
---
|
2
2
|
pl:
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
3
|
+
pages: Strony statyczne
|
4
|
+
static_content:
|
5
|
+
static_pages: Strony statyczne
|
6
|
+
static_pages_desc: Zarządzaj stronami statycznymi.
|
7
|
+
title: Tytuł
|
8
|
+
slug: Skrót
|
9
|
+
body: Zawartość
|
10
|
+
new_page: Nowa strona
|
11
|
+
editing_page: Edycja strony
|
12
|
+
foreign_link: Odnośnik zewnętrzny
|
13
|
+
show_in_header: Pokaż w nagłówku
|
14
|
+
show_in_footer: Pokaż w stopce
|
15
|
+
position: Pozycja
|
16
|
+
visible: Widoczna
|
17
|
+
confirm_delete: Jesteś pewien ?
|
18
|
+
link: Odnośnik
|
19
|
+
meta_title: Tytół (w nagłówku przeglądarki)
|
20
|
+
meta_keywords: Słowa kluczowe (SEO)
|
21
|
+
meta_description: Skrócony opis (SEO)
|
data/config/locales/pt-BR.yml
CHANGED
@@ -1,14 +1,15 @@
|
|
1
1
|
---
|
2
2
|
pt-BR:
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
3
|
+
pages: Páginas
|
4
|
+
static_content:
|
5
|
+
static_pages: Páginas estáticas
|
6
|
+
static_pages_desc: Administrar página estática com editor visual (WYSIWYG).
|
7
|
+
title: Título
|
8
|
+
slug: Slug
|
9
|
+
body: Corpo
|
10
|
+
new_page: Nova página
|
11
|
+
editing_page: Editando página
|
12
|
+
foreign_link: Link externo (URL)
|
13
|
+
show_in_header: Mostrar no cabeçalho
|
14
|
+
show_in_footer: Mostrar no rodapé
|
15
|
+
position: Posição
|
data/config/locales/ru.yml
CHANGED
@@ -1,22 +1,33 @@
|
|
1
1
|
---
|
2
2
|
ru:
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
3
|
+
activerecord:
|
4
|
+
attributes:
|
5
|
+
page:
|
6
|
+
title: Заголовок
|
7
|
+
slug: Постоянная ссылка
|
8
|
+
body: Основной текст
|
9
|
+
foreign_link: "Внешняя ссылка (URL)"
|
10
|
+
show_in_header: "Отображать в верхнем меню"
|
11
|
+
show_in_footer: "Отображать в нижнем меню"
|
12
|
+
show_in_sidebar: "Отображать в боковом меню"
|
13
|
+
position: "Позиция в меню"
|
14
|
+
visible: "Публиковать"
|
15
|
+
meta_keywords: "Ключевые слова"
|
16
|
+
meta_description: "Описание"
|
17
|
+
layout: "Макет"
|
18
|
+
models:
|
19
|
+
page:
|
20
|
+
one: Страница
|
21
|
+
few: Страницы
|
22
|
+
many: Страниц
|
23
|
+
|
24
|
+
page: "Страница"
|
25
|
+
pages: "Страницы"
|
26
|
+
static_content:
|
27
|
+
static_pages: "Статические страницы"
|
28
|
+
static_pages_desc: "Управление статическими страницами"
|
29
|
+
new_page: "Новая страница"
|
30
|
+
editing_page: "Редактирование страницы"
|
31
|
+
confirm_delete: "Вы уверены, что хотите удалить страницу?"
|
32
|
+
link: "Ссылка"
|
33
|
+
meta_title: "Мета заголовок"
|
@@ -0,0 +1,145 @@
|
|
1
|
+
/* -------------------------------------------------------------------------------------------------
|
2
|
+
|
3
|
+
It's *strongly* suggested that you don't modify this file. Instead, load a new stylesheet after
|
4
|
+
this one in your layouts (eg formtastic_changes.css) and override the styles to suit your needs.
|
5
|
+
This will allow you to update formtastic.css with new releases without clobbering your own changes.
|
6
|
+
|
7
|
+
This stylesheet forms part of the Formtastic Rails Plugin
|
8
|
+
(c) 2008 Justin French
|
9
|
+
|
10
|
+
--------------------------------------------------------------------------------------------------*/
|
11
|
+
|
12
|
+
|
13
|
+
/* NORMALIZE AND RESET - obviously inspired by Yahoo's reset.css, but scoped to just form.formtastic
|
14
|
+
--------------------------------------------------------------------------------------------------*/
|
15
|
+
form.formtastic, form.formtastic ul, form.formtastic ol, form.formtastic li, form.formtastic fieldset, form.formtastic legend, form.formtastic input, form.formtastic textarea, form.formtastic select, form.formtastic p { margin:0; padding:0; }
|
16
|
+
form.formtastic fieldset { border:0; }
|
17
|
+
form.formtastic em, form.formtastic strong { font-style:normal; font-weight:normal; }
|
18
|
+
form.formtastic ol, form.formtastic ul { list-style:none; }
|
19
|
+
form.formtastic abbr, form.formtastic acronym { border:0; font-variant:normal; }
|
20
|
+
form.formtastic input, form.formtastic textarea, form.formtastic select { font-family:inherit; font-size:inherit; font-weight:inherit; }
|
21
|
+
form.formtastic input, form.formtastic textarea, form.formtastic select { font-size:100%; }
|
22
|
+
form.formtastic legend { white-space:normal; color:#000; }
|
23
|
+
|
24
|
+
|
25
|
+
/* SEMANTIC ERRORS
|
26
|
+
--------------------------------------------------------------------------------------------------*/
|
27
|
+
form.formtastic ul.errors { color:#cc0000; margin:0.5em 0 1.5em 25%; list-style:square; }
|
28
|
+
form.formtastic ul.errors li { padding:0; border:none; display:list-item; }
|
29
|
+
|
30
|
+
|
31
|
+
/* FIELDSETS & LISTS
|
32
|
+
--------------------------------------------------------------------------------------------------*/
|
33
|
+
form.formtastic fieldset { overflow:auto; } /* clearing contained floats */
|
34
|
+
form.formtastic fieldset.inputs { }
|
35
|
+
form.formtastic fieldset.buttons { padding-left:25%; }
|
36
|
+
form.formtastic fieldset ol { }
|
37
|
+
form.formtastic fieldset.buttons li { float:left; padding-right:0.5em; }
|
38
|
+
|
39
|
+
/* INPUT LIs
|
40
|
+
--------------------------------------------------------------------------------------------------*/
|
41
|
+
form.formtastic fieldset > ol > li { padding:0.5em 0; margin-top:-0.5em; margin-bottom:1em; } /* padding and negative margin juggling is for Firefox */
|
42
|
+
form.formtastic fieldset > ol > li { overflow:auto; } /* clearing contained floats */
|
43
|
+
|
44
|
+
form.formtastic fieldset > ol > li.required { }
|
45
|
+
form.formtastic fieldset > ol > li.optional { }
|
46
|
+
form.formtastic fieldset > ol > li.error { }
|
47
|
+
|
48
|
+
|
49
|
+
/* LABELS
|
50
|
+
--------------------------------------------------------------------------------------------------*/
|
51
|
+
form.formtastic fieldset > ol > li label { display:block; width:25%; float:left; padding-top:.2em; }
|
52
|
+
form.formtastic fieldset > ol > li > li label { line-height:100%; padding-top:0; }
|
53
|
+
form.formtastic fieldset > ol > li > li label input { line-height:100%; vertical-align:middle; margin-top:-0.1em;}
|
54
|
+
|
55
|
+
|
56
|
+
/* NESTED FIELDSETS AND LEGENDS (radio, check boxes and date/time inputs use nested fieldsets)
|
57
|
+
--------------------------------------------------------------------------------------------------*/
|
58
|
+
form.formtastic fieldset > ol > li fieldset { position:relative; }
|
59
|
+
form.formtastic fieldset > ol > li fieldset legend { position:absolute; width:95%; padding-top:0.1em; left: 0px; }
|
60
|
+
form.formtastic fieldset > ol > li fieldset legend span { position:absolute; }
|
61
|
+
form.formtastic fieldset > ol > li fieldset legend.label label { position:absolute; }
|
62
|
+
form.formtastic fieldset > ol > li fieldset ol { float:left; width:74%; margin:0; padding:0 0 0 25%; }
|
63
|
+
form.formtastic fieldset > ol > li fieldset ol li { padding:0; border:0; }
|
64
|
+
|
65
|
+
|
66
|
+
/* INLINE HINTS
|
67
|
+
--------------------------------------------------------------------------------------------------*/
|
68
|
+
form.formtastic fieldset > ol > li p.inline-hints { color:#666; margin:0.5em 0 0 25%; }
|
69
|
+
|
70
|
+
|
71
|
+
/* INLINE ERRORS
|
72
|
+
--------------------------------------------------------------------------------------------------*/
|
73
|
+
form.formtastic fieldset > ol > li p.inline-errors { color:#cc0000; margin:0.5em 0 0 25%; }
|
74
|
+
form.formtastic fieldset > ol > li ul.errors { color:#cc0000; margin:0.5em 0 0 25%; list-style:square; }
|
75
|
+
form.formtastic fieldset > ol > li ul.errors li { padding:0; border:none; display:list-item; }
|
76
|
+
|
77
|
+
|
78
|
+
/* STRING, NUMERIC, PASSWORD, EMAIL, URL, PHONE & SEARCH OVERRIDES
|
79
|
+
--------------------------------------------------------------------------------------------------*/
|
80
|
+
form.formtastic fieldset > ol > li.string input,
|
81
|
+
form.formtastic fieldset > ol > li.password input,
|
82
|
+
form.formtastic fieldset > ol > li.numeric input,
|
83
|
+
form.formtastic fieldset > ol > li.email input,
|
84
|
+
form.formtastic fieldset > ol > li.url input,
|
85
|
+
form.formtastic fieldset > ol > li.phone input,
|
86
|
+
form.formtastic fieldset > ol > li.search input { width:72%; }
|
87
|
+
|
88
|
+
form.formtastic fieldset > ol > li.string input[size],
|
89
|
+
form.formtastic fieldset > ol > li.password input[size],
|
90
|
+
form.formtastic fieldset > ol > li.numeric input[size],
|
91
|
+
form.formtastic fieldset > ol > li.email input[size],
|
92
|
+
form.formtastic fieldset > ol > li.url input[size],
|
93
|
+
form.formtastic fieldset > ol > li.phone input[size],
|
94
|
+
form.formtastic fieldset > ol > li.search input[size] { width:auto; max-width:72%; }
|
95
|
+
|
96
|
+
|
97
|
+
/* TEXTAREA OVERRIDES
|
98
|
+
--------------------------------------------------------------------------------------------------*/
|
99
|
+
form.formtastic fieldset > ol > li.text textarea { width:72%; }
|
100
|
+
form.formtastic fieldset > ol > li.text textarea[cols] { width:auto; max-width:72%; }
|
101
|
+
|
102
|
+
|
103
|
+
/* HIDDEN OVERRIDES
|
104
|
+
--------------------------------------------------------------------------------------------------*/
|
105
|
+
form.formtastic fieldset ol li.hidden { display:none; }
|
106
|
+
|
107
|
+
/* BOOLEAN OVERRIDES
|
108
|
+
--------------------------------------------------------------------------------------------------*/
|
109
|
+
form.formtastic fieldset > ol > li.boolean label { padding-left:25%; width:auto; }
|
110
|
+
form.formtastic fieldset > ol > li.boolean label input { margin:0 0.5em 0 0.2em; }
|
111
|
+
|
112
|
+
|
113
|
+
/* RADIO OVERRIDES
|
114
|
+
--------------------------------------------------------------------------------------------------*/
|
115
|
+
form.formtastic fieldset > ol > li.radio { }
|
116
|
+
form.formtastic fieldset > ol > li.radio fieldset { overflow:visible; }
|
117
|
+
form.formtastic fieldset > ol > li.radio fieldset ol { margin-bottom:-0.5em; }
|
118
|
+
form.formtastic fieldset > ol > li.radio fieldset ol li { margin:0.1em 0 0.5em 0; overflow:visible; }
|
119
|
+
form.formtastic fieldset > ol > li.radio fieldset ol li label { float:none; width:100%; }
|
120
|
+
form.formtastic fieldset > ol > li.radio fieldset ol li label input { margin-right:0.2em; }
|
121
|
+
|
122
|
+
|
123
|
+
/* CHECK BOXES (COLLECTION) OVERRIDES
|
124
|
+
--------------------------------------------------------------------------------------------------*/
|
125
|
+
form.formtastic fieldset > ol > li.check_boxes { }
|
126
|
+
form.formtastic fieldset > ol > li.check_boxes fieldset { overflow:visible; }
|
127
|
+
form.formtastic fieldset > ol > li.check_boxes fieldset ol { margin-bottom:-0.5em; }
|
128
|
+
form.formtastic fieldset > ol > li.check_boxes fieldset ol li { margin:0.1em 0 0.5em 0; overflow:visible; }
|
129
|
+
form.formtastic fieldset > ol > li.check_boxes fieldset ol li label { float:none; width:100%; }
|
130
|
+
form.formtastic fieldset > ol > li.check_boxes fieldset ol li label input { margin-right:0.2em; }
|
131
|
+
|
132
|
+
|
133
|
+
/* DATE & TIME OVERRIDES
|
134
|
+
--------------------------------------------------------------------------------------------------*/
|
135
|
+
form.formtastic fieldset > ol > li.date fieldset ol li,
|
136
|
+
form.formtastic fieldset > ol > li.time fieldset ol li,
|
137
|
+
form.formtastic fieldset > ol > li.datetime fieldset ol li { float:left; width:auto; margin:0 .3em 0 0; }
|
138
|
+
|
139
|
+
form.formtastic fieldset > ol > li.date fieldset ol li label,
|
140
|
+
form.formtastic fieldset > ol > li.time fieldset ol li label,
|
141
|
+
form.formtastic fieldset > ol > li.datetime fieldset ol li label { display:none; }
|
142
|
+
|
143
|
+
form.formtastic fieldset > ol > li.date fieldset ol li label input,
|
144
|
+
form.formtastic fieldset > ol > li.time fieldset ol li label input,
|
145
|
+
form.formtastic fieldset > ol > li.datetime fieldset ol li label input { display:inline; margin:0; padding:0; }
|
@@ -0,0 +1,14 @@
|
|
1
|
+
form.formtastic fieldset > ol > li label { float: none; width: auto; }
|
2
|
+
form.formtastic fieldset > ol > li.boolean label { padding-left: 0; }
|
3
|
+
form.formtastic input[type=text] { padding: 5px; }
|
4
|
+
form.formtastic .numeric input[type=text] { width: 5em; }
|
5
|
+
form.formtastic fieldset > ol > li p.inline-errors { margin-left: 0 }
|
6
|
+
form.formtastic .required label { color: black; }
|
7
|
+
form.formtastic .required label abbr { color: red; padding-left: 3px; }
|
8
|
+
form.formtastic li.error {
|
9
|
+
background-color: #FDE4E4;
|
10
|
+
background-image: url(/images/admin/bg/red-stripes.png);
|
11
|
+
}
|
12
|
+
form.formtastic fieldset > ol > li {
|
13
|
+
padding-left: 1em;
|
14
|
+
}
|
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{spree_static_content}
|
8
|
-
s.version = "0.
|
8
|
+
s.version = "0.60.0"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Peter Berkenbosch", "Roman Smirnov"]
|
12
|
-
s.date = %q{2011-
|
12
|
+
s.date = %q{2011-06-24}
|
13
13
|
s.description = %q{Extention to manage the static pages for your Spree shop.}
|
14
14
|
s.extra_rdoc_files = [
|
15
15
|
"README.rdoc"
|
@@ -51,6 +51,8 @@ Gem::Specification.new do |s|
|
|
51
51
|
"lib/generators/templates/db/migrate/20091219021134_add_meta_fields_to_pages.rb",
|
52
52
|
"lib/generators/templates/db/migrate/20100204105222_add_layout_to_pages.rb",
|
53
53
|
"lib/generators/templates/db/migrate/20100323085528_add_show_in_sidebar_option_to_pages.rb",
|
54
|
+
"lib/generators/templates/public/stylesheets/formtastic.css",
|
55
|
+
"lib/generators/templates/public/stylesheets/formtastic_changes.css",
|
54
56
|
"lib/spree_static_content.rb",
|
55
57
|
"lib/spree_static_content_hooks.rb",
|
56
58
|
"spec/controllers/admin/pages_controller_spec.rb",
|
@@ -77,15 +79,18 @@ Gem::Specification.new do |s|
|
|
77
79
|
s.specification_version = 3
|
78
80
|
|
79
81
|
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
|
80
|
-
s.add_runtime_dependency(%q<spree_core>, [">= 0.
|
82
|
+
s.add_runtime_dependency(%q<spree_core>, [">= 0.60.0"])
|
81
83
|
s.add_runtime_dependency(%q<spree_editor>, [">= 0"])
|
84
|
+
s.add_runtime_dependency(%q<formtastic>, ["= 1.2.3"])
|
82
85
|
else
|
83
|
-
s.add_dependency(%q<spree_core>, [">= 0.
|
86
|
+
s.add_dependency(%q<spree_core>, [">= 0.60.0"])
|
84
87
|
s.add_dependency(%q<spree_editor>, [">= 0"])
|
88
|
+
s.add_dependency(%q<formtastic>, ["= 1.2.3"])
|
85
89
|
end
|
86
90
|
else
|
87
|
-
s.add_dependency(%q<spree_core>, [">= 0.
|
91
|
+
s.add_dependency(%q<spree_core>, [">= 0.60.0"])
|
88
92
|
s.add_dependency(%q<spree_editor>, [">= 0"])
|
93
|
+
s.add_dependency(%q<formtastic>, ["= 1.2.3"])
|
89
94
|
end
|
90
95
|
end
|
91
96
|
|
metadata
CHANGED
@@ -4,9 +4,9 @@ version: !ruby/object:Gem::Version
|
|
4
4
|
prerelease: false
|
5
5
|
segments:
|
6
6
|
- 0
|
7
|
-
-
|
8
|
-
-
|
9
|
-
version: 0.
|
7
|
+
- 60
|
8
|
+
- 0
|
9
|
+
version: 0.60.0
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Peter Berkenbosch
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-
|
18
|
+
date: 2011-06-24 00:00:00 +04:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
@@ -27,9 +27,9 @@ dependencies:
|
|
27
27
|
- !ruby/object:Gem::Version
|
28
28
|
segments:
|
29
29
|
- 0
|
30
|
-
-
|
30
|
+
- 60
|
31
31
|
- 0
|
32
|
-
version: 0.
|
32
|
+
version: 0.60.0
|
33
33
|
type: :runtime
|
34
34
|
version_requirements: *id001
|
35
35
|
- !ruby/object:Gem::Dependency
|
@@ -44,6 +44,20 @@ dependencies:
|
|
44
44
|
version: "0"
|
45
45
|
type: :runtime
|
46
46
|
version_requirements: *id002
|
47
|
+
- !ruby/object:Gem::Dependency
|
48
|
+
name: formtastic
|
49
|
+
prerelease: false
|
50
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
segments:
|
55
|
+
- 1
|
56
|
+
- 2
|
57
|
+
- 3
|
58
|
+
version: 1.2.3
|
59
|
+
type: :runtime
|
60
|
+
version_requirements: *id003
|
47
61
|
description: Extention to manage the static pages for your Spree shop.
|
48
62
|
email:
|
49
63
|
executables: []
|
@@ -89,6 +103,8 @@ files:
|
|
89
103
|
- lib/generators/templates/db/migrate/20091219021134_add_meta_fields_to_pages.rb
|
90
104
|
- lib/generators/templates/db/migrate/20100204105222_add_layout_to_pages.rb
|
91
105
|
- lib/generators/templates/db/migrate/20100323085528_add_show_in_sidebar_option_to_pages.rb
|
106
|
+
- lib/generators/templates/public/stylesheets/formtastic.css
|
107
|
+
- lib/generators/templates/public/stylesheets/formtastic_changes.css
|
92
108
|
- lib/spree_static_content.rb
|
93
109
|
- lib/spree_static_content_hooks.rb
|
94
110
|
- spec/controllers/admin/pages_controller_spec.rb
|