Commit 51b6b0eb authored by David Foucher's avatar David Foucher

Merge branch...

Merge branch '30-les-commentaires-ce-sont-pas-dans-les-sources-quand-aucune-modification-en-cours' into 'master'

Resolve "Les commentaires ne sont pas dans les sources quand aucune modification en cours"

Closes #30

See merge request !79
parents 00ca3138 94284fb1
Pipeline #3651 passed with stage
in 1 minute and 24 seconds
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
<div v-show="ruleComment != ''"> <div v-show="ruleComment != ''">
<div id="rule-comment" class="mt-3 card collapse"> <div id="rule-comment" class="mt-3 card collapse">
<div class="card-body"> <div class="card-body">
<pre id="rule_comment_pre" v-html="this.ruleComment"></pre> <pre id="rule_comment_pre" v-html="ruleComment"></pre>
</div> </div>
</div> </div>
</div> </div>
...@@ -221,21 +221,19 @@ ...@@ -221,21 +221,19 @@
}) })
}, },
getContentRule: function(){ getContentRule: function(){
if(this.commit_id) { let data_param = {
let data_param = { 'file': this.filename,
'file': this.filename, 'commit_id': this.commit_id?this.commit_id : 'HEAD',
'commit_id': this.commit_id, }
} this.$http
this.$http .get('/source/file', {params: data_param})
.get('/source/file', {params: data_param}) .then(response => {
.then(response => { this.content = response.body;
this.content = response.body; return true;
return true; }, response => {
}, response => { if(response.status == 500) this.content = '';
if(response.status == 500) this.content = ''; return false;
return false; })
})
} else this.content = this.ruleData;
}, },
auth_to_edit: function () { auth_to_edit: function () {
this.error_flags.noUser = false; this.error_flags.noUser = false;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment