fullstack-cms 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +17 -0
- data/Gemfile.lock +289 -0
- data/README.md +28 -0
- data/Rakefile +53 -0
- data/VERSION +1 -0
- data/app/controllers/links_controller.rb +59 -0
- data/app/controllers/menus_controller.rb +40 -0
- data/app/controllers/page_parts_controller.rb +16 -0
- data/app/controllers/pages_controller.rb +21 -0
- data/app/controllers/posts_controller.rb +39 -0
- data/app/controllers/settings_controller.rb +39 -0
- data/app/controllers/tags_controller.rb +22 -0
- data/app/controllers/users_controller.rb +39 -0
- data/app/helpers/menus_helper.rb +42 -0
- data/app/helpers/pages_helper.rb +14 -0
- data/app/helpers/settings_helper.rb +7 -0
- data/app/models/.gitkeep +0 -0
- data/app/models/link.rb +17 -0
- data/app/models/menu.rb +19 -0
- data/app/models/page.rb +16 -0
- data/app/models/page_part.rb +6 -0
- data/app/models/redirect.rb +4 -0
- data/app/models/setting.rb +64 -0
- data/app/views/admin/links/_filter.html.erb +14 -0
- data/app/views/admin/links/_form.html.erb +24 -0
- data/app/views/admin/links/_index.html.erb +9 -0
- data/app/views/admin/links/_links.html.erb +128 -0
- data/app/views/admin/links/_table_row.html.erb +9 -0
- data/app/views/admin/links/create.js.erb +12 -0
- data/app/views/admin/links/sort.js.coffee +6 -0
- data/app/views/admin/links/update.js.coffee +6 -0
- data/app/views/admin/menus/_filter.html.erb +12 -0
- data/app/views/admin/menus/_form.html.erb +34 -0
- data/app/views/admin/menus/_index.html.erb +9 -0
- data/app/views/admin/page_parts/_tabs.html.erb +21 -0
- data/app/views/admin/page_parts/destroy.js.coffee +12 -0
- data/app/views/admin/pages/_collection.html.erb +7 -0
- data/app/views/admin/pages/_form.html.erb +54 -0
- data/app/views/admin/settings/_filter.html.erb +10 -0
- data/app/views/admin/settings/_form.html.erb +25 -0
- data/app/views/admin/settings/_index.html.erb +8 -0
- data/fullstack-cms.gemspec +189 -0
- data/lib/fullstack-cms.rb +1 -0
- data/lib/fullstack/cms.rb +41 -0
- data/lib/fullstack/cms/engine.rb +9 -0
- data/lib/generators/fullstack/cms/install_generator.rb +88 -0
- data/lib/generators/fullstack/cms/locale_generator.rb +11 -0
- data/lib/generators/fullstack/cms/templates/rails/README.md +40 -0
- data/lib/generators/fullstack/cms/templates/rails/app/controllers/site/site_controller.rb +10 -0
- data/lib/generators/fullstack/cms/templates/rails/app/views/admin/attachments/_attachments.html.erb +49 -0
- data/lib/generators/fullstack/cms/templates/rails/app/views/admin/attachments/create.js.coffee +14 -0
- data/lib/generators/fullstack/cms/templates/rails/app/views/admin/base/destroy.js.coffee +7 -0
- data/lib/generators/fullstack/cms/templates/rails/app/views/admin/base/edit.html.erb +8 -0
- data/lib/generators/fullstack/cms/templates/rails/app/views/admin/base/index.html.erb +54 -0
- data/lib/generators/fullstack/cms/templates/rails/app/views/admin/base/new.html.erb +8 -0
- data/lib/generators/fullstack/cms/templates/rails/app/views/admin/base/update.js.coffee +5 -0
- data/lib/generators/fullstack/cms/templates/rails/app/views/admin/dashboard/show.html.erb +0 -0
- data/lib/generators/fullstack/cms/templates/rails/app/views/admin/links/_filter.html.erb +14 -0
- data/lib/generators/fullstack/cms/templates/rails/app/views/admin/links/_form.html.erb +24 -0
- data/lib/generators/fullstack/cms/templates/rails/app/views/admin/links/_index.html.erb +9 -0
- data/lib/generators/fullstack/cms/templates/rails/app/views/admin/links/_links.html.erb +128 -0
- data/lib/generators/fullstack/cms/templates/rails/app/views/admin/links/_table_row.html.erb +9 -0
- data/lib/generators/fullstack/cms/templates/rails/app/views/admin/links/create.js.erb +12 -0
- data/lib/generators/fullstack/cms/templates/rails/app/views/admin/links/sort.js.coffee +6 -0
- data/lib/generators/fullstack/cms/templates/rails/app/views/admin/links/update.js.coffee +6 -0
- data/lib/generators/fullstack/cms/templates/rails/app/views/admin/menus/_filter.html.erb +12 -0
- data/lib/generators/fullstack/cms/templates/rails/app/views/admin/menus/_form.html.erb +34 -0
- data/lib/generators/fullstack/cms/templates/rails/app/views/admin/menus/_index.html.erb +9 -0
- data/lib/generators/fullstack/cms/templates/rails/app/views/admin/page_parts/_tabs.html.erb +21 -0
- data/lib/generators/fullstack/cms/templates/rails/app/views/admin/page_parts/destroy.js.coffee +12 -0
- data/lib/generators/fullstack/cms/templates/rails/app/views/admin/pages/_filter.html.erb +12 -0
- data/lib/generators/fullstack/cms/templates/rails/app/views/admin/pages/_form.html.erb +50 -0
- data/lib/generators/fullstack/cms/templates/rails/app/views/admin/pages/_index.html.erb +14 -0
- data/lib/generators/fullstack/cms/templates/rails/app/views/admin/photogalleries/_filter.html.erb +14 -0
- data/lib/generators/fullstack/cms/templates/rails/app/views/admin/photogalleries/_form.html.erb +26 -0
- data/lib/generators/fullstack/cms/templates/rails/app/views/admin/photogalleries/_index.html.erb +9 -0
- data/lib/generators/fullstack/cms/templates/rails/app/views/admin/settings/_filter.html.erb +10 -0
- data/lib/generators/fullstack/cms/templates/rails/app/views/admin/settings/_form.html.erb +25 -0
- data/lib/generators/fullstack/cms/templates/rails/app/views/admin/settings/_index.html.erb +8 -0
- data/lib/generators/fullstack/cms/templates/rails/app/views/admin/shared/_nav.html.erb +38 -0
- data/lib/generators/fullstack/cms/templates/rails/app/views/admin/users/_filter.html.erb +12 -0
- data/lib/generators/fullstack/cms/templates/rails/app/views/admin/users/_form.html.erb +53 -0
- data/lib/generators/fullstack/cms/templates/rails/app/views/admin/users/_index.html.erb +18 -0
- data/lib/generators/fullstack/cms/templates/rails/app/views/layouts/admin.html.erb +80 -0
- data/lib/generators/fullstack/cms/templates/rails/app/views/layouts/application.html.erb +28 -0
- data/lib/generators/fullstack/cms/templates/rails/app/views/layouts/email.html.erb +167 -0
- data/lib/generators/fullstack/cms/templates/rails/app/views/site/_footer.html.erb +3 -0
- data/lib/generators/fullstack/cms/templates/rails/app/views/site/_google_analytics.html.erb +6 -0
- data/lib/generators/fullstack/cms/templates/rails/app/views/site/_head.html.erb +33 -0
- data/lib/generators/fullstack/cms/templates/rails/app/views/site/_header.html.erb +15 -0
- data/lib/generators/fullstack/cms/templates/rails/app/views/site/_javascripts.html.erb +22 -0
- data/lib/generators/fullstack/cms/templates/rails/app/views/site/_map.html.erb +14 -0
- data/lib/generators/fullstack/cms/templates/rails/app/views/site/_nav.html.erb +15 -0
- data/lib/generators/fullstack/cms/templates/rails/app/views/site/_share_buttons_big.html.erb +15 -0
- data/lib/generators/fullstack/cms/templates/rails/app/views/site/site/home.html.erb +12 -0
- data/lib/generators/fullstack/cms/templates/rails/config/initializers/devise_controller.rb +29 -0
- data/lib/generators/fullstack/cms/templates/rails/config/schedule.rb +5 -0
- data/lib/generators/fullstack/cms/templates/rails/config/sitemap.rb.tt +28 -0
- data/lib/generators/fullstack/cms/templates/rails/config/styles.yml +47 -0
- data/lib/generators/fullstack/cms/templates/rails/db/migrate/20120416071459_acts_as_taggable_on_migration.rb +31 -0
- data/lib/generators/fullstack/cms/templates/rails/db/migrate/20120730184641_create_friendly_id_slugs.rb +18 -0
- data/lib/generators/fullstack/cms/templates/rails/db/migrate/20120730204729_create_ckeditor_assets.rb +26 -0
- data/lib/generators/fullstack/cms/templates/rails/db/seeds.rb.tt +11 -0
- data/lib/generators/fullstack/cms/templates/rails/lib/support/ckeditor/asset.rb +4 -0
- data/lib/generators/fullstack/cms/templates/rails/lib/support/ckeditor/attachment_file.rb +12 -0
- data/lib/generators/fullstack/cms/templates/rails/lib/support/ckeditor/picture.rb +13 -0
- data/lib/generators/fullstack/cms/templates/rails/lib/support/content.rb +16 -0
- data/lib/generators/fullstack/cms/templates/rails/lib/support/pageable.rb +37 -0
- data/lib/generators/fullstack/cms/templates/rails/lib/support/timestamped_content.rb +12 -0
- data/lib/generators/fullstack/cms/templates/rails/lib/support/user_subject.rb +40 -0
- data/lib/generators/fullstack/cms/templates/rails/lib/tasks/.gitkeep +0 -0
- data/lib/generators/fullstack/cms/templates/rails/lib/tasks/assets.rake +53 -0
- data/lib/generators/fullstack/cms/templates/rails/lib/tasks/cms.rake +23 -0
- data/lib/generators/fullstack/cms/templates/rails/lib/tasks/remote.rake +255 -0
- data/lib/generators/fullstack/cms/templates/rails/public/404.html +43 -0
- data/lib/generators/fullstack/cms/templates/rails/public/422.html +26 -0
- data/lib/generators/fullstack/cms/templates/rails/public/500.html +25 -0
- data/lib/generators/fullstack/cms/templates/rails/public/apple-touch-icon.png +0 -0
- data/lib/generators/fullstack/cms/templates/rails/public/crossdomain.xml +25 -0
- data/lib/generators/fullstack/cms/templates/rails/public/favicon.ico +0 -0
- data/lib/generators/fullstack/cms/templates/rails/public/img/.gitignore +0 -0
- data/lib/generators/fullstack/cms/templates/rails/public/img/glyphicons-halflings.png +0 -0
- data/lib/generators/fullstack/cms/templates/rails/public/js/modernizr-2.5.3.min.js +4 -0
- data/lib/generators/fullstack/cms/templates/rails/public/robots.txt +4 -0
- metadata +333 -0
@@ -0,0 +1,24 @@
|
|
1
|
+
<%= tabs do |t| %>
|
2
|
+
<%= t.pane _("Info") do %>
|
3
|
+
<%= semantic_form_for [:"admin", resource], :html => { :multipart => true, :'data-type' => :script }, :remote => true do |f| -%>
|
4
|
+
|
5
|
+
<%= form_errors(f) %>
|
6
|
+
|
7
|
+
<%= f.inputs do %>
|
8
|
+
<%= f.input :label %>
|
9
|
+
<%= f.input :description %>
|
10
|
+
<%= f.input :url %>
|
11
|
+
<%= f.input :image %>
|
12
|
+
<%= f.input :alignment_right %>
|
13
|
+
|
14
|
+
<% end -%>
|
15
|
+
|
16
|
+
<%= form_actions do %>
|
17
|
+
<%= button (resource.persisted? ? _("Update") : _("Create")), :type => :primary, :size => :large %>
|
18
|
+
<% end %>
|
19
|
+
|
20
|
+
|
21
|
+
<% end -%>
|
22
|
+
|
23
|
+
<% end %>
|
24
|
+
<% end %>
|
@@ -0,0 +1,9 @@
|
|
1
|
+
<% if thead -%>
|
2
|
+
<th><%= sort_link title_method_for(collection.klass) %></th><th><%= sort_link :created_at %></th><th><%= _("Actions") %></th>
|
3
|
+
<% end -%>
|
4
|
+
|
5
|
+
<% if tbody -%>
|
6
|
+
<td><%= link_to title_for(content), [:edit, :admin, content] %></td>
|
7
|
+
<td><%= l content.created_at, :format => :pubdate %></td>
|
8
|
+
<td><%= default_collection_actions_for(content) %></td>
|
9
|
+
<% end -%>
|
@@ -0,0 +1,128 @@
|
|
1
|
+
<table class="table table-bordered">
|
2
|
+
<thead>
|
3
|
+
<tr>
|
4
|
+
<th colspan="2"><%= _("Label") %></th>
|
5
|
+
<th><%= _("Url") %></th>
|
6
|
+
<th><%= _("Actions") %></th>
|
7
|
+
</tr>
|
8
|
+
</thead>
|
9
|
+
<tbody id="links_table_body" class="sortable" data-update-url="<%= sort_admin_links_path %>">
|
10
|
+
<% link_owner.links.each do |link| %>
|
11
|
+
<%= render :partial => "admin/links/table_row", :locals => {:link => link} %>
|
12
|
+
<% end %>
|
13
|
+
</tbody>
|
14
|
+
</table>
|
15
|
+
|
16
|
+
|
17
|
+
<div id="add_link_form">
|
18
|
+
|
19
|
+
<div class="well">
|
20
|
+
<%= semantic_form_for [:"admin", link = Link.new(:link_owner => link_owner)], :html => {:multipart => true}, :remote => true do |f| -%>
|
21
|
+
|
22
|
+
<%= form_errors(f) %>
|
23
|
+
<%= f.inputs :class=>"hide" do %>
|
24
|
+
<%= f.input :link_owner_id, :as => :hidden, :label => false %>
|
25
|
+
<%= f.input :link_owner_type, :as => :hidden, :label => false %>
|
26
|
+
<% end %>
|
27
|
+
|
28
|
+
<%= f.inputs _("Add a new link"), :class => "clearable" do %>
|
29
|
+
<div class="row-fluid">
|
30
|
+
<div class="span8">
|
31
|
+
<%= f.input :label %>
|
32
|
+
<%= f.input :description %>
|
33
|
+
|
34
|
+
<div class="mb1">
|
35
|
+
</div>
|
36
|
+
|
37
|
+
<%= tabs do |t| %>
|
38
|
+
<%= t.pane(_("Link a Page")) do %>
|
39
|
+
<div class="clearfix" style="padding: 18px; min-height: 54px;">
|
40
|
+
<select class="select-resource-url" data-placeholder="<%= _('Choose a page by title') %>">
|
41
|
+
<option value=""></option>
|
42
|
+
<% Page.all.each do |page| %>
|
43
|
+
<option value="content://Page#<%= page.id %>"><%= page.title %></option>
|
44
|
+
<% end %>
|
45
|
+
</select>
|
46
|
+
</div>
|
47
|
+
<% end %>
|
48
|
+
<%= t.pane _("Insert by hand") do %>
|
49
|
+
<%= f.input :url %>
|
50
|
+
<% end %>
|
51
|
+
<% end %>
|
52
|
+
|
53
|
+
|
54
|
+
|
55
|
+
</div>
|
56
|
+
<div class="span4">
|
57
|
+
<div class="hide">
|
58
|
+
<%= f.input :alignment_right %>
|
59
|
+
</div>
|
60
|
+
|
61
|
+
|
62
|
+
<!-- =============== -->
|
63
|
+
<!-- = Image input = -->
|
64
|
+
<!-- =============== -->
|
65
|
+
|
66
|
+
|
67
|
+
|
68
|
+
|
69
|
+
<%= f.inputs "Immagine" do %>
|
70
|
+
|
71
|
+
<% if link.image.exists? %>
|
72
|
+
<ul class="thumbnails">
|
73
|
+
<li class="span3">
|
74
|
+
<a href="<%= link.image.url %>" target="blank" class="thumbnail">
|
75
|
+
<img src="<%= link.image.url(:thumb) %>"/>
|
76
|
+
</a>
|
77
|
+
</li>
|
78
|
+
</ul>
|
79
|
+
<% else %>
|
80
|
+
<div class="alert">
|
81
|
+
<a class="close" data-dismiss="alert">×</a>
|
82
|
+
Nessuna immagine caricata
|
83
|
+
</div>
|
84
|
+
<% end %>
|
85
|
+
|
86
|
+
<%= f.input :image, :as => :file, :hint => "Dimensione consigliata 800x600", :label => false %>
|
87
|
+
|
88
|
+
<% end %>
|
89
|
+
|
90
|
+
|
91
|
+
|
92
|
+
|
93
|
+
|
94
|
+
|
95
|
+
|
96
|
+
<!-- ================ -->
|
97
|
+
<!-- = ############ = -->
|
98
|
+
<!-- ================ -->
|
99
|
+
<%= f.input :icon %>
|
100
|
+
</div>
|
101
|
+
</div>
|
102
|
+
|
103
|
+
|
104
|
+
<% end -%>
|
105
|
+
|
106
|
+
<%= form_actions do %>
|
107
|
+
<%= button _("Add Link"), :type => :primary %>
|
108
|
+
<% end %>
|
109
|
+
|
110
|
+
<% end -%>
|
111
|
+
|
112
|
+
</div>
|
113
|
+
</div>
|
114
|
+
|
115
|
+
|
116
|
+
|
117
|
+
|
118
|
+
<% content_for :javascripts do -%>
|
119
|
+
<script type="text/javascript" charset="utf-8">
|
120
|
+
$(document).ready(function(){
|
121
|
+
$("select.select-resource-url").change(function(){
|
122
|
+
$("#link_url").val($("select.select-resource-url").val());
|
123
|
+
});
|
124
|
+
|
125
|
+
});
|
126
|
+
|
127
|
+
</script>
|
128
|
+
<% end -%>
|
@@ -0,0 +1,9 @@
|
|
1
|
+
<tr data-link-id="<%= link.id %>">
|
2
|
+
<td style="width: 12px;" ><img src="/admin/drag-handle.png" class="handle" /></td>
|
3
|
+
<td><%= link.label %></td>
|
4
|
+
<td><%= link.url %></td>
|
5
|
+
<td>
|
6
|
+
<a href="<%= edit_admin_link_path(link) %>" data-tooltip="<%= _('Edit') %>"><i class="icon-edit"></i></a>
|
7
|
+
<a href="<%= admin_link_path(link) %>" data-confirm="Are you sure?" data-method="delete" data-remote="true" data-tooltip="<%= _('Delete') %>"><i class="icon-trash"></i></a>
|
8
|
+
</td>
|
9
|
+
</tr>
|
@@ -0,0 +1,12 @@
|
|
1
|
+
<%= remotipart_response do %>
|
2
|
+
<% if @link.errors.empty? %>
|
3
|
+
$("#links_table_body").append('<%=j render(:partial => "admin/links/table_row", :locals => {:link => @link}) %>');
|
4
|
+
$("#add_link_form .clearable input").each(function() {
|
5
|
+
return $(this).val("");
|
6
|
+
});
|
7
|
+
$("#add_link_form").collapse('hide');
|
8
|
+
$.flash.notify('<%=j t("flash.success.create") %>');
|
9
|
+
<% else %>
|
10
|
+
$.flash.notify('<%=j t("flash.error.create") %>');
|
11
|
+
<% end %>
|
12
|
+
<% end %>
|
@@ -0,0 +1,34 @@
|
|
1
|
+
<%= tabs do |t| %>
|
2
|
+
<%= t.pane _("Info") do %>
|
3
|
+
|
4
|
+
|
5
|
+
<%= semantic_form_for [:"admin", resource], :html => {:multipart => true} do |f| -%>
|
6
|
+
|
7
|
+
<%= form_errors(f) %>
|
8
|
+
|
9
|
+
<%= f.inputs do %>
|
10
|
+
<%= f.input :name %>
|
11
|
+
<%= f.input :uid %>
|
12
|
+
<% end -%>
|
13
|
+
|
14
|
+
<%= form_actions do %>
|
15
|
+
<%= button (resource.persisted? ? _("Update") : _("Create")), :type => :primary, :size => :large %>
|
16
|
+
<% end %>
|
17
|
+
|
18
|
+
|
19
|
+
<% end -%>
|
20
|
+
|
21
|
+
<% end %>
|
22
|
+
<%= t.pane _("Links") do %>
|
23
|
+
|
24
|
+
<% if !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 => resource} %>
|
31
|
+
<% end %>
|
32
|
+
|
33
|
+
<% end %>
|
34
|
+
<% end %>
|
@@ -0,0 +1,9 @@
|
|
1
|
+
<% if thead -%>
|
2
|
+
<th><%= sort_link title_method_for(collection.klass) %></th><th><%= sort_link :created_at %></th><th><%= _("Actions") %></th>
|
3
|
+
<% end -%>
|
4
|
+
|
5
|
+
<% if tbody -%>
|
6
|
+
<td><%= link_to title_for(content), [:edit, :admin, content] %></td>
|
7
|
+
<td><%= l content.created_at, :format => :pubdate %></td>
|
8
|
+
<td><%= default_collection_actions_for(content) %></td>
|
9
|
+
<% end -%>
|
@@ -0,0 +1,21 @@
|
|
1
|
+
<% page.page_parts.each do |part| %>
|
2
|
+
<%= tabs.pane(part.name) do %>
|
3
|
+
|
4
|
+
<%= semantic_form_for [:"admin", page, part], :html => {:multipart => true}, :remote => true, :'data-type' => "js" do |f| -%>
|
5
|
+
|
6
|
+
<%= form_errors(f) %>
|
7
|
+
|
8
|
+
<%= f.inputs do %>
|
9
|
+
<%= f.input :content, :label => false, :input_html => { :class => "markup-ckeditor", :id => "page_part_#{part.id}_content" } %>
|
10
|
+
<% end -%>
|
11
|
+
|
12
|
+
<%= form_actions do %>
|
13
|
+
<%= button (resource.persisted? ? _("Update") : _("Create")),
|
14
|
+
:type => :primary, :size => :large %>
|
15
|
+
<%= link_to _("Delete"), [:admin, page, part], :data => {:method => "delete", :remote => true, :confirm => _("Are you sure?") }, :class => "btn btn-large btn-danger" %>
|
16
|
+
<% end %>
|
17
|
+
|
18
|
+
<% end -%>
|
19
|
+
|
20
|
+
<% end %>
|
21
|
+
<% end %>
|
@@ -0,0 +1,12 @@
|
|
1
|
+
<% if instance_variable_get("@#{controller_name.singularize}").destroyed? %>
|
2
|
+
$(".nav-tabs li.active, .tab-pane.active").fadeOut 'fast', ->
|
3
|
+
$(@).remove()
|
4
|
+
$(".tabs").show()
|
5
|
+
|
6
|
+
$("a[data-toggle='tab']").first().click()
|
7
|
+
|
8
|
+
notify_notice('<%=j t("flash.success.delete") %>')
|
9
|
+
<% else %>
|
10
|
+
notify_error('<%=j t("flash.error.delete") %>')
|
11
|
+
<% end %>
|
12
|
+
|
@@ -0,0 +1,7 @@
|
|
1
|
+
<ul class="nav">
|
2
|
+
<% Page.roots.each do |root| %>
|
3
|
+
<% Page.each_with_level(root.self_and_descendants) do |page, level| %>
|
4
|
+
<%= nav_item page.name, edit_admin_page_path(page), :icon => (page.home? ? "home" : "file"), :style => "line-height: 36px; padding-left:#{20 * level}px" %>
|
5
|
+
<% end %>
|
6
|
+
<% end %>
|
7
|
+
</ul>
|
@@ -0,0 +1,54 @@
|
|
1
|
+
<%= tabs do |t| %>
|
2
|
+
<%= t.pane _("Info") do %>
|
3
|
+
<%= semantic_form_for [:"admin", resource], :html => {:multipart => true, :"data-type" => :script}, :remote => true do |f| -%>
|
4
|
+
|
5
|
+
<%= form_errors(f) %>
|
6
|
+
|
7
|
+
<%= f.inputs do %>
|
8
|
+
<%= f.input :name %>
|
9
|
+
<% if !@page.resourceful? %>
|
10
|
+
<%= f.input :title %>
|
11
|
+
<%= f.input :description, :as => :text %>
|
12
|
+
<% end %>
|
13
|
+
<% end -%>
|
14
|
+
|
15
|
+
<%= nav :class => "pills" do %>
|
16
|
+
<%= nav_item _("Advanced settings"),
|
17
|
+
"#advanced_settings",
|
18
|
+
:data => {:toggle => "collapse", :target => "#advanced_settings"},
|
19
|
+
:icon => "cog"
|
20
|
+
%>
|
21
|
+
<% end %>
|
22
|
+
<div class="collapse" id="advanced_settings">
|
23
|
+
<%= f.inputs do %>
|
24
|
+
<%= f.input :path, :input_html => {:readonly => true} %>
|
25
|
+
<%= f.input :uid, :input_html => {:readonly => true} %>
|
26
|
+
<% end %>
|
27
|
+
</div>
|
28
|
+
|
29
|
+
|
30
|
+
<%= form_actions do %>
|
31
|
+
<%= button (resource.persisted? ? _("Update") : _("Create")), :type => :primary, :size => :large %>
|
32
|
+
<% end %>
|
33
|
+
|
34
|
+
|
35
|
+
<% end -%>
|
36
|
+
|
37
|
+
<% end %>
|
38
|
+
<%= render :partial => "admin/page_parts/tabs", :locals => {:page => current_resource, :tabs => t} %>
|
39
|
+
<% end %>
|
40
|
+
|
41
|
+
|
42
|
+
|
43
|
+
<% content_for :javascripts do -%>
|
44
|
+
<script type="text/javascript" charset="utf-8">
|
45
|
+
$(document).ready(function() {
|
46
|
+
|
47
|
+
$("form")
|
48
|
+
.bind('ajax:error', function(xhr, status, error) {
|
49
|
+
console.log(error);
|
50
|
+
})
|
51
|
+
});
|
52
|
+
|
53
|
+
</script>
|
54
|
+
<% end -%>
|
@@ -0,0 +1,25 @@
|
|
1
|
+
<%= semantic_form_for [:"admin", resource], :html => {:multipart => true} do |f| -%>
|
2
|
+
|
3
|
+
<%= form_errors(f) %>
|
4
|
+
<% if resource.new_record? %>
|
5
|
+
|
6
|
+
<%= f.inputs do %>
|
7
|
+
<%= f.input :key %>
|
8
|
+
<%= f.input :kind, :as => "select", :collection => Setting.kinds %>
|
9
|
+
<% end -%>
|
10
|
+
|
11
|
+
<% else %>
|
12
|
+
|
13
|
+
<%= f.inputs do %>
|
14
|
+
<%= f.input :key, :input_html => {:readonly => true} %>
|
15
|
+
<%= f.input :"#{resource.kind}_value" %>
|
16
|
+
<% end -%>
|
17
|
+
|
18
|
+
|
19
|
+
<% end %>
|
20
|
+
<%= form_actions do %>
|
21
|
+
<%= button (resource.persisted? ? _("Update") : _("Create")), :type => :primary, :size => :large %>
|
22
|
+
<% end %>
|
23
|
+
|
24
|
+
|
25
|
+
<% end -%>
|
@@ -0,0 +1,8 @@
|
|
1
|
+
<% if thead -%>
|
2
|
+
<th><%= sort_link title_method_for(collection.klass) %></th><th><%= _("Actions") %></th>
|
3
|
+
<% end -%>
|
4
|
+
|
5
|
+
<% if tbody -%>
|
6
|
+
<td><%= link_to title_for(content), [:edit, :admin, content] %></td>
|
7
|
+
<td><%= default_collection_actions_for(content) %></td>
|
8
|
+
<% end -%>
|
@@ -0,0 +1,189 @@
|
|
1
|
+
# Generated by jeweler
|
2
|
+
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
|
+
# -*- encoding: utf-8 -*-
|
5
|
+
|
6
|
+
Gem::Specification.new do |s|
|
7
|
+
s.name = "fullstack-cms"
|
8
|
+
s.version = "0.1.1"
|
9
|
+
|
10
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
|
+
s.authors = ["mcasimir"]
|
12
|
+
s.date = "2012-08-13"
|
13
|
+
s.description = "CMS system built on fullstack"
|
14
|
+
s.email = "maurizio.cas@gmail.com"
|
15
|
+
s.extra_rdoc_files = [
|
16
|
+
"README.md"
|
17
|
+
]
|
18
|
+
s.files = [
|
19
|
+
"Gemfile",
|
20
|
+
"Gemfile.lock",
|
21
|
+
"README.md",
|
22
|
+
"Rakefile",
|
23
|
+
"VERSION",
|
24
|
+
"app/controllers/links_controller.rb",
|
25
|
+
"app/controllers/menus_controller.rb",
|
26
|
+
"app/controllers/page_parts_controller.rb",
|
27
|
+
"app/controllers/pages_controller.rb",
|
28
|
+
"app/controllers/posts_controller.rb",
|
29
|
+
"app/controllers/settings_controller.rb",
|
30
|
+
"app/controllers/tags_controller.rb",
|
31
|
+
"app/controllers/users_controller.rb",
|
32
|
+
"app/helpers/menus_helper.rb",
|
33
|
+
"app/helpers/pages_helper.rb",
|
34
|
+
"app/helpers/settings_helper.rb",
|
35
|
+
"app/models/.gitkeep",
|
36
|
+
"app/models/link.rb",
|
37
|
+
"app/models/menu.rb",
|
38
|
+
"app/models/page.rb",
|
39
|
+
"app/models/page_part.rb",
|
40
|
+
"app/models/redirect.rb",
|
41
|
+
"app/models/setting.rb",
|
42
|
+
"app/views/admin/links/_filter.html.erb",
|
43
|
+
"app/views/admin/links/_form.html.erb",
|
44
|
+
"app/views/admin/links/_index.html.erb",
|
45
|
+
"app/views/admin/links/_links.html.erb",
|
46
|
+
"app/views/admin/links/_table_row.html.erb",
|
47
|
+
"app/views/admin/links/create.js.erb",
|
48
|
+
"app/views/admin/links/sort.js.coffee",
|
49
|
+
"app/views/admin/links/update.js.coffee",
|
50
|
+
"app/views/admin/menus/_filter.html.erb",
|
51
|
+
"app/views/admin/menus/_form.html.erb",
|
52
|
+
"app/views/admin/menus/_index.html.erb",
|
53
|
+
"app/views/admin/page_parts/_tabs.html.erb",
|
54
|
+
"app/views/admin/page_parts/destroy.js.coffee",
|
55
|
+
"app/views/admin/pages/_collection.html.erb",
|
56
|
+
"app/views/admin/pages/_form.html.erb",
|
57
|
+
"app/views/admin/settings/_filter.html.erb",
|
58
|
+
"app/views/admin/settings/_form.html.erb",
|
59
|
+
"app/views/admin/settings/_index.html.erb",
|
60
|
+
"fullstack-cms.gemspec",
|
61
|
+
"lib/fullstack-cms.rb",
|
62
|
+
"lib/fullstack/cms.rb",
|
63
|
+
"lib/fullstack/cms/engine.rb",
|
64
|
+
"lib/generators/fullstack/cms/install_generator.rb",
|
65
|
+
"lib/generators/fullstack/cms/locale_generator.rb",
|
66
|
+
"lib/generators/fullstack/cms/templates/rails/README.md",
|
67
|
+
"lib/generators/fullstack/cms/templates/rails/app/controllers/site/site_controller.rb",
|
68
|
+
"lib/generators/fullstack/cms/templates/rails/app/views/admin/attachments/_attachments.html.erb",
|
69
|
+
"lib/generators/fullstack/cms/templates/rails/app/views/admin/attachments/create.js.coffee",
|
70
|
+
"lib/generators/fullstack/cms/templates/rails/app/views/admin/base/destroy.js.coffee",
|
71
|
+
"lib/generators/fullstack/cms/templates/rails/app/views/admin/base/edit.html.erb",
|
72
|
+
"lib/generators/fullstack/cms/templates/rails/app/views/admin/base/index.html.erb",
|
73
|
+
"lib/generators/fullstack/cms/templates/rails/app/views/admin/base/new.html.erb",
|
74
|
+
"lib/generators/fullstack/cms/templates/rails/app/views/admin/base/update.js.coffee",
|
75
|
+
"lib/generators/fullstack/cms/templates/rails/app/views/admin/dashboard/show.html.erb",
|
76
|
+
"lib/generators/fullstack/cms/templates/rails/app/views/admin/links/_filter.html.erb",
|
77
|
+
"lib/generators/fullstack/cms/templates/rails/app/views/admin/links/_form.html.erb",
|
78
|
+
"lib/generators/fullstack/cms/templates/rails/app/views/admin/links/_index.html.erb",
|
79
|
+
"lib/generators/fullstack/cms/templates/rails/app/views/admin/links/_links.html.erb",
|
80
|
+
"lib/generators/fullstack/cms/templates/rails/app/views/admin/links/_table_row.html.erb",
|
81
|
+
"lib/generators/fullstack/cms/templates/rails/app/views/admin/links/create.js.erb",
|
82
|
+
"lib/generators/fullstack/cms/templates/rails/app/views/admin/links/sort.js.coffee",
|
83
|
+
"lib/generators/fullstack/cms/templates/rails/app/views/admin/links/update.js.coffee",
|
84
|
+
"lib/generators/fullstack/cms/templates/rails/app/views/admin/menus/_filter.html.erb",
|
85
|
+
"lib/generators/fullstack/cms/templates/rails/app/views/admin/menus/_form.html.erb",
|
86
|
+
"lib/generators/fullstack/cms/templates/rails/app/views/admin/menus/_index.html.erb",
|
87
|
+
"lib/generators/fullstack/cms/templates/rails/app/views/admin/page_parts/_tabs.html.erb",
|
88
|
+
"lib/generators/fullstack/cms/templates/rails/app/views/admin/page_parts/destroy.js.coffee",
|
89
|
+
"lib/generators/fullstack/cms/templates/rails/app/views/admin/pages/_filter.html.erb",
|
90
|
+
"lib/generators/fullstack/cms/templates/rails/app/views/admin/pages/_form.html.erb",
|
91
|
+
"lib/generators/fullstack/cms/templates/rails/app/views/admin/pages/_index.html.erb",
|
92
|
+
"lib/generators/fullstack/cms/templates/rails/app/views/admin/photogalleries/_filter.html.erb",
|
93
|
+
"lib/generators/fullstack/cms/templates/rails/app/views/admin/photogalleries/_form.html.erb",
|
94
|
+
"lib/generators/fullstack/cms/templates/rails/app/views/admin/photogalleries/_index.html.erb",
|
95
|
+
"lib/generators/fullstack/cms/templates/rails/app/views/admin/settings/_filter.html.erb",
|
96
|
+
"lib/generators/fullstack/cms/templates/rails/app/views/admin/settings/_form.html.erb",
|
97
|
+
"lib/generators/fullstack/cms/templates/rails/app/views/admin/settings/_index.html.erb",
|
98
|
+
"lib/generators/fullstack/cms/templates/rails/app/views/admin/shared/_nav.html.erb",
|
99
|
+
"lib/generators/fullstack/cms/templates/rails/app/views/admin/users/_filter.html.erb",
|
100
|
+
"lib/generators/fullstack/cms/templates/rails/app/views/admin/users/_form.html.erb",
|
101
|
+
"lib/generators/fullstack/cms/templates/rails/app/views/admin/users/_index.html.erb",
|
102
|
+
"lib/generators/fullstack/cms/templates/rails/app/views/layouts/admin.html.erb",
|
103
|
+
"lib/generators/fullstack/cms/templates/rails/app/views/layouts/application.html.erb",
|
104
|
+
"lib/generators/fullstack/cms/templates/rails/app/views/layouts/email.html.erb",
|
105
|
+
"lib/generators/fullstack/cms/templates/rails/app/views/site/_footer.html.erb",
|
106
|
+
"lib/generators/fullstack/cms/templates/rails/app/views/site/_google_analytics.html.erb",
|
107
|
+
"lib/generators/fullstack/cms/templates/rails/app/views/site/_head.html.erb",
|
108
|
+
"lib/generators/fullstack/cms/templates/rails/app/views/site/_header.html.erb",
|
109
|
+
"lib/generators/fullstack/cms/templates/rails/app/views/site/_javascripts.html.erb",
|
110
|
+
"lib/generators/fullstack/cms/templates/rails/app/views/site/_map.html.erb",
|
111
|
+
"lib/generators/fullstack/cms/templates/rails/app/views/site/_nav.html.erb",
|
112
|
+
"lib/generators/fullstack/cms/templates/rails/app/views/site/_share_buttons_big.html.erb",
|
113
|
+
"lib/generators/fullstack/cms/templates/rails/app/views/site/site/home.html.erb",
|
114
|
+
"lib/generators/fullstack/cms/templates/rails/config/initializers/devise_controller.rb",
|
115
|
+
"lib/generators/fullstack/cms/templates/rails/config/schedule.rb",
|
116
|
+
"lib/generators/fullstack/cms/templates/rails/config/sitemap.rb.tt",
|
117
|
+
"lib/generators/fullstack/cms/templates/rails/config/styles.yml",
|
118
|
+
"lib/generators/fullstack/cms/templates/rails/db/migrate/20120416071459_acts_as_taggable_on_migration.rb",
|
119
|
+
"lib/generators/fullstack/cms/templates/rails/db/migrate/20120730184641_create_friendly_id_slugs.rb",
|
120
|
+
"lib/generators/fullstack/cms/templates/rails/db/migrate/20120730204729_create_ckeditor_assets.rb",
|
121
|
+
"lib/generators/fullstack/cms/templates/rails/db/seeds.rb.tt",
|
122
|
+
"lib/generators/fullstack/cms/templates/rails/lib/support/ckeditor/asset.rb",
|
123
|
+
"lib/generators/fullstack/cms/templates/rails/lib/support/ckeditor/attachment_file.rb",
|
124
|
+
"lib/generators/fullstack/cms/templates/rails/lib/support/ckeditor/picture.rb",
|
125
|
+
"lib/generators/fullstack/cms/templates/rails/lib/support/content.rb",
|
126
|
+
"lib/generators/fullstack/cms/templates/rails/lib/support/pageable.rb",
|
127
|
+
"lib/generators/fullstack/cms/templates/rails/lib/support/timestamped_content.rb",
|
128
|
+
"lib/generators/fullstack/cms/templates/rails/lib/support/user_subject.rb",
|
129
|
+
"lib/generators/fullstack/cms/templates/rails/lib/tasks/.gitkeep",
|
130
|
+
"lib/generators/fullstack/cms/templates/rails/lib/tasks/assets.rake",
|
131
|
+
"lib/generators/fullstack/cms/templates/rails/lib/tasks/cms.rake",
|
132
|
+
"lib/generators/fullstack/cms/templates/rails/lib/tasks/remote.rake",
|
133
|
+
"lib/generators/fullstack/cms/templates/rails/public/404.html",
|
134
|
+
"lib/generators/fullstack/cms/templates/rails/public/422.html",
|
135
|
+
"lib/generators/fullstack/cms/templates/rails/public/500.html",
|
136
|
+
"lib/generators/fullstack/cms/templates/rails/public/apple-touch-icon.png",
|
137
|
+
"lib/generators/fullstack/cms/templates/rails/public/crossdomain.xml",
|
138
|
+
"lib/generators/fullstack/cms/templates/rails/public/favicon.ico",
|
139
|
+
"lib/generators/fullstack/cms/templates/rails/public/img/.gitignore",
|
140
|
+
"lib/generators/fullstack/cms/templates/rails/public/img/glyphicons-halflings.png",
|
141
|
+
"lib/generators/fullstack/cms/templates/rails/public/js/modernizr-2.5.3.min.js",
|
142
|
+
"lib/generators/fullstack/cms/templates/rails/public/robots.txt"
|
143
|
+
]
|
144
|
+
s.homepage = "http://github.com/mcasimir/kaminari-bootstrap"
|
145
|
+
s.licenses = ["MIT"]
|
146
|
+
s.require_paths = ["lib"]
|
147
|
+
s.rubygems_version = "1.8.24"
|
148
|
+
s.summary = "CMS system built on fullstack"
|
149
|
+
|
150
|
+
if s.respond_to? :specification_version then
|
151
|
+
s.specification_version = 3
|
152
|
+
|
153
|
+
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
154
|
+
s.add_runtime_dependency(%q<fullstack>, [">= 0"])
|
155
|
+
s.add_runtime_dependency(%q<fullstack-admin>, [">= 0"])
|
156
|
+
s.add_runtime_dependency(%q<ars-permalink>, [">= 0"])
|
157
|
+
s.add_runtime_dependency(%q<has-attached>, [">= 0"])
|
158
|
+
s.add_runtime_dependency(%q<acts-as-taggable-on>, [">= 0"])
|
159
|
+
s.add_runtime_dependency(%q<acts_as_indexed>, [">= 0"])
|
160
|
+
s.add_runtime_dependency(%q<rails_i18n_gettext>, [">= 0"])
|
161
|
+
s.add_runtime_dependency(%q<sitemap>, [">= 0"])
|
162
|
+
s.add_runtime_dependency(%q<whenever>, [">= 0"])
|
163
|
+
s.add_development_dependency(%q<jeweler>, [">= 0"])
|
164
|
+
else
|
165
|
+
s.add_dependency(%q<fullstack>, [">= 0"])
|
166
|
+
s.add_dependency(%q<fullstack-admin>, [">= 0"])
|
167
|
+
s.add_dependency(%q<ars-permalink>, [">= 0"])
|
168
|
+
s.add_dependency(%q<has-attached>, [">= 0"])
|
169
|
+
s.add_dependency(%q<acts-as-taggable-on>, [">= 0"])
|
170
|
+
s.add_dependency(%q<acts_as_indexed>, [">= 0"])
|
171
|
+
s.add_dependency(%q<rails_i18n_gettext>, [">= 0"])
|
172
|
+
s.add_dependency(%q<sitemap>, [">= 0"])
|
173
|
+
s.add_dependency(%q<whenever>, [">= 0"])
|
174
|
+
s.add_dependency(%q<jeweler>, [">= 0"])
|
175
|
+
end
|
176
|
+
else
|
177
|
+
s.add_dependency(%q<fullstack>, [">= 0"])
|
178
|
+
s.add_dependency(%q<fullstack-admin>, [">= 0"])
|
179
|
+
s.add_dependency(%q<ars-permalink>, [">= 0"])
|
180
|
+
s.add_dependency(%q<has-attached>, [">= 0"])
|
181
|
+
s.add_dependency(%q<acts-as-taggable-on>, [">= 0"])
|
182
|
+
s.add_dependency(%q<acts_as_indexed>, [">= 0"])
|
183
|
+
s.add_dependency(%q<rails_i18n_gettext>, [">= 0"])
|
184
|
+
s.add_dependency(%q<sitemap>, [">= 0"])
|
185
|
+
s.add_dependency(%q<whenever>, [">= 0"])
|
186
|
+
s.add_dependency(%q<jeweler>, [">= 0"])
|
187
|
+
end
|
188
|
+
end
|
189
|
+
|