aboutsummaryrefslogtreecommitdiffstats
path: root/app/views/admin/blog/categories
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/admin/blog/categories')
-rw-r--r--app/views/admin/blog/categories/_category.html.erb13
-rw-r--r--app/views/admin/blog/categories/_form.html.erb15
-rw-r--r--app/views/admin/blog/categories/_sortable_list.html.erb7
-rw-r--r--app/views/admin/blog/categories/edit.html.erb1
-rw-r--r--app/views/admin/blog/categories/index.html.erb30
-rw-r--r--app/views/admin/blog/categories/new.html.erb1
6 files changed, 67 insertions, 0 deletions
diff --git a/app/views/admin/blog/categories/_category.html.erb b/app/views/admin/blog/categories/_category.html.erb
new file mode 100644
index 0000000..109f4e6
--- /dev/null
+++ b/app/views/admin/blog/categories/_category.html.erb
@@ -0,0 +1,13 @@
+<li class='clearfix record <%= cycle("on", "on-hover") %>' id="<%= dom_id(category) -%>">
+ <span class='title'>
+ <%=h category.title %>
+ <span class="preview">&nbsp;</span>
+ </span>
+ <span class='actions'>
+ <%= link_to refinery_icon_tag("application_edit.png"), edit_admin_blog_category_path(category),
+ :title => t('.edit') %>
+ <%= link_to refinery_icon_tag("delete.png"), admin_blog_category_path(category),
+ :class => "cancel confirm-delete",
+ :title => t('.delete') %>
+ </span>
+</li>
diff --git a/app/views/admin/blog/categories/_form.html.erb b/app/views/admin/blog/categories/_form.html.erb
new file mode 100644
index 0000000..f1ee0bc
--- /dev/null
+++ b/app/views/admin/blog/categories/_form.html.erb
@@ -0,0 +1,15 @@
+<% form_for [:admin, @blog_category] do |f| -%>
+ <%= f.error_messages %>
+
+ <div class='field'>
+ <%= f.label :title -%>
+ <%= f.text_field :title, :class => 'larger widest' -%>
+ </div>
+
+ <%= render :partial => "/shared/admin/form_actions",
+ :locals => {
+ :f => f,
+ :continue_editing => false,
+ :delete_title => t('admin.blogs.categories.delete')
+ } %>
+<% end %> \ No newline at end of file
diff --git a/app/views/admin/blog/categories/_sortable_list.html.erb b/app/views/admin/blog/categories/_sortable_list.html.erb
new file mode 100644
index 0000000..df6a39b
--- /dev/null
+++ b/app/views/admin/blog/categories/_sortable_list.html.erb
@@ -0,0 +1,7 @@
+<ul id='sortable_list'>
+ <%= render :partial => 'category', :collection => @blog_categories %>
+</ul>
+<%= render :partial => "/shared/admin/sortable_list",
+ :locals => {
+ :continue_reordering => (defined?(continue_reordering) ? continue_reordering : true)
+ } %>
diff --git a/app/views/admin/blog/categories/edit.html.erb b/app/views/admin/blog/categories/edit.html.erb
new file mode 100644
index 0000000..42509a2
--- /dev/null
+++ b/app/views/admin/blog/categories/edit.html.erb
@@ -0,0 +1 @@
+<%= render :partial => "form" %> \ No newline at end of file
diff --git a/app/views/admin/blog/categories/index.html.erb b/app/views/admin/blog/categories/index.html.erb
new file mode 100644
index 0000000..824b1c3
--- /dev/null
+++ b/app/views/admin/blog/categories/index.html.erb
@@ -0,0 +1,30 @@
+<%= render :partial => '/admin/blog/submenu' %>
+<div id='records'>
+ <% if searching? %>
+ <h2><%= t('admin.search_results_for', :query => params[:search]) %></h2>
+ <% if @blog_categories.any? %>
+ <%= render :partial => "blog_categories",
+ :collection => @blog_categories %>
+ <% else %>
+ <p><%= t('admin.search_no_results') %></p>
+ <% end %>
+ <% else %>
+ <% if @blog_categories.any? %>
+ <%= will_paginate @blog_categories,
+ :previous_label => '&laquo;',
+ :next_label => '&raquo;' %>
+
+ <%= render :partial => "sortable_list" %>
+
+ <%= will_paginate @blog_categories,
+ :previous_label => '&laquo;',
+ :next_label => '&raquo;' %>
+ <% else %>
+ <p>
+ <strong>
+ <%= t('.no_items_yet') %>
+ </strong>
+ </p>
+ <% end %>
+ <% end %>
+</div> \ No newline at end of file
diff --git a/app/views/admin/blog/categories/new.html.erb b/app/views/admin/blog/categories/new.html.erb
new file mode 100644
index 0000000..42509a2
--- /dev/null
+++ b/app/views/admin/blog/categories/new.html.erb
@@ -0,0 +1 @@
+<%= render :partial => "form" %> \ No newline at end of file