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,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 %>
|
data/lib/generators/fullstack/cms/templates/rails/app/views/admin/page_parts/destroy.js.coffee
ADDED
@@ -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,50 @@
|
|
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 :title %>
|
9
|
+
<% end -%>
|
10
|
+
|
11
|
+
<%= nav :class => "pills" do %>
|
12
|
+
<%= nav_item _("Advanced settings"),
|
13
|
+
"#advanced_settings",
|
14
|
+
:data => {:toggle => "collapse", :target => "#advanced_settings"},
|
15
|
+
:icon => "cog"
|
16
|
+
%>
|
17
|
+
<% end %>
|
18
|
+
<div class="collapse" id="advanced_settings">
|
19
|
+
<%= f.inputs do %>
|
20
|
+
<%= f.input :description, :as => :text %>
|
21
|
+
<%= f.input :uid, :input_html => {:readonly => true} %>
|
22
|
+
<% end %>
|
23
|
+
</div>
|
24
|
+
|
25
|
+
|
26
|
+
<%= form_actions do %>
|
27
|
+
<%= button (resource.persisted? ? _("Update") : _("Create")), :type => :primary, :size => :large %>
|
28
|
+
<% end %>
|
29
|
+
|
30
|
+
|
31
|
+
<% end -%>
|
32
|
+
|
33
|
+
<% end %>
|
34
|
+
<%= render :partial => "admin/page_parts/tabs", :locals => {:page => current_resource, :tabs => t} %>
|
35
|
+
<% end %>
|
36
|
+
|
37
|
+
|
38
|
+
|
39
|
+
<% content_for :javascripts do -%>
|
40
|
+
<script type="text/javascript" charset="utf-8">
|
41
|
+
$(document).ready(function() {
|
42
|
+
|
43
|
+
$("form")
|
44
|
+
.bind('ajax:error', function(xhr, status, error) {
|
45
|
+
console.log(error);
|
46
|
+
})
|
47
|
+
});
|
48
|
+
|
49
|
+
</script>
|
50
|
+
<% end -%>
|
@@ -0,0 +1,14 @@
|
|
1
|
+
<% if thead -%>
|
2
|
+
<th><%= sort_link title_method_for(collection.klass) %></th>
|
3
|
+
|
4
|
+
|
5
|
+
<th><%= _("Actions") %></th>
|
6
|
+
<% end -%>
|
7
|
+
|
8
|
+
<% if tbody -%>
|
9
|
+
<td><%= link_to title_for(content), [:edit, :admin, content] %></td>
|
10
|
+
|
11
|
+
|
12
|
+
|
13
|
+
<td><%= default_collection_actions_for(content) %></td>
|
14
|
+
<% end -%>
|
data/lib/generators/fullstack/cms/templates/rails/app/views/admin/photogalleries/_form.html.erb
ADDED
@@ -0,0 +1,26 @@
|
|
1
|
+
<%= tabs do |t| %>
|
2
|
+
<%= t.pane _("Info") do %>
|
3
|
+
|
4
|
+
<%= semantic_form_for [:"admin", resource], :html => {:multipart => true} do |f| -%>
|
5
|
+
<%= form_errors(f) %>
|
6
|
+
|
7
|
+
<%= f.inputs do %>
|
8
|
+
<%= f.input :title %>
|
9
|
+
<%= f.input :excerpt %>
|
10
|
+
|
11
|
+
<% end -%>
|
12
|
+
|
13
|
+
<%= form_actions do %>
|
14
|
+
<%= button (resource.persisted? ? _("Update") : _("Create")), :type => :primary, :size => :large %>
|
15
|
+
<% end %>
|
16
|
+
<% end -%>
|
17
|
+
|
18
|
+
<% end %>
|
19
|
+
<%= t.pane _("Photos") do %>
|
20
|
+
|
21
|
+
<div>
|
22
|
+
<%= photo_uploader_for(@photogallery) %>
|
23
|
+
</div>
|
24
|
+
|
25
|
+
<% end %>
|
26
|
+
<% end %>
|
data/lib/generators/fullstack/cms/templates/rails/app/views/admin/photogalleries/_index.html.erb
ADDED
@@ -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,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,38 @@
|
|
1
|
+
<% content_for :menu do -%>
|
2
|
+
|
3
|
+
<%= nav do %>
|
4
|
+
<%= nav_item _("Dashboard"), admin_root_path, :icon => "cog" , :icon_color => :white %>
|
5
|
+
<%= nav_item _("Settings"), admin_settings_path, :icon => "wrench" , :icon_color => :white %>
|
6
|
+
<% end %>
|
7
|
+
|
8
|
+
<%= nav(:class => 'float right') do %>
|
9
|
+
<%= nav_item _("Homepage"), "/", :icon => "home" , :icon_color => :white %>
|
10
|
+
<%= dropdown_nav_item _("Account"), :icon => "user" , :icon_color => :white do %>
|
11
|
+
<%= nav_item _('Logout'), destroy_user_session_path, :method => :delete %>
|
12
|
+
<% end %>
|
13
|
+
<% end %>
|
14
|
+
|
15
|
+
<% end -%>
|
16
|
+
|
17
|
+
<% content_for :nav do -%>
|
18
|
+
|
19
|
+
<div class="well">
|
20
|
+
<%= nav_list do %>
|
21
|
+
<%= nav_header _("Website") %>
|
22
|
+
<%= nav_item _("Pages"), admin_pages_path %>
|
23
|
+
<%= nav_item _("Menus"), admin_menus_path %>
|
24
|
+
|
25
|
+
<%= nav_header _("Contents") %>
|
26
|
+
<%= nav_item _("Photogalleries"), admin_photogalleries_path %>
|
27
|
+
|
28
|
+
<!-- items placeholder -->
|
29
|
+
|
30
|
+
<%= nav_header _("Users") %>
|
31
|
+
<%= nav_item _("Users"), admin_users_path %>
|
32
|
+
|
33
|
+
|
34
|
+
<% end -%>
|
35
|
+
</div>
|
36
|
+
|
37
|
+
|
38
|
+
<% end -%>
|
@@ -0,0 +1,53 @@
|
|
1
|
+
<%= tabs do |t| %>
|
2
|
+
<%= t.pane _("Info") do %>
|
3
|
+
|
4
|
+
<%= semantic_form_for [:"admin", resource], :html => {:multipart => true} do |f| -%>
|
5
|
+
|
6
|
+
<%= form_errors(f) %>
|
7
|
+
|
8
|
+
<%= f.inputs do %>
|
9
|
+
<%= f.input :email %>
|
10
|
+
<% end -%>
|
11
|
+
|
12
|
+
<%= link_to _("Edit password"),
|
13
|
+
"javascript:void(0);",
|
14
|
+
:id => "edit_your_password",
|
15
|
+
:class => "btn btn-small" %>
|
16
|
+
|
17
|
+
<div id="password_fields" style="display:none;">
|
18
|
+
<%= f.inputs do %>
|
19
|
+
<%= f.input :password %>
|
20
|
+
<%= f.input :password_confirmation %>
|
21
|
+
<% end %>
|
22
|
+
</div>
|
23
|
+
|
24
|
+
<%= form_actions do %>
|
25
|
+
<%= button (resource.persisted? ? _("Update") : _("Create")),
|
26
|
+
:type => :primary, :size => :large %>
|
27
|
+
<% end %>
|
28
|
+
|
29
|
+
|
30
|
+
<% end -%>
|
31
|
+
|
32
|
+
<% end %>
|
33
|
+
<% end %>
|
34
|
+
|
35
|
+
|
36
|
+
|
37
|
+
<% content_for :javascripts do -%>
|
38
|
+
<%= coffee_script_tag do %>
|
39
|
+
html = $("#password_fields").find("fieldset")
|
40
|
+
html.remove()
|
41
|
+
$("#password_fields").show()
|
42
|
+
|
43
|
+
$(document).ready ->
|
44
|
+
|
45
|
+
$("#edit_your_password").click ->
|
46
|
+
elems = $(html)
|
47
|
+
elems.hide()
|
48
|
+
$("#password_fields").empty().append(elems)
|
49
|
+
elems.show('slow')
|
50
|
+
$(@).remove()
|
51
|
+
|
52
|
+
<% end %>
|
53
|
+
<% end %>
|
@@ -0,0 +1,18 @@
|
|
1
|
+
<% if thead -%>
|
2
|
+
<th><%= sort_link title_method_for(collection.klass) %></th>
|
3
|
+
|
4
|
+
<th><%= sort_link :created_at %></th>
|
5
|
+
|
6
|
+
|
7
|
+
<th><%= _("Actions") %></th>
|
8
|
+
<% end -%>
|
9
|
+
|
10
|
+
<% if tbody -%>
|
11
|
+
<td><%= link_to title_for(content), [:edit, :admin, content] %></td>
|
12
|
+
|
13
|
+
|
14
|
+
<td><%= l content.created_at, :format => :pubdate %></td>
|
15
|
+
|
16
|
+
|
17
|
+
<td><%= default_collection_actions_for(content) %></td>
|
18
|
+
<% end -%>
|