Don’t show new annotation/comment form if allegations phase is not open

This commit is contained in:
Amaia Castro
2017-01-16 17:42:32 +01:00
parent 819c9efcc3
commit 65fcd83ee5
6 changed files with 24 additions and 19 deletions

View File

@@ -1,6 +1,7 @@
// Overrides and adds customized javascripts in this file
// Read more on documentation:
// Read more on documentation:
// * English: https://github.com/consul/consul/blob/master/CUSTOMIZE_EN.md#javascript
// * Spanish: https://github.com/consul/consul/blob/master/CUSTOMIZE_ES.md#javascript
//
//

View File

@@ -122,17 +122,6 @@ App.LegislationAnnotatable =
)
current_user_id = $('html').data('current-user-id')
if current_user_id == ""
annotator.ui.editor.Editor.template = [
'<div class="annotator-outer annotator-editor annotator-hide">',
' <form class="annotator-widget">',
' ' + _t('Unregistered'),
' <div class="annotator-controls">',
' <a href="#cancel" class="annotator-cancel">' + _t('Cancel') + '</a>',
' </div>',
' </form>',
'</div>'
].join('\n')
$(".legislation-annotatable").each ->
$this = $(this)
@@ -146,8 +135,8 @@ App.LegislationAnnotatable =
ann["legislation_draft_version_id"] = ann_id
ann.permissions = ann.permissions || {}
ann.permissions.admin = []
.include(annotator.ui.main, {
element: this,
.include(annotator.ui.main, {
element: this,
viewerExtensions: [App.LegislationAnnotatable.viewerExtension],
editorExtensions: [App.LegislationAnnotatable.editorExtension]
})