Allow possibility to disable user notification when publishing

This commit is contained in:
Nicolas Le Goff
2014-08-07 12:24:48 +02:00
parent c577209283
commit 29972fc9d9
2 changed files with 12 additions and 4 deletions

View File

@@ -269,16 +269,22 @@ return call_user_func_array(function(Application $app) {
'type' => \registry::TYPE_BOOLEAN, 'type' => \registry::TYPE_BOOLEAN,
'name' => 'GV_enable_push_authentication', 'name' => 'GV_enable_push_authentication',
'comment' => _('Enable Forcing authentication to see push content'), 'comment' => _('Enable Forcing authentication to see push content'),
'help' => _('Adds an option to the push form submission to restrict push recipient(s) to Phraseanet users only.'), 'help' => _('Adds an option to the push form submission to restrict push recipient(s) to Phraseanet users only.'),
'default' => false 'default' => false
), ),
array( array(
'type' => \registry::TYPE_BOOLEAN, 'type' => \registry::TYPE_BOOLEAN,
'name' => 'GV_force_push_authentication', 'name' => 'GV_force_push_authentication',
'comment' => _('Set force authentication option to see push content as mandatory'), 'comment' => _('Set force authentication option to see push content as mandatory'),
'help' => _('Disallow the possibility for the end user to disable push authentication'), 'help' => _('Disallow the possibility for the end user to disable push authentication'),
'default' => false 'default' => false
), ),
array(
'type' => \registry::TYPE_BOOLEAN,
'name' => 'GV_enable_feed_notification',
'comment' => _('Enable possibility to notify users when publishing a new feed entry'),
'default' => true
),
array( array(
'type' => \registry::TYPE_STRING, 'type' => \registry::TYPE_STRING,
'name' => 'GV_adminMail', 'name' => 'GV_adminMail',

View File

@@ -39,8 +39,10 @@
{% set title = publishing.basket().getName() %} {% set title = publishing.basket().getName() %}
{% set desc = publishing.basket().getDescription() %} {% set desc = publishing.basket().getDescription() %}
{% endif %} {% endif %}
<input class="required_text checkbox" type="checkbox" name="notify" id="feed_add_notify" value="1" /> {% if app["phraseanet.registry"].get("GV_enable_feed_notification") %}
<label for="feed_add_notify">{% trans 'Notify users about this publication' %}</label><br/> <input class="required_text checkbox" type="checkbox" name="notify" id="feed_add_notify" value="1" />
<label for="feed_add_notify">{% trans 'Notify users about this publication' %}</label><br/>
{% endif %}
<label for="feed_add_title">{% trans 'publication : titre' %}</label> <label for="feed_add_title">{% trans 'publication : titre' %}</label>
<input class="required_text" type="text" name="title" id="feed_add_title" value="{{title}}" /> <input class="required_text" type="text" name="title" id="feed_add_title" value="{{title}}" />
<label for="feed_add_subtitle">{% trans 'publication : sous titre' %}</label> <label for="feed_add_subtitle">{% trans 'publication : sous titre' %}</label>