|
@@ -1,6 +1,6 @@
|
|
|
from .tool.func import *
|
|
from .tool.func import *
|
|
|
|
|
|
|
|
-def view_xref_2(conn, name):
|
|
|
|
|
|
|
+def view_xref_2(conn, name, xref_type = '1'):
|
|
|
curs = conn.cursor()
|
|
curs = conn.cursor()
|
|
|
|
|
|
|
|
if acl_check(name, 'render') == 1:
|
|
if acl_check(name, 'render') == 1:
|
|
@@ -9,18 +9,21 @@ def view_xref_2(conn, name):
|
|
|
num = int(number_check(flask.request.args.get('num', '1')))
|
|
num = int(number_check(flask.request.args.get('num', '1')))
|
|
|
sql_num = (num * 50 - 50) if num * 50 > 0 else 0
|
|
sql_num = (num * 50 - 50) if num * 50 > 0 else 0
|
|
|
|
|
|
|
|
- xref_type = flask.request.args.get('change', '1')
|
|
|
|
|
if xref_type == '1':
|
|
if xref_type == '1':
|
|
|
- div = '<a href="?change=2">(' + load_lang('link_in_this') + ')</a><hr class="main_hr">'
|
|
|
|
|
|
|
+ div = '<a href="/xref/this/' + url_pas(name) + '">(' + load_lang('link_in_this') + ')</a><hr class="main_hr">'
|
|
|
|
|
+
|
|
|
|
|
+ data_sub = '(' + load_lang('backlink') + ')'
|
|
|
else:
|
|
else:
|
|
|
- div = '<a href="?change=1">(' + load_lang('normal') + ')</a><hr class="main_hr">'
|
|
|
|
|
|
|
+ div = '<a href="/xref/' + url_pas(name) + '">(' + load_lang('normal') + ')</a><hr class="main_hr">'
|
|
|
|
|
+
|
|
|
|
|
+ data_sub = '(' + load_lang('link_in_this') + ')'
|
|
|
|
|
|
|
|
div += '<ul class="inside_ul">'
|
|
div += '<ul class="inside_ul">'
|
|
|
|
|
|
|
|
sql_insert = ['link', 'title'] if xref_type == '1' else ['title', 'link']
|
|
sql_insert = ['link', 'title'] if xref_type == '1' else ['title', 'link']
|
|
|
curs.execute(db_change("" + \
|
|
curs.execute(db_change("" + \
|
|
|
"select distinct " + sql_insert[0] + ", type from back " + \
|
|
"select distinct " + sql_insert[0] + ", type from back " + \
|
|
|
- "where " + sql_insert[1] + " = ? and not type = 'cat' and not type = 'no' and not type = 'nothing'" + \
|
|
|
|
|
|
|
+ "where " + sql_insert[1] + " = ? and not type = 'no' and not type = 'nothing'" + \
|
|
|
"order by type asc, title asc limit ?, 50" + \
|
|
"order by type asc, title asc limit ?, 50" + \
|
|
|
""), [
|
|
""), [
|
|
|
name,
|
|
name,
|
|
@@ -44,7 +47,7 @@ def view_xref_2(conn, name):
|
|
|
div += '</ul>' + next_fix('/xref/' + url_pas(name) + '?change=' + xref_type + '&num=', num, data_list)
|
|
div += '</ul>' + next_fix('/xref/' + url_pas(name) + '?change=' + xref_type + '&num=', num, data_list)
|
|
|
|
|
|
|
|
return easy_minify(flask.render_template(skin_check(),
|
|
return easy_minify(flask.render_template(skin_check(),
|
|
|
- imp = [name, wiki_set(), wiki_custom(), wiki_css(['(' + load_lang('backlink') + ')', 0])],
|
|
|
|
|
|
|
+ imp = [name, wiki_set(), wiki_custom(), wiki_css([data_sub, 0])],
|
|
|
data = div,
|
|
data = div,
|
|
|
menu = [['w/' + url_pas(name), load_lang('return')], ['backlink_reset/' + url_pas(name), load_lang('reset_backlink')]]
|
|
menu = [['w/' + url_pas(name), load_lang('return')], ['backlink_reset/' + url_pas(name), load_lang('reset_backlink')]]
|
|
|
))
|
|
))
|