diff --git a/app/controllers/posts_controller.rb b/app/controllers/posts_controller.rb index d572e052..12b3ab55 100644 --- a/app/controllers/posts_controller.rb +++ b/app/controllers/posts_controller.rb @@ -82,6 +82,7 @@ class PostsController < ApplicationController authorize post breadcrumb post.title.value, site_post_path(site, post, locale: locale), match: :exact breadcrumb 'posts.edit', '' + @moderation_queue = YAML.safe_load(File.read(Rails.root.join('db', 'seeds', 'moderation_queue.yaml'))) end def update diff --git a/app/views/moderation_queue/_comment_button_box.haml b/app/views/moderation_queue/_comment_button_box.haml index 99744088..13a9c8a3 100644 --- a/app/views/moderation_queue/_comment_button_box.haml +++ b/app/views/moderation_queue/_comment_button_box.haml @@ -4,10 +4,10 @@ -# parĂ¡metros de botones -# text, class, href - @btn_box_params = [[t('.text_pause'), 'btn-outline-secondary disabled', ''], - [t('.text_reject'), 'btn-outline-info', 'https://sutty.nl/'], - [t('.text_accept'), 'bg-blue white', 'https://sutty.nl/'], - [t('.text_reply'), 'btn-outline-dark', 'https://sutty.nl/'], - [t('.text_report'), 'btn-outline-danger', 'https://sutty.nl/']] + [t('.text_reject'), 'btn-outline-info', ''], + [t('.text_accept'), 'bg-blue white', ''], + [t('.text_reply'), 'btn-outline-dark', ''], + [t('.text_report'), 'btn-outline-danger', '']] - @btn_box_params.each do |btn| - @class = btn[1] diff --git a/app/views/moderation_queue/index.haml b/app/views/moderation_queue/index.haml index 0881add2..0c693d26 100644 --- a/app/views/moderation_queue/index.haml +++ b/app/views/moderation_queue/index.haml @@ -1,4 +1,3 @@ - @moderation_queue.each do |comment| = render 'comment', comment: comment --# %h1= comment['id'] \ No newline at end of file diff --git a/app/views/posts/_moderation_queue.haml b/app/views/posts/_moderation_queue.haml index 4b405bbb..c754d51d 100644 --- a/app/views/posts/_moderation_queue.haml +++ b/app/views/posts/_moderation_queue.haml @@ -1,3 +1,4 @@ .flex %h3.text-center.py-2 Comentarios - = render 'moderation_queue/comment' \ No newline at end of file + - @moderation_queue.each do |comment| + = render 'moderation_queue/comment', comment: comment \ No newline at end of file