fullstack-cms 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/app/models/link.rb +2 -0
- data/app/models/menu.rb +2 -1
- data/app/views/admin/menus/_form.html.erb +19 -28
- data/{locales → config/locales}/en.yml +0 -0
- data/config/locales/it.yml +9 -0
- data/fullstack-cms.gemspec +5 -5
- data/lib/generators/fullstack/cms/install_generator.rb +0 -14
- data/lib/generators/fullstack/cms/templates/rails/app/controllers/site/site_controller.rb +1 -1
- metadata +5 -5
- data/locales/it.yml +0 -30
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.4
|
data/app/models/link.rb
CHANGED
data/app/models/menu.rb
CHANGED
@@ -3,8 +3,9 @@ class Menu < ActiveRecord::Base
|
|
3
3
|
field :uid, :string
|
4
4
|
field :name, :string
|
5
5
|
|
6
|
-
attr_accessible :uid, :name
|
6
|
+
attr_accessible :uid, :name, :links_attributes
|
7
7
|
has_many :links, :as => :link_owner, :dependent => :delete_all, :order=>'position ASC'
|
8
|
+
accepts_nested_attributes_for :links, :allow_destroy => true
|
8
9
|
|
9
10
|
validates_presence_of :name
|
10
11
|
validates_presence_of :uid
|
@@ -1,34 +1,25 @@
|
|
1
|
-
<%=
|
2
|
-
|
1
|
+
<%= admin_form_for [:"admin", current_resource], :html => {:multipart => true} do |f| -%>
|
2
|
+
|
3
|
+
<%= f.errors %>
|
3
4
|
|
5
|
+
<%= f.inputs do %>
|
6
|
+
<%= f.resource_inputs %>
|
7
|
+
<% end -%>
|
4
8
|
|
5
|
-
<%=
|
6
|
-
|
7
|
-
|
9
|
+
<%= render :partial => "associated_resources_table", :locals => {
|
10
|
+
:resource => current_resource,
|
11
|
+
:resource_name => resource_name,
|
12
|
+
:association => :links,
|
13
|
+
:f => f
|
8
14
|
|
9
|
-
|
10
|
-
<%= f.input :name %>
|
11
|
-
<%= f.input :uid %>
|
12
|
-
<% end -%>
|
15
|
+
} %>
|
13
16
|
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
+
<%= f.actions do %>
|
18
|
+
<%= f.resource_submit %>
|
19
|
+
<% end %>
|
17
20
|
|
21
|
+
<% end -%>
|
18
22
|
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
<%= t.pane _("Links") do %>
|
23
|
-
|
24
|
-
<% if !current_resource.persisted? %>
|
25
|
-
<div class="alert">
|
26
|
-
<button class="close" data-dismiss="alert">×</button>
|
27
|
-
<%= _("You should save the menu to start adding links") %>
|
28
|
-
</div>
|
29
|
-
<% else %>
|
30
|
-
<%= render :partial => "admin/links/links", :locals => {:link_owner => current_resource} %>
|
31
|
-
<% end %>
|
32
|
-
|
33
|
-
<% end %>
|
34
|
-
<% end %>
|
23
|
+
|
24
|
+
|
25
|
+
|
File without changes
|
data/fullstack-cms.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "fullstack-cms"
|
8
|
-
s.version = "0.1.
|
8
|
+
s.version = "0.1.4"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["mcasimir"]
|
12
|
-
s.date = "2012-08-
|
12
|
+
s.date = "2012-08-17"
|
13
13
|
s.description = "CMS system built on fullstack"
|
14
14
|
s.email = "maurizio.cas@gmail.com"
|
15
15
|
s.extra_rdoc_files = [
|
@@ -57,6 +57,8 @@ Gem::Specification.new do |s|
|
|
57
57
|
"app/views/admin/pages/_form.html.erb",
|
58
58
|
"app/views/admin/settings/_form.html.erb",
|
59
59
|
"app/views/admin/settings/_index.html.erb",
|
60
|
+
"config/locales/en.yml",
|
61
|
+
"config/locales/it.yml",
|
60
62
|
"config/routes.rb",
|
61
63
|
"fullstack-cms.gemspec",
|
62
64
|
"lib/fullstack-cms.rb",
|
@@ -101,9 +103,7 @@ Gem::Specification.new do |s|
|
|
101
103
|
"lib/generators/fullstack/cms/templates/rails/public/img/.gitignore",
|
102
104
|
"lib/generators/fullstack/cms/templates/rails/public/img/glyphicons-halflings.png",
|
103
105
|
"lib/generators/fullstack/cms/templates/rails/public/js/modernizr-2.5.3.min.js",
|
104
|
-
"lib/generators/fullstack/cms/templates/rails/public/robots.txt"
|
105
|
-
"locales/en.yml",
|
106
|
-
"locales/it.yml"
|
106
|
+
"lib/generators/fullstack/cms/templates/rails/public/robots.txt"
|
107
107
|
]
|
108
108
|
s.homepage = "http://github.com/mcasimir/kaminari-bootstrap"
|
109
109
|
s.licenses = ["MIT"]
|
@@ -64,20 +64,6 @@ eos
|
|
64
64
|
generate "migration:from link menu page_part page redirect setting"
|
65
65
|
end
|
66
66
|
|
67
|
-
def append_to_menu
|
68
|
-
placeholder_text = "FULLSTACK_PLACEHOLDER"
|
69
|
-
|
70
|
-
%w(page menu setting).each do |res|
|
71
|
-
|
72
|
-
|
73
|
-
gsub_file(Rails.root.join('app', 'views', "admin", "shared", "_nav.html.erb"), /\<\!-- #{placeholder_text} --\>\n/) do
|
74
|
-
<<-str
|
75
|
-
<%= nav_item t('active_record.models.#{res.pluralize}', :default => "#{res.pluralize.humanize}"), admin_#{res.pluralize}_path %>
|
76
|
-
<!-- #{placeholder_text} -->
|
77
|
-
|
78
|
-
str
|
79
|
-
end
|
80
|
-
|
81
67
|
|
82
68
|
end
|
83
69
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fullstack-cms
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-08-
|
12
|
+
date: 2012-08-17 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: fullstack
|
@@ -235,6 +235,8 @@ files:
|
|
235
235
|
- app/views/admin/pages/_form.html.erb
|
236
236
|
- app/views/admin/settings/_form.html.erb
|
237
237
|
- app/views/admin/settings/_index.html.erb
|
238
|
+
- config/locales/en.yml
|
239
|
+
- config/locales/it.yml
|
238
240
|
- config/routes.rb
|
239
241
|
- fullstack-cms.gemspec
|
240
242
|
- lib/fullstack-cms.rb
|
@@ -280,8 +282,6 @@ files:
|
|
280
282
|
- lib/generators/fullstack/cms/templates/rails/public/img/glyphicons-halflings.png
|
281
283
|
- lib/generators/fullstack/cms/templates/rails/public/js/modernizr-2.5.3.min.js
|
282
284
|
- lib/generators/fullstack/cms/templates/rails/public/robots.txt
|
283
|
-
- locales/en.yml
|
284
|
-
- locales/it.yml
|
285
285
|
homepage: http://github.com/mcasimir/kaminari-bootstrap
|
286
286
|
licenses:
|
287
287
|
- MIT
|
@@ -297,7 +297,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
297
297
|
version: '0'
|
298
298
|
segments:
|
299
299
|
- 0
|
300
|
-
hash:
|
300
|
+
hash: -1571725266931374814
|
301
301
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
302
302
|
none: false
|
303
303
|
requirements:
|
data/locales/it.yml
DELETED
@@ -1,30 +0,0 @@
|
|
1
|
-
it:
|
2
|
-
fullstack:
|
3
|
-
admin:
|
4
|
-
homepage: "Homepage"
|
5
|
-
account: "Account"
|
6
|
-
dashboard: "Dashboard"
|
7
|
-
logout: "Logout"
|
8
|
-
new: "Crea"
|
9
|
-
show: "Visualizza"
|
10
|
-
edit: "Modifica"
|
11
|
-
delete: "Elimina"
|
12
|
-
filter: "Filtra"
|
13
|
-
create: "Crea"
|
14
|
-
actions: "Azioni"
|
15
|
-
|
16
|
-
are_you_sure: "Sei sicuro?"
|
17
|
-
|
18
|
-
form:
|
19
|
-
correct_these_errors_and_retry: "Correggi questi errori e riprova"
|
20
|
-
|
21
|
-
flash:
|
22
|
-
success:
|
23
|
-
generic: "Cambiamenti salvati con successo"
|
24
|
-
update: "Documento salvato con successo"
|
25
|
-
delete: "Document eliminato con successo"
|
26
|
-
|
27
|
-
error:
|
28
|
-
generic: "Cambiamenti non salvati a causa di un errore"
|
29
|
-
update: "Documento non salvato a causa di un errore"
|
30
|
-
delete: "Documento non eliminato a causa di un errore"
|