small fixes
Oleg
committed Aug 24, 2011
commit cc4fe6d700fb8604a8489863da30358f437d103d
Showing 4
changed files with
6 additions
and 2 deletions
app/models/cms/category.rb
+1
-1
| @@ | @@ -9,7 +9,7 @@ class Cms::Category < ActiveRecord::Base |
| # -- Validations ---------------------------------------------------------- | |
| validates :label, | |
| :presence => true, | |
| - | :uniqueness => true |
| + | :uniqueness => { :scope => :categorized_type } |
| validates :categorized_type, | |
| :presence => true | |
app/views/cms_admin/categories/_show.html.erb
+1
-1
| @@ | @@ -3,7 +3,7 @@ |
| <div class='category' id="<%= dom_id(category)%>"> | |
| <% if read %> | |
| - | <%= link_to category.label, :category => category.label %> |
| + | <%= link_to category.label, "?#{{:category => category.label}.to_param}" %> |
| <% else %> | |
| <%= link_to category.label, edit_cms_admin_site_category_path(@site, category), :remote => true %> | |
| <%= link_to 'x', cms_admin_site_category_path(@site, category), :method => :delete, :remote => true, :confirm => t('.are_you_sure'), :class => 'delete' %> | |
app/views/cms_admin/files/index.html.erb
+2
-0
| @@ | @@ -1,6 +1,8 @@ |
| <%= link_to span_tag(t('.new_link')), new_cms_admin_site_file_path(@site), :class => 'big button' %> | |
| <h1><%= t('.title')%></h1> | |
| + | <%= render :partial => 'cms_admin/categories/index', :object => 'Cms::File' %> |
| + | |
| <ul class='list'> | |
| <% @files.each do |file| %> | |
| <li id='<%= dom_id(file) %>'> | |
app/views/cms_admin/pages/index.html.erb
+2
-0
| @@ | @@ -5,6 +5,8 @@ |
| <%= render :partial => 'cms_admin/sites/mirrors' %> | |
| <% end %> | |
| + | <%= render :partial => 'cms_admin/categories/index', :object => 'Cms::Page' %> |
| + | |
| <ul class='list sortable'> | |
| <%= render :partial => 'index_branch', :collection => @pages %> | |
| </ul> | |