mirror of
https://github.com/ail-project/ail-framework.git
synced 2024-11-30 01:37:17 +00:00
fix: [Search] tags display
This commit is contained in:
parent
5c67297dc8
commit
af1ff6225e
2 changed files with 5 additions and 2 deletions
|
@ -220,6 +220,7 @@ def get_more_search_result():
|
||||||
p_tags = r_serv_metadata.smembers('tag:'+path)
|
p_tags = r_serv_metadata.smembers('tag:'+path)
|
||||||
l_tags = []
|
l_tags = []
|
||||||
for tag in p_tags:
|
for tag in p_tags:
|
||||||
|
complete_tag = tag
|
||||||
tag = tag.split('=')
|
tag = tag.split('=')
|
||||||
if len(tag) > 1:
|
if len(tag) > 1:
|
||||||
if tag[1] != '':
|
if tag[1] != '':
|
||||||
|
@ -231,7 +232,7 @@ def get_more_search_result():
|
||||||
else:
|
else:
|
||||||
tag = tag[0]
|
tag = tag[0]
|
||||||
|
|
||||||
l_tags.append(tag)
|
l_tags.append( (tag, complete_tag) )
|
||||||
list_tags.append(l_tags)
|
list_tags.append(l_tags)
|
||||||
|
|
||||||
to_return = {}
|
to_return = {}
|
||||||
|
|
|
@ -201,7 +201,9 @@
|
||||||
var curr_preview = data.preview_array[i].replace(/\"/g, "\'");
|
var curr_preview = data.preview_array[i].replace(/\"/g, "\'");
|
||||||
var tag = ""
|
var tag = ""
|
||||||
for(j=0; j<data.list_tags[i].length; j++) {
|
for(j=0; j<data.list_tags[i].length; j++) {
|
||||||
tag = tag + "<span class=\"label label-" + data.bootstrap_label[j % 5] + " pull-left\">" + data.list_tags[j] + "</span>"
|
tag = tag + "<a href=\"{{ url_for('Tags.get_tagged_paste') }}?ltags=" + data.list_tags[i][j][1] + ">"
|
||||||
|
+ "<span class=\"label label-" + data.bootstrap_label[j % 5] + " pull-left\">" + data.list_tags[i][j][0]
|
||||||
|
+ "</span>" + "</a>"
|
||||||
}
|
}
|
||||||
search_table.row.add( [
|
search_table.row.add( [
|
||||||
init_num_of_elements_in_table+((offset))+i+1,
|
init_num_of_elements_in_table+((offset))+i+1,
|
||||||
|
|
Loading…
Reference in a new issue