From 690b2f2b2e9b56142b32c36ca5898e9319cf7a61 Mon Sep 17 00:00:00 2001 From: did Date: Sat, 2 Jul 2011 04:48:21 -0700 Subject: [PATCH] fix a bug when filling in the content type name --- app/views/admin/content_types/edit.html.haml | 6 +++--- doc/TODO | 19 +++++++++---------- .../step_definitions/content_types_steps.rb | 6 +++++- .../stylesheets/admin/formtastic_changes.css | 2 ++ 4 files changed, 19 insertions(+), 14 deletions(-) diff --git a/app/views/admin/content_types/edit.html.haml b/app/views/admin/content_types/edit.html.haml index 053284da..94dbc17f 100644 --- a/app/views/admin/content_types/edit.html.haml +++ b/app/views/admin/content_types/edit.html.haml @@ -7,8 +7,8 @@ = render 'admin/shared/actions/contents' - content_for :buttons do - = admin_button_tag :show_items, admin_contents_url(@content_type.slug), :class => 'show' - = admin_button_tag :new_item, new_admin_content_url(@content_type.slug), :class => 'new' + = admin_button_tag :show_items, admin_contents_url(@content_type.slug_was), :class => 'show' + = admin_button_tag :new_item, new_admin_content_url(@content_type.slug_was), :class => 'new' %p!= t('.help') @@ -16,6 +16,6 @@ = render 'form', :f => f - = render 'admin/shared/form_actions', :back_url => admin_contents_url(@content_type.slug), :button_label => :update + = render 'admin/shared/form_actions', :back_url => admin_contents_url(@content_type.slug_was), :button_label => :update = render 'admin/custom_fields/edit_field' \ No newline at end of file diff --git a/doc/TODO b/doc/TODO index a7d0d6bb..bf9ea605 100644 --- a/doc/TODO +++ b/doc/TODO @@ -53,22 +53,21 @@ x check hosting: x deploy => okay x unable to set a new subdomain x liquid tag: Date.today (now), add a test to compare 2 dates -x better ui: increase text field length (auto sizable ?) + refactor error message +? better ui: increase text field length (auto sizable ?) + refactor error message + - trigger refresh at startup +x bugs + x heroku: unable to upload a new file => okay + x import => okay + x delete an item => okay +- bug: duplicate fields (new entry) when errors in the content type form +- overide sort for contents +- rake task to import a remote template - tinyMCE => fullscreen - icon for redirection page in the pages section (back-office) -- rake task to import a remote template -- bug: duplicate fields (new entry) when errors in the content type form - test and/or convert existing templates (the 2 of the themes section) - => MERGE -- bugs - - heroku: unable to upload a new file => okay - - import => okay - - delete an item => okay -- overide sort for contents - BACKLOG: - custom_fields: diff --git a/features/step_definitions/content_types_steps.rb b/features/step_definitions/content_types_steps.rb index c1ba0132..13765d49 100644 --- a/features/step_definitions/content_types_steps.rb +++ b/features/step_definitions/content_types_steps.rb @@ -36,4 +36,8 @@ When %r{^I change the presentation of the "([^"]*)" model by grouping items by " field = content_type.content_custom_fields.detect { |f| f.label == field } content_type.group_by_field_name = field._name content_type.save.should be_true -end \ No newline at end of file +end + +Then /^I should not see (\d+) times the "([^"]*)" field$/ do |n, field| + page.all(:css, "#content_#{field.underscore.downcase}_input").size.should == n +end diff --git a/public/stylesheets/admin/formtastic_changes.css b/public/stylesheets/admin/formtastic_changes.css index 029ba54c..fa0db65c 100644 --- a/public/stylesheets/admin/formtastic_changes.css +++ b/public/stylesheets/admin/formtastic_changes.css @@ -465,8 +465,10 @@ form.formtastic fieldset ol li.has-many ul li.added span.actions button { form.formtastic fieldset ol li.has-many ul li.sep { border-top: 1px solid #ccc; height: 2px; + padding: 0px; margin: 5px 0 7px; width: 433px; + background: none; } form.formtastic fieldset ol li.has-many ul li.template {}