Commit e2108aed0756797ce8a65febc70073067b4f7b56

Authored by Joenio Costa
Committed by Daniela Feitosa
1 parent 230ff308

Fix width of Blog description field in CSS

(ActionItem1949)
app/views/cms/_blog.rhtml
... ... @@ -50,7 +50,7 @@
50 50 %>
51 51 </div>
52 52  
53   -<%= labelled_form_field(_('Description:'), text_area(:article, :body, :cols => 64, :rows => 10)) %>
  53 +<%= labelled_form_field(_('Description:'), text_area(:article, :body, :rows => 10)) %>
54 54  
55 55 <%= labelled_form_field(_('How to display posts:'), f.select(:visualization_format, [ [ _('Full post'), 'full'], [ _('First paragraph'), 'short'] ])) %>
56 56  
... ...
app/views/cms/edit.rhtml
1 1 <%= error_messages_for 'article' %>
2 2  
3 3 <div class='<%= (environment.enabled?('media_panel') ? 'with_media_panel' : 'no_media_panel') %>'>
4   -<% labelled_form_for 'article', @article, :html => { :multipart => true } do |f| %>
  4 +<% labelled_form_for 'article', @article, :html => { :multipart => true, :class => @type } do |f| %>
5 5  
6 6 <%= hidden_field_tag("type", @type) if @type %>
7 7  
... ...
public/stylesheets/application.css
... ... @@ -2703,7 +2703,6 @@ div#activation_enterprise div {
2703 2703 text-align: center;
2704 2704 }
2705 2705  
2706   -
2707 2706 .formfieldline {
2708 2707 padding: 3px 0px;
2709 2708 }
... ... @@ -2740,6 +2739,9 @@ div#activation_enterprise div {
2740 2739 .formfield textarea {
2741 2740 padding: 2px 0px 0px 5px;
2742 2741 }
  2742 +.Blog .formfield textarea {
  2743 + width: 99%;
  2744 +}
2743 2745  
2744 2746 .formfield.type-radio input,
2745 2747 .formfield.type-checkbox input {
... ...
test/functional/cms_controller_test.rb
... ... @@ -1610,4 +1610,12 @@ class CmsControllerTest &lt; Test::Unit::TestCase
1610 1610 assert_tag :tag => 'textarea', :attributes => { :class => 'mceEditor' }
1611 1611 end
1612 1612  
  1613 + should 'identify form with classname of edited article' do
  1614 + [Blog, TinyMceArticle, Forum].each do |klass|
  1615 + a = fast_create(klass, :profile_id => profile.id)
  1616 + get :edit, :profile => profile.identifier, :id => a.id
  1617 + assert_tag :tag => 'form', :attributes => {:class => klass.to_s}
  1618 + end
  1619 + end
  1620 +
1613 1621 end
... ...