diff --git a/app/controllers/personal_labs_controller.rb b/app/controllers/personal_labs_controller.rb index 4e7fd49..e9ef0a2 100644 --- a/app/controllers/personal_labs_controller.rb +++ b/app/controllers/personal_labs_controller.rb @@ -30,7 +30,6 @@ class PersonalLabsController < ApplicationController params = OrbitHelper.params plugin = Lab.where(:is_hidden=>false).find_by(uid: params[:uid]) fields_to_show = [ - "year", "lab_title", "location", "participating_professor", diff --git a/app/models/lab.rb b/app/models/lab.rb index 14d24dc..8ddba7d 100644 --- a/app/models/lab.rb +++ b/app/models/lab.rb @@ -44,7 +44,6 @@ class Lab def self.get_plugin_datas_to_member(datas) fields_to_show = [ - "year", "lab_title", "location" ] diff --git a/modules/personal_lab/index.html.erb b/modules/personal_lab/index.html.erb new file mode 100644 index 0000000..b7144fc --- /dev/null +++ b/modules/personal_lab/index.html.erb @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + +

{{widget-title}}

{{th_lab_title}}{{th_location}}{{th_member}}
{{lab_title}}{{location}}{{member}}
+{{pagination_goes_here}} + + \ No newline at end of file diff --git a/modules/personal_lab/index.html.erb.bak b/modules/personal_lab/index.html.erb.bak new file mode 100644 index 0000000..edfdb53 --- /dev/null +++ b/modules/personal_lab/index.html.erb.bak @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + + + + +

{{widget-title}}

{{th_year}}{{th_lab_title}}{{th_location}}{{th_member}}更多內容
{{year}}{{lab_title}}{{location}}{{member}}{{th_detail}}
+{{pagination_goes_here}} + + \ No newline at end of file diff --git a/modules/personal_lab/info.json b/modules/personal_lab/info.json new file mode 100644 index 0000000..cda3d13 --- /dev/null +++ b/modules/personal_lab/info.json @@ -0,0 +1,12 @@ +{ + "frontend": [ + { + "filename" : "index", + "name" : { + "zh_tw" : "1. 列表", + "en" : "1. List" + }, + "thumbnail" : "thumb.png" + } + ] +} \ No newline at end of file diff --git a/modules/personal_lab/show.html.erb b/modules/personal_lab/show.html.erb new file mode 100644 index 0000000..b183818 --- /dev/null +++ b/modules/personal_lab/show.html.erb @@ -0,0 +1,8 @@ + + + + + + + +
{{title}}{{value}}
diff --git a/modules/personal_lab/thumbs/thumb.png b/modules/personal_lab/thumbs/thumb.png new file mode 100644 index 0000000..266af56 Binary files /dev/null and b/modules/personal_lab/thumbs/thumb.png differ diff --git a/personal_lab.gemspec b/personal_lab.gemspec index 4e447ca..a80d84b 100644 --- a/personal_lab.gemspec +++ b/personal_lab.gemspec @@ -2,7 +2,22 @@ $:.push File.expand_path("../lib", __FILE__) # Maintain your gem's version: require "personal_lab/version" - +bundle_update_flag = ARGV[0]=='update' || ARGV[0]=='install' +if bundle_update_flag + app_path = File.expand_path(__dir__) + template_path = ENV['PWD'] + '/app/templates' + all_template = Dir.glob(template_path+'/*/') + puts 'copying module' + all_template.each do |folder| + if folder.split('/')[-1] != 'mobile' + begin + system ('cp -r '+ app_path + '/modules/ ' + folder) + rescue + puts 'error copy' + end + end + end +end # Describe your gem and declare its dependencies: Gem::Specification.new do |s| s.name = "personal_lab"