added changes for curation

This commit is contained in:
rulingcom 2025-06-11 00:10:57 +08:00
parent 9f6fdb1af7
commit 478e6e8ec9
3 changed files with 13 additions and 1 deletions

View File

@ -74,6 +74,17 @@ class Admin::UniversalTablesController < OrbitAdminController
render :json => data.to_json
end
def get_mindmaps
utable = UTable.where(:uid => params['table']).first
mindmaps = utable.mind_maps.map do |m|
{
"title" => m.title,
"id" => m.id.to_s
}
end
render :json => mindmaps.to_json
end
def export_structure
uid = params[:universal_table_id].split("-").last
@table = UTable.where(:uid => uid).first rescue nil

View File

@ -1,6 +1,6 @@
<%
data = action_data
OrbitHelper.render_css_in_head(["mind_map/mindmap"])
OrbitHelper.render_css_in_head(["/mind_map/mindmap"])
%>
<h2><%= data["title"] %></h2>

View File

@ -19,6 +19,7 @@ Rails.application.routes.draw do
namespace :admin do
post "/universal_tables/add_entry", to: 'universal_tables#add_entry'
get "/universal_tables/get_entries", to: 'universal_tables#get_entries'
get "/universal_tables/get_mindmaps", to: 'universal_tables#get_mindmaps'
patch "/universal_tables/update_entry", to: 'universal_tables#update_entry'
post "/universal_tables/import_data_from_excel", to: 'universal_tables#import_data_from_excel'
get "universal_tables/checkforthread", to: "universal_tables#checkforthread"