Moderation lines are now clickable, to edit the event/orga
This commit is contained in:
parent
0effc83dff
commit
99c10329a6
@ -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'
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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'}
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Binary file not shown.
File diff suppressed because one or more lines are too long
Binary file not shown.
File diff suppressed because one or more lines are too long
Binary file not shown.
File diff suppressed because one or more lines are too long
Binary file not shown.
@ -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}
|
Binary file not shown.
@ -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);
|
Binary file not shown.
@ -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);
|
Binary file not shown.
Loading…
Reference in New Issue
Block a user