app/views/thredded/theme_previews/show.html.erb in thredded-0.2.2 vs app/views/thredded/theme_previews/show.html.erb in thredded-0.3.0

- old
+ new

@@ -21,27 +21,27 @@ <%= render 'thredded/topics/form', messageboard: @messageboard, topic: @new_topic, css_class: 'thredded--is-compact', placeholder: 'Start a New Topic' %> - <%= render @decorated_topics %> + <%= render @topics %> <% end %> <footer> <%= paginate @topics %> </footer> <br> - <%= render 'section_title', label: 'topics#show', href: messageboard_topic_posts_path(@messageboard, @topic) %> - <%= content_tag_for :section, @topic, class: "thredded--thredded--main-section #{@user_topic.css_class}" do %> - <%= render 'thredded/topics_common/header', topic: @topic %> + <%= render 'section_title', label: 'topics#show', href: @topic.path %> + <%= content_tag :section, id: dom_id(@topic), class: ['thredded--thredded--main-section', topic_css_classes(@topic)] do %> + <%= render 'thredded/topics/header', topic: @topic %> <%= render @posts %> <%= render 'thredded/posts/form', messageboard: @messageboard, topic: @topic, post: @new_post, - button_text: 'Submit Reply' + button_text: t('thredded.posts.form.create_btn') %> <% end %> <%= render 'section_title', label: 'topics#new', href: new_messageboard_topic_path(@messageboard) %> <%= render 'thredded/topics/form', @@ -55,11 +55,11 @@ <%= render 'thredded/posts/form', messageboard: @messageboard, topic: @topic, post: @post, - button_text: 'Update Post' + button_text: t('thredded.posts.form.update_btn') %> <% end %> <%= render 'section_title', label: 'private_topics#index', href: private_topics_path %> <%= content_tag :section, class: 'thredded--thredded--main-section private-topics' do %> @@ -70,39 +70,35 @@ <p><em>If the user has private topics:</em></p> <%= render 'thredded/private_topics/form', private_topic: @new_private_topic, css_class: 'thredded--is-compact', - placeholder: 'Start a New Private Topic', - button_text: 'Create New Private Topic' %> - <%= render @decorated_private_topics %> + placeholder: t('thredded.private_topics.form.title_placeholder_start') %> + <%= render @private_topics %> <% end %> <%= render 'section_title', label: 'private_topics#new', href: new_private_topic_path %> <section class="thredded--thredded--main-section"> <%= render 'thredded/private_topics/form', private_topic: @new_private_topic, - placeholder: 'New Private Topic Title', - button_text: 'Create New Private Topic' %> + placeholder: t('thredded.private_topics.form.title_placeholder_new') %> </section> <%= render 'section_title', label: 'private_topics#show', href: private_topic_path(@private_topic) %> <section class="thredded--thredded--main-section"> - <%= render 'thredded/topics_common/header', topic: @private_topic %> - <%= render @private_topic.posts.first(3) %> + <%= render 'thredded/private_topics/header', topic: @private_topic %> + <%= render @private_posts %> <%= render 'thredded/private_posts/form', topic: @private_topic, post: @private_post, - button_text: 'Submit Reply' + button_text: t('thredded.private_posts.form.create_btn') %> </section> <%= render 'section_title', label: 'preferences#edit', href: edit_messageboard_preferences_path(@messageboard) %> <%= content_tag :section, class: 'thredded--thredded--main-section preferences' do %> <%= render 'thredded/preferences/header' %> - <%= render 'thredded/preferences/form', - messageboard: @messageboard, - preference: @preference %> + <%= render 'thredded/preferences/form', preferences: @preferences %> <% end %> <%= render 'thredded/shared/currently_online' %> <% end %>