# HG changeset patch # User Alexandre Segura # Date 1489757769 -3600 # Node ID 2bed73d2685448af6b5f35685ddf0ff744b54acb # Parent d57f95ee911536413a6095f2b871cd86051a58e2 Change placeholder depending on metacategory. diff -r d57f95ee9115 -r 2bed73d26854 src/iconolab/templates/iconolab/detail_image.html --- a/src/iconolab/templates/iconolab/detail_image.html Fri Mar 17 14:01:36 2017 +0100 +++ b/src/iconolab/templates/iconolab/detail_image.html Fri Mar 17 14:36:09 2017 +0100 @@ -173,7 +173,8 @@ template: template, data: function() { return { - active: null + active: null, + placeholder: 'Ajouter mon commentaire…' } }, watch: { @@ -195,6 +196,14 @@ return classes; } + }, + methods: { + setActive: function(active, placeholder) { + Object.assign(this, { + active: active, + placeholder: placeholder || 'Ajouter mon commentaire…' + }); + } } }); }); diff -r d57f95ee9115 -r 2bed73d26854 src/iconolab/templates/partials/comment_form.html --- a/src/iconolab/templates/partials/comment_form.html Fri Mar 17 14:01:36 2017 +0100 +++ b/src/iconolab/templates/partials/comment_form.html Fri Mar 17 14:36:09 2017 +0100 @@ -18,7 +18,8 @@ {% if 'request_for_contribution' in metacategories %} @@ -26,7 +27,8 @@ {% if 'reference' in metacategories %} @@ -34,14 +36,16 @@ {% if 'agree' in metacategories %} @@ -49,7 +53,8 @@ {% if 'disagree' in metacategories %} @@ -64,7 +69,7 @@ + v-bind:placeholder="placeholder">