Skip to content

Commit bba8f03

Browse files
committed
adding tags to public
1 parent c457554 commit bba8f03

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

qiita_pet/templates/list_studies.html

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,6 @@
141141
result += ' <span class="label label-' + level + '">' + tag + '</span>';
142142
}
143143
return result
144-
145144
}, targets: [2]},
146145
{"render": function ( data, type, row, meta ) {
147146
var glyph = 'remove';
@@ -193,7 +192,19 @@
193192
}, targets: [1]},
194193
// render the title cell
195194
{"render": function ( data, type, row, meta ) {
196-
return "<a href='#' data-toggle='modal' data-target='#study-abstract-modal' onclick=\"fillAbstract('studies-table', "+ meta.row +")\"><span class='glyphicon glyphicon-file' aria-hidden='true'></span></a> | <a href='{% raw qiita_config.portal_dir %}/study/description/"+ row.study_id +"' id='study"+ meta.row +"-title'>"+ data +"</a>";
195+
result = "<a href='#' data-toggle='modal' data-target='#study-abstract-modal' onclick=\"fillAbstract('studies-table', "+ meta.row +")\">" +
196+
"<span class='glyphicon glyphicon-file' aria-hidden='true'></span></a> | <a href='{% raw qiita_config.portal_dir %}/study/description/" +
197+
row.study_id +"' id='study"+ meta.row +"-title'>"+ data +"</a>";
198+
// adding tags
199+
for (var i in row['study_tags']) {
200+
var tag = row['study_tags'][i];
201+
var level = 'info';
202+
if (jQuery.inArray(tag, admin_tags) >= 0) {
203+
level = 'warning';
204+
}
205+
result += ' <span class="label label-' + level + '">' + tag + '</span>';
206+
}
207+
return result
197208
}, targets: [2]},
198209
],
199210
"language": {

0 commit comments

Comments
 (0)