You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
930 B
22 lines
930 B
$(function(){
|
|
write_news()
|
|
});
|
|
function write_news(){
|
|
var news;
|
|
var new_news;
|
|
if (check_auth()){
|
|
news = get_news(3)
|
|
} else {
|
|
news = get_news(9)
|
|
}
|
|
|
|
for(var i=0; i < news.length; i++){
|
|
new_news = '<a href="/management/news/'+ news[i]['id'] +'" class="thumb pull-left m-r-sm"><img src="'+ news[i]['icon'] +'" class="img-circle"></a>' +
|
|
'<div class="clear" style="margin-bottom: 20px;">' +
|
|
'<small class="block text-muted label-small">' + news[i]['public_date'] + '</small>' +
|
|
'<p class="m-b-none" style="text-align: left;">' + news[i]['title'] + '</p>' +
|
|
'<a href="/management/news/'+ news[i]['id'] +'" class="btn btn-xs btn-warning m-t-xs">Посмотреть</a>' +
|
|
'</div>';
|
|
$('#news_block').append(new_news)
|
|
}
|
|
} |