diff --git a/lib/tasks/universal_table_tasks.rake b/lib/tasks/universal_table_tasks.rake index 09a4742..d4222a2 100755 --- a/lib/tasks/universal_table_tasks.rake +++ b/lib/tasks/universal_table_tasks.rake @@ -128,15 +128,15 @@ namespace :universal_table_tasks do site_locales.each_with_index do |locale, locale_idx| file_titles[locale.to_s] = row[col_idx + locale_idx + 1]&.value.to_s.split(";").map(&:strip) end - ce.column_entry_files.destroy_all - ce.column_entry_files = [] + # ce.column_entry_files.destroy_all + # ce.column_entry_files = [] + cef_ids = ce.column_entry_files.pluck(:id) file_urls.each_with_index do |remote_url, file_idx| if remote_url.blank? skip = site_locales.size end next if remote_url.blank? - debugger file = ColumnEntryFile.new file.remote_file_url = remote_url titles = {} @@ -147,6 +147,7 @@ namespace :universal_table_tasks do file.save! ce.column_entry_files << file end + ColumnEntryFile.where(:id.in => cef_ids).destroy_all when "date" ce.date = val diff --git a/modules/universal_table/_tag_cloud.html.erb b/modules/universal_table/_tag_cloud.html.erb index 32f95c0..3978ab5 100755 --- a/modules/universal_table/_tag_cloud.html.erb +++ b/modules/universal_table/_tag_cloud.html.erb @@ -1 +1,112 @@ -hi \ No newline at end of file + +
+
+
+ + diff --git a/modules/universal_table/index.html.erb b/modules/universal_table/index.html.erb index c188ce6..fd697ce 100755 --- a/modules/universal_table/index.html.erb +++ b/modules/universal_table/index.html.erb @@ -1,111 +1,133 @@ - -
- - - - - + + + + + + + +
-

{{table-name}}

- Reset -
- -
{{title}}
-
{{text}}
+ +
{{total_entries}}
+
{{export_button}}
+{{pagination_goes_here}} + diff --git a/modules/universal_table/index4.html.erb b/modules/universal_table/index4.html.erb new file mode 100644 index 0000000..97b4a39 --- /dev/null +++ b/modules/universal_table/index4.html.erb @@ -0,0 +1,147 @@ + +
+ +
+
+
查詢
+ Reset +
+
+ + + + + + + + + + + + +
+

{{table-name}}

+
+ +
{{title}}
+ +
{{text}}
+ +
{{total_entries}}
+
{{export_button}}
+{{pagination_goes_here}} + diff --git a/modules/universal_table/index5.html.erb b/modules/universal_table/index5.html.erb new file mode 100644 index 0000000..c6b5f33 --- /dev/null +++ b/modules/universal_table/index5.html.erb @@ -0,0 +1,214 @@ + +
+ + + + + + + + + + + + + + + + +
+

{{table-name}}

+
+
+ +
+ +
+ +
+
+
+
+
進階
+ Reset +
+
+ +
+ +
+
+
{{title}}
+
{{title}}
+ +
{{text}}
+ +
{{total_entries}}
+
{{export_button}}
+{{pagination_goes_here}} + diff --git a/modules/universal_table/info.json b/modules/universal_table/info.json index 34244b1..aadb071 100755 --- a/modules/universal_table/info.json +++ b/modules/universal_table/info.json @@ -12,26 +12,53 @@ "filename" : "index2", "name" : { "zh_tw" : "2. 含序號表格列表", - "en" : "2. Index Table with serial number" - }, - "thumbnail" : "thumb.png" - }, - { - "filename" : "index3", - "name" : { - "zh_tw" : "3. 含序號表格列表 + 多欄位搜尋", - "en" : "3. Index Table with serial number + Multiple Field Search" + "en" : "2. Index Table with serial number " }, "thumbnail" : "thumb.png", "default": true - }, + }, + { + "filename" : "index3", + "name" : { + "zh_tw" : "3. 單純表格列表 + 多欄位搜尋", + "en" : "3. col Pure index table+ Multiple Field Search" + }, + "thumbnail" : "thumb.png" + }, + { + "filename" : "index4", + "name" : { + "zh_tw" : "4.含序號表格列表 + 多欄位搜尋", + "en" : "4. col Index Table with serial number + Multiple Field Search" + }, + "thumbnail" : "thumb.png", + "default": true + }, + { + "filename" : "index5", + "name" : { + "zh_tw" : "5. 卡片單純表格列表 + 多欄位搜尋", + "en" : "5. card-col Pure index table+ Multiple Field Search" + }, + "thumbnail" : "thumb.png" + }, + { + "filename" : "mindmap", + "name" : { + "zh_tw" : "6. Mind Maps", + "en" : "6. Mind Maps" + }, + "thumbnail" : "thumb.png" + } + ], + "widgets" : [ { - "filename" : "mindmap", + "filename" : "tag_cloud", "name" : { - "zh_tw" : "6. Mind Maps", - "en" : "6. Mind Maps" + "zh_tw" : "0. Tag Cloud", + "en" : "0. Tag Cloud" }, - "thumbnail" : "thumb.png" + "thumbnail" : "_tag_cloud_thumb.png" } ] } diff --git a/modules/universal_table/mindmap.html.erb b/modules/universal_table/mindmap.html.erb index 684a20f..d43425c 100755 --- a/modules/universal_table/mindmap.html.erb +++ b/modules/universal_table/mindmap.html.erb @@ -1,107 +1,122 @@ - -
- - - - - - - -
-

{{table-name}}

-
{{title}}
-
-{{pagination_goes_here}} - + +
+ + + + + + + +
+

{{table-name}}

+
{{title}}
+
+{{pagination_goes_here}} + diff --git a/modules/universal_table/show.html.erb b/modules/universal_table/show.html.erb index 63b828a..9cd201c 100755 --- a/modules/universal_table/show.html.erb +++ b/modules/universal_table/show.html.erb @@ -1,33 +1,96 @@ - - + +
{{title}}{{text}}{{title}}{{text}}
-
- {{view_count_head}}: - {{view_count}} -
- -
+
相關詞目
+ +
+ {{view_count_head}}: + {{view_count}} +
+