Browse Source

Moderation lines are now clickable, to edit the event/orga

remotes/origin/master
echarp 2 years ago
parent
commit
99c10329a6
  1. 3
      app/assets/javascripts/list.js.coffee
  2. 9
      app/assets/stylesheets/list.sass
  3. 7
      app/views/moderations/_event.html.haml
  4. 7
      app/views/moderations/_orga.html.haml
  5. 16
      app/views/moderations/index.html.haml
  6. 1
      config/locales/views/de.yml
  7. 1
      config/locales/views/en.yml
  8. 1
      config/locales/views/fr.yml
  9. 1
      config/locales/views/nl.yml
  10. 1
      config/locales/views/pt-BR.yml
  11. 2
      public/assets/.sprockets-manifest-1ecf1692b9cfa13c0271559a479b9688.json
  12. 33487
      public/assets/active_admin-49a68901507c104dca8f1ff5b8f896d66ff3f01c6548fa97b35458682cc87258.js
  13. BIN
      public/assets/active_admin-49a68901507c104dca8f1ff5b8f896d66ff3f01c6548fa97b35458682cc87258.js.gz
  14. 4
      public/assets/active_admin-f6632bfe39653d00fd5f390bf251c9344960cc1bed7cea08b0b82fb8c6735b42.css
  15. BIN
      public/assets/active_admin-f6632bfe39653d00fd5f390bf251c9344960cc1bed7cea08b0b82fb8c6735b42.css.gz
  16. 34
      public/assets/application-a4d60dccf0d297932b53e26946beba02cd345bb4e3a19f00389c6cc5bfc7d86f.css
  17. BIN
      public/assets/application-a4d60dccf0d297932b53e26946beba02cd345bb4e3a19f00389c6cc5bfc7d86f.css.gz
  18. 53462
      public/assets/application-e50171310a954b929b1a5b1ebb0e0ee81ba69b73ed1b78aa610199832fe3504b.js
  19. BIN
      public/assets/application-e50171310a954b929b1a5b1ebb0e0ee81ba69b73ed1b78aa610199832fe3504b.js.gz
  20. 1
      public/assets/list-23ebe2149035b2adc455ae97b811ad1b615cc5ab5b0b8046dcf590c120012281.css
  21. BIN
      public/assets/list-23ebe2149035b2adc455ae97b811ad1b615cc5ab5b0b8046dcf590c120012281.css.gz
  22. 38
      public/assets/list-36f999a19ad2efdd776921f8c8a1cbcc168ab9735fec39326a040907b72f6f2c.js
  23. BIN
      public/assets/list-36f999a19ad2efdd776921f8c8a1cbcc168ab9735fec39326a040907b72f6f2c.js.gz
  24. 24
      public/assets/setup_tinymce-4d67f72c3f9907bfab45a284c184ed519af90e54f68ffe472bfb30fbe125f1e6.js
  25. BIN
      public/assets/setup_tinymce-4d67f72c3f9907bfab45a284c184ed519af90e54f68ffe472bfb30fbe125f1e6.js.gz

3
app/assets/javascripts/list.js.coffee

@ -22,5 +22,6 @@ $(document).on 'ajax:success', '.pagination .next a', (event, data) ->
# Clicking on a table.list row
visit = (elt) =>
elt.closest('tr').click -> Turbolinks.visit elt.attr 'href'
elt.closest('tr').addClass('view').click ->
Turbolinks.visit elt.attr 'href'

9
app/assets/stylesheets/list.sass

@ -17,17 +17,16 @@ table
background-color: #def
tr:nth-child(even)
background-color: #eee
tr.view
cursor: pointer
&:hover
background-color: lightgrey
td
padding: 0.2em
text-align: left
&.kind, &.updated_at
text-align: center
html.js table.list tbody tr
cursor: pointer
&:hover
background-color: lightgrey
dl
dt
clear: left

7
app/views/moderations/_event.html.haml

@ -5,10 +5,6 @@
%td.region= event.region
%td= time_ago_in_words event.submission_time
%th.actions{ rowspan: 1 + event.notes.size }
= link_to edit_moderation_path event do
%em.fa.fa-edit
= t 'edit'
\-
= link_to validate_moderation_path event do
%em.fa.fa-thumbs-up
= t 'validate'
@ -24,6 +20,9 @@
= link_to new_moderation_note_path event do
%em.fa.fa-paperclip
= t '.createNote'
%td.view{ rowspan: 1 + event.notes.size }
= link_to edit_moderation_path event do
%em.fa.fa-arrow-circle-right
- event.notes.each do |note|
%tr

7
app/views/moderations/_orga.html.haml

@ -8,10 +8,6 @@
%td.region= orga.region
%td= time_ago_in_words orga.submission_time
%th.actions
= link_to edit_orga_path orga do
%em.fa.fa-edit
= t 'edit'
\-
= link_to validate_orga_path orga do
%em.fa.fa-thumbs-up
= t 'validate'
@ -19,3 +15,6 @@
= link_to cancel_orga_path orga do
%em.fa.fa-thumbs-down
= t 'refuse'
%td.view
= link_to edit_orga_path orga do
%em.fa.fa-arrow-circle-right

16
app/views/moderations/index.html.haml

@ -6,7 +6,7 @@
%table.list
%thead
%tr
%th(colspan='6')
%th(colspan='8')
%h3
%em.fa.fa-users
= Orga.model_name.human.pluralize @orgas.count
@ -14,7 +14,7 @@
- @orgas.group_by { |orga| orga.region.flag }.each do |code, orgas|
%thead
%tr
%td(colspan='6')
%td(colspan='8')
%h4
- if code.present?
= flag_icon code
@ -26,13 +26,13 @@
%th.city= Orga.human_attribute_name :city
%th.region= Orga.human_attribute_name :region
%th= Orga.human_attribute_name :submission_time
%th= t '.actions'
%th.view(colspan='3')
%tbody= render partial: 'orga', collection: orgas
%tfoot
%tr
%td(colspan='6')
%td(colspan='8')
:markdown
#{t '.rules'}
@ -43,7 +43,7 @@
%table.list
%thead
%tr
%th(colspan='6')
%th(colspan='8')
%h3
%em.fa.fa-calendar
= Event.model_name.human.pluralize @events.count
@ -51,7 +51,7 @@
- @events.group_by { |event| event.region.flag }.each do |code, events|
%thead
%tr
%td(colspan='6')
%td(colspan='8')
%h4
- if code.present?
= flag_icon code
@ -67,13 +67,13 @@
%th.city= Event.human_attribute_name :city
%th.region= Event.human_attribute_name :region
%th= Event.human_attribute_name :submission_time
%th.actions= t '.actions'
%th.view(colspan='3')
%tbody= render partial: 'event', collection: events
%tfoot
%tr
%td(colspan='6')
%td(colspan='8')
:markdown
#{t '.rules'}

1
config/locales/views/de.yml

@ -183,7 +183,6 @@ Veranstaltung zu ändern, um sie vollständiger, lesbarer oder attraktiver zu ge
title: Zu bestätigen
rules: Moderatoren, bitte [Moderation Empfehlungen](/pages/rules)
Lesen und Berücksichtigen.
actions: Aktionen
event:
posted_by: Gepostet von %{author} am %{date}
date: Datum

1
config/locales/views/en.yml

@ -175,7 +175,6 @@ it more readable or agreable."
title: To moderate
rules: Moderators, thanks for reading and taking notice of [moderation
recommandations](/pages/rules).
actions: Actions
event:
posted_by: Created by %{author} on %{date}
date: Date

1
config/locales/views/fr.yml

@ -191,7 +191,6 @@ procédure à l'aide d'un [script](/adl-submit.py)"
title: À modérer
rules: Modérateurs, merci de lire et de tenir compte des [recommandations
de modération](/pages/rules).
actions: Actions
event:
posted_by: Posté par %{author} le %{date}
date: Date

1
config/locales/views/nl.yml

@ -186,7 +186,6 @@ te maken."
title: Evaluatie
rules: Moderators opgelet, aub. na het lezen rekening houden met
[aanbevelingen van moderatie](/pages/rules)
actions: Acties
event:
posted_by: Gepost door %{author} op %{date}
date: Datum

1
config/locales/views/pt-BR.yml

@ -168,7 +168,6 @@ completa, deixando o texto mais legível e agradável.
title: Para moderar
rules: Moderadores, obrigado por ler e tomar conhecimento das [recomendações
de moderação](/pages/rules).
actions: Ações
event:
posted_by: Criado por %{author} em %{date}
date: Data

2
public/assets/.sprockets-manifest-1ecf1692b9cfa13c0271559a479b9688.json

File diff suppressed because one or more lines are too long

33487
public/assets/active_admin-49a68901507c104dca8f1ff5b8f896d66ff3f01c6548fa97b35458682cc87258.js

File diff suppressed because one or more lines are too long

BIN
public/assets/active_admin-49a68901507c104dca8f1ff5b8f896d66ff3f01c6548fa97b35458682cc87258.js.gz

Binary file not shown.

4
public/assets/active_admin-f6632bfe39653d00fd5f390bf251c9344960cc1bed7cea08b0b82fb8c6735b42.css

File diff suppressed because one or more lines are too long

BIN
public/assets/active_admin-f6632bfe39653d00fd5f390bf251c9344960cc1bed7cea08b0b82fb8c6735b42.css.gz

Binary file not shown.

34
public/assets/application-a4d60dccf0d297932b53e26946beba02cd345bb4e3a19f00389c6cc5bfc7d86f.css

File diff suppressed because one or more lines are too long

BIN
public/assets/application-a4d60dccf0d297932b53e26946beba02cd345bb4e3a19f00389c6cc5bfc7d86f.css.gz

Binary file not shown.

53462
public/assets/application-e50171310a954b929b1a5b1ebb0e0ee81ba69b73ed1b78aa610199832fe3504b.js

File diff suppressed because one or more lines are too long

BIN
public/assets/application-e50171310a954b929b1a5b1ebb0e0ee81ba69b73ed1b78aa610199832fe3504b.js.gz

Binary file not shown.

1
public/assets/list-23ebe2149035b2adc455ae97b811ad1b615cc5ab5b0b8046dcf590c120012281.css

@ -0,0 +1 @@
.quantity{text-align:right !important;white-space:nowrap}table{clear:both;border-spacing:2px}table th{font-weight:normal}table th a:link,table th a:visited{color:#003;padding:0 0.6em}table.list tbody tr:nth-child(odd){background-color:#def}table.list tbody tr:nth-child(even){background-color:#eee}table.list tbody tr.view{cursor:pointer}table.list tbody tr.view:hover{background-color:lightgrey}table.list td{padding:0.2em;text-align:left}table.list td.kind,table.list td.updated_at{text-align:center}dl dt{clear:left;float:left;padding:0.2em 1em;min-width:12em;text-align:right}dl dd{padding:0.2em 1em;text-align:left}dl dd.quantity{padding-right:16em}dl dd h3{display:inline}ul.counters{text-align:center}ul.counters li{display:inline}ul.counters li a:link,ul.counters li a:visited{color:white;padding:0.4em 1em;display:inline-block;box-shadow:0 0 2px black;border-radius:0.4em;background-color:#258}.edit_link:link,.delete_link:link{display:none}

BIN
public/assets/list-23ebe2149035b2adc455ae97b811ad1b615cc5ab5b0b8046dcf590c120012281.css.gz

Binary file not shown.

38
public/assets/list-36f999a19ad2efdd776921f8c8a1cbcc168ab9735fec39326a040907b72f6f2c.js

@ -0,0 +1,38 @@
(function() {
var visit;
$(document).on('turbolinks:load', function() {
$('table.list td.view a').each(function() {
return visit($(this));
});
return $('.pagination .next a').attr('data-remote', true).each(function() {
return $(document).scroll((function(_this) {
return function() {
if ($(_this).visible(true, true)) {
return $(_this).click().parents('.pagination').hide();
}
};
})(this));
});
});
$(document).on('ajax:success', '.pagination .next a', function(event, data) {
var next;
$(this).parents('tfoot').prev().append($('tbody tr', data)).find('td.view a').each(function() {
return visit($(this));
});
next = $('.pagination .next a', data).attr('href');
if (next != null) {
return $(this).attr('href', next).parents('.pagination').show();
}
});
visit = (function(_this) {
return function(elt) {
return elt.closest('tr').addClass('view').click(function() {
return Turbolinks.visit(elt.attr('href'));
});
};
})(this);
}).call(this);

BIN
public/assets/list-36f999a19ad2efdd776921f8c8a1cbcc168ab9735fec39326a040907b72f6f2c.js.gz

Binary file not shown.

24
public/assets/setup_tinymce-4d67f72c3f9907bfab45a284c184ed519af90e54f68ffe472bfb30fbe125f1e6.js

@ -0,0 +1,24 @@
(function() {
$(document).on('turbolinks:load', function() {
return tinyMCE.init({
width: '100%',
height: '40em',
menubar: false,
branding: false,
language: 'fr_FR',
selector: 'input.description',
content_css: '/assets/application-a4d60dccf0d297932b53e26946beba02cd345bb4e3a19f00389c6cc5bfc7d86f.css',
entity_encoding: 'raw',
add_unload_trigger: true,
browser_spellcheck: true,
style_formats_autohide: true,
toolbar: [' cut copy paste | undo redo | link image media charmap table | code visualblocks searchreplace', ' removeformat bold italic strikethrough superscript subscript | bullist numlist outdent indent | alignleft aligncenter alignright alignjustify alignnone'],
plugins: 'lists advlist autolink link image charmap paste print preview table fullscreen searchreplace media insertdatetime visualblocks wordcount code'
});
});
$(document).on('turbolinks:before-cache', function() {
return tinymce.remove();
});
}).call(this);

BIN
public/assets/setup_tinymce-4d67f72c3f9907bfab45a284c184ed519af90e54f68ffe472bfb30fbe125f1e6.js.gz

Binary file not shown.
Loading…
Cancel
Save