-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #384 from linuxfrorg/3186_admin_blocked_images
List blocked images
- Loading branch information
Showing
8 changed files
with
59 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# encoding: UTF-8 | ||
class Admin::ImagesController < AdminController | ||
|
||
def index | ||
@images = Image.blocked(100) | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# encoding: utf-8 | ||
%h1 Images externes bloquées | ||
|
||
- if @images.any? | ||
%p Liste des images externes bloquées : | ||
- else | ||
%p Aucune image externe bloquée actuellement | ||
|
||
%ul | ||
- @images.each do |image| | ||
%li | ||
%pre | ||
= "#{image.link.html_safe} #{'⚠ image non bloquée' unless image.blocked}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,15 @@ | ||
=h1 "Administration" | ||
%ul | ||
%li= link_to "Applications de l’API", admin_applications_path | ||
%li= link_to "Bannières", admin_banners_path | ||
%li= link_to "Débogage", "/admin/debug" | ||
%li= link_to "Derniers comptes", admin_accounts_path | ||
%li= link_to "Réponses de refus (pour les dépêches)", admin_responses_path | ||
%li= link_to "Sections (pour les dépêches)", admin_sections_path | ||
%li= link_to "Forums", admin_forums_path | ||
%li= link_to "Catégories (pour le suivi)", admin_categories_path | ||
%li= link_to "Bannières", admin_banners_path | ||
%li= link_to "Logo", admin_logo_path | ||
%li= link_to "Feuilles de style", admin_stylesheet_path | ||
%li= link_to "Forums", admin_forums_path | ||
%li= link_to "Images", admin_images_path | ||
%li= link_to "Logo", admin_logo_path | ||
%li= link_to "Réponses de refus (pour les dépêches)", admin_responses_path | ||
%li= link_to "Sections (pour les dépêches)", admin_sections_path | ||
%li= link_to "Sites amis", admin_friend_sites_path | ||
%li= link_to "Pages statiques", admin_pages_path | ||
%li= link_to "Applications de l’API", admin_applications_path | ||
%li= link_to "Débogage", "/admin/debug" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,15 @@ | ||
%h1 Images externes les plus récentes | ||
|
||
- @images.each do |image| | ||
.image | ||
= image.to_html.html_safe | ||
= button_to "Bloquer", moderation_image_path(image.encoded_link), method: :delete, data: { confirm: "Confirmez‑vous vouloir bloquer cette image ?" } | ||
- if @images.any? | ||
%p Images externes les plus récentes | ||
%ul | ||
- @images.each do |image| | ||
%li.image | ||
- if image.blocked | ||
%pre #{image.link.html_safe} | ||
= "⛔ Bloquée" | ||
- else | ||
= image.to_html.html_safe | ||
= button_to "Bloquer", moderation_image_path(image.encoded_link), method: :delete, data: { confirm: "Confirmez‑vous vouloir bloquer cette image ?" } | ||
- else | ||
%p Aucune image externe actuellement |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters