[fix] Line break in package changelog

This commit is contained in:
kload 2014-05-09 21:54:45 +00:00
parent abcd9afafa
commit b1857d5f8e
2 changed files with 6 additions and 2 deletions

View file

@ -952,6 +952,10 @@ app = Sammy('#main', function (sam) {
// System update & upgrade
sam.get('#/tools/update', function (c) {
c.api('/update', function(data) {
packagesLength = data.packages.length;
for(var i = 0; i < packagesLength; i++) {
data.packages[i].changelog = data.packages[i].changelog.replace(/\n/g, '<br />');
}
c.view('tools/tools_update', data);
}, 'PUT');
});

View file

@ -16,12 +16,12 @@
{{#packages}}
<div class="list-group-item">
<h3 class="list-group-item-heading">{{name}} <small>{{fullname}}</small></h3>
<p class="list-group-item-text">{{changelog}}</p>
<p class="list-group-item-text">{{{changelog}}}</p>
</div>
{{/packages}}
<div class="br"></div>
<a href="#/tools/upgrade/packages" class="btn btn-default">Upgrade packages</a>
<a href="#/tools/upgrade/packages" class="btn btn-success">Upgrade packages</a>
{{else}}
There is no packages to upgrade.
{{/if}}