잉여개발기 2 лет назад
Родитель
Сommit
5110b98675

+ 0 - 0
route/n_list_history.py


+ 13 - 0
route/n_list_recent_discuss.py

@@ -0,0 +1,13 @@
+from .tool.func import *
+
+def list_recent_discuss():
+    with get_db_connect() as conn:
+        return easy_minify(conn, flask.render_template(skin_check(conn),
+            imp = [get_lang(conn, 'recent_discuss'), wiki_set(conn), wiki_custom(conn), wiki_css([0, 0])],
+            data = '' + \
+                '<div id="opennamu_list_recent_discuss"></div>' + \
+                '<script src="/views/main_css/js/route/list_recent_discuss.js' + cache_v() + '"></script>' + \
+                '<script>opennamu_list_recent_discuss();</script>' + \
+            '',
+            menu = [['other', get_lang(conn, 'return')]]
+        ))

+ 2 - 2
route_go/main.go

@@ -23,9 +23,9 @@ func main() {
 	} else if call_arg[0] == "api_func_ip" {
 		route.Api_func_ip(call_arg[1:])
 	} else if call_arg[0] == "api_recent_change" {
-		route.Api_recent_change(call_arg[1:])
+		route.Api_list_recent_change(call_arg[1:])
 	} else if call_arg[0] == "api_recent_edit_request" {
-		route.Api_recent_edit_request(call_arg[1:])
+		route.Api_list_recent_edit_request(call_arg[1:])
 	} else if call_arg[0] == "api_bbs" {
 		route.Api_bbs(call_arg[1:])
 	} else if call_arg[0] == "api_w_xref" {

+ 1 - 1
route_go/route/api_recent_change.go → route_go/route/api_list_recent_change.go

@@ -8,7 +8,7 @@ import (
 	"strconv"
 )
 
-func Api_recent_change(call_arg []string) {
+func Api_list_recent_change(call_arg []string) {
 	db_set := map[string]string{}
 	json.Unmarshal([]byte(call_arg[0]), &db_set)
 

+ 1 - 1
route_go/route/api_recent_discuss.go → route_go/route/api_list_recent_discuss.go

@@ -7,7 +7,7 @@ import (
 	"strconv"
 )
 
-func Api_recent_discuss(call_arg []string) {
+func Api_list_recent_discuss(call_arg []string) {
 	db_set := map[string]string{}
 	json.Unmarshal([]byte(call_arg[0]), &db_set)
 

+ 1 - 1
route_go/route/api_recent_edit_request.go → route_go/route/api_list_recent_edit_request.go

@@ -8,7 +8,7 @@ import (
 	"strconv"
 )
 
-func Api_recent_edit_request(call_arg []string) {
+func Api_list_recent_edit_request(call_arg []string) {
 	db_set := map[string]string{}
 	json.Unmarshal([]byte(call_arg[0]), &db_set)
 

+ 26 - 2
views/main_css/js/route/list_recent_change.js

@@ -1,7 +1,13 @@
 "use strict";
 
 function opennamu_list_recent_change() {
-    fetch('/api/lang/tool').then(function(res) {
+    let lang_data = new FormData();
+    lang_data.append('data', 'tool normal edit move delete revert new_doc edit_request user_document')
+
+    fetch('/api/lang', {
+        method : 'post',
+        body : lang_data,
+    }).then(function(res) {
         return res.json();
     }).then(function(lang) {
         lang = lang["data"];
@@ -23,7 +29,25 @@ function opennamu_list_recent_change() {
                 })
             */
 
-            let data_html = '<ul class="opennamu_ul">';
+            let data_html = '';
+
+            let option_list = [
+                ['normal', lang[1]],
+                ['edit', lang[2]],
+                ['move', lang[3]],
+                ['delete', lang[4]],
+                ['revert', lang[5]],
+                ['r1', lang[6]],
+                ['edit_request', lang[7]],
+                ['user', lang[8]]
+            ];
+            for(let for_a = 0; for_a < option_list.length; for_a++) {
+                data_html += '<a href="/recent_change/1/' + option_list[for_a][0] + '">(' + option_list[for_a][1] + ')</a> ';
+            }
+
+            data_html += '<hr class="main_hr">'
+
+            data_html += '<ul class="opennamu_ul">';
             for(let for_a = 0; for_a < data.length; for_a++) {
                 let doc_name = opennamu_do_url_encode(data[for_a][1]);