[enh] Show item date on security alert page.

This commit is contained in:
opi 2014-11-16 11:51:42 +01:00
parent 143928f7c7
commit e6f09d4a6f
2 changed files with 9 additions and 6 deletions

View file

@ -1606,12 +1606,12 @@ app = Sammy('#main', function (sam) {
guid: $('guid', v)[0].innerHTML, guid: $('guid', v)[0].innerHTML,
title: $('title', v)[0].innerHTML, title: $('title', v)[0].innerHTML,
url: $('link', v)[0].innerHTML, url: $('link', v)[0].innerHTML,
desc: $('description', v)[0].textContent desc: $('description', v)[0].textContent,
date: $('pubDate', v)[0].innerHTML.split(' +')[0],
} }
data.items.push(item); data.items.push(item);
}); });
console.log(data);
c.view('tools/tools_security_feed', data); c.view('tools/tools_security_feed', data);
}) })
.fail(function() { .fail(function() {

View file

@ -12,10 +12,13 @@
<div class="list-group-item"> <div class="list-group-item">
<!-- <a href="{{url}}" class="fa-chevron-right pull-right"></a> --> <!-- <a href="{{url}}" class="fa-chevron-right pull-right"></a> -->
<h2 class="list-group-item-heading"><a href="{{url}}">{{title}}</a></h2> <h2 class="list-group-item-heading"><a href="{{url}}">{{title}}</a></h2>
<div class="list-group-item-text">{{{desc}}}</div> <div class="list-group-item-text">
<p class="text-right"> <p class="pub-date"><em>{{date}}</em></p>
<a href="{{url}}" class="btn btn-default">{{t 'read_more'}}</a> {{{desc}}}
</p> <p class="text-right">
<a href="{{url}}" class="btn btn-default">{{t 'read_more'}}</a>
</p>
</div>
</div> </div>
{{/items}} {{/items}}
</div> </div>