diff --git a/plugins/community_track/test/functional/community_track_plugin_content_viewer_controller_test.rb b/plugins/community_track/test/functional/community_track_plugin_content_viewer_controller_test.rb index 576bd8f..151f409 100644 --- a/plugins/community_track/test/functional/community_track_plugin_content_viewer_controller_test.rb +++ b/plugins/community_track/test/functional/community_track_plugin_content_viewer_controller_test.rb @@ -56,7 +56,7 @@ class ContentViewerControllerTest < ActionController::TestCase end should 'show tools for a step' do - Article.create!(:profile => @profile, :name => 'article', :parent => @step) + TinyMceArticle.create!(:profile => @profile, :name => 'article', :parent => @step) get :view_page, @step.url assert_tag :tag => 'div', :attributes => { :class => 'tools' }, :descendant => { :tag => 'div', :attributes => { :class => 'item' } } end diff --git a/plugins/community_track/views/content_viewer/step.rhtml b/plugins/community_track/views/content_viewer/step.rhtml index a637b59..53c3b3f 100644 --- a/plugins/community_track/views/content_viewer/step.rhtml +++ b/plugins/community_track/views/content_viewer/step.rhtml @@ -9,17 +9,20 @@
<%= step.body %>
-

<%= _("Tool") %>

<% if step.allow_create?(user) && !step.tool && step.tool_class %> +

<%= _("Tool") %>

<%= _('Create %s' % step.tool_class.short_description) %>
<% end %> -
-
-
- <%= link_to(step.tool.name, step.tool.view_url, :class=>"button with-text icon-new icon-new#{step.tool.class.icon_name}") if step.tool %> + <% if step.tool %> +

<%= _("Tool") %>

+
+
+
+ <%= link_to(step.tool.name, step.tool.view_url, :class=>"button with-text icon-new icon-new#{step.tool.class.icon_name}") %> +
-
-
+
+ <% end %>
-- libgit2 0.21.2