From a7bc19768e57b7e55f51c13d0bdfe0962d287215 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 20 Feb 2013 11:12:08 +0800 Subject: [PATCH] member list edit --- app/controllers/admin/plugins_controller.rb | 12 +- app/views/admin/attributes/edit.html.erb | 27 ++- app/views/admin/plugins/_plugin_list.html.erb | 18 ++ app/views/admin/plugins/index.html.erb | 19 +- .../admin/roles/_attribute_field.html.erb | 26 ++- app/views/admin/roles/edit_sub_role.html.erb | 23 +- app/views/admin/roles/role_field.html.erb | 2 +- app/views/admin/roles/sub_role.html.erb | 2 +- app/views/admin/roles/sub_role_field.html.erb | 2 +- .../users_new_interface/_side_bar.html.erb | 20 +- .../_user_for_listing.html.erb | 9 +- .../admin/users_new_interface/edit.html.erb | 1 + .../attribute_field/_attribute_field.html.erb | 25 ++- .../attribute_field/_list_block.html.erb | 2 +- config/locales/en.yml | 46 ++-- config/locales/zh_tw.yml | 38 ++-- lib/orbit_app/plugin/registration.rb | 6 + .../back_end/writing_books_controller.rb | 13 ++ .../back_end/writing_books/_filter.html.erb | 8 +- .../writing_books/_writing_book.html.erb | 8 +- .../back_end/writing_books/edit.html.erb | 11 + .../back_end/writing_books/index.html.erb | 16 +- .../back_end/writing_books/new.html.erb | 12 + .../writing_book_setting.html.erb | 9 + vendor/built_in_modules/personal_book/init.rb | 2 +- .../back_end/diplomas_controller.rb | 13 ++ .../back_end/diplomas/_diploma.html.erb | 8 +- .../back_end/diplomas/_filter.html.erb | 8 +- .../diplomas/diploma_setting.html.erb | 5 + .../back_end/diplomas/edit.html.erb | 7 + .../back_end/diplomas/index.html.erb | 17 +- .../back_end/diplomas/new.html.erb | 8 + .../built_in_modules/personal_diploma/init.rb | 2 +- .../back_end/experiences_controller.rb | 13 ++ .../back_end/experiences/_experience.html.erb | 12 +- .../back_end/experiences/_filter.html.erb | 8 +- .../back_end/experiences/edit.html.erb | 10 + .../experiences/experience_setting.html.erb | 9 + .../back_end/experiences/index.html.erb | 19 +- .../back_end/experiences/new.html.erb | 11 + .../personal_experience/init.rb | 2 +- .../back_end/honors_controller.rb | 13 ++ .../back_end/honors/_filter.html.erb | 8 +- .../back_end/honors/_honor.html.erb | 10 +- .../back_end/honors/edit.html.erb | 10 + .../back_end/honors/honor_setting.html.erb | 9 + .../back_end/honors/index.html.erb | 17 +- .../back_end/honors/new.html.erb | 11 + .../built_in_modules/personal_honor/init.rb | 2 +- .../back_end/writing_journals_controller.rb | 15 +- .../writing_journals/_filter.html.erb | 36 +-- .../_writing_journal.html.erb | 8 +- .../back_end/writing_journals/edit.html.erb | 10 + .../back_end/writing_journals/index.html.erb | 16 +- .../back_end/writing_journals/new.html.erb | 11 + .../writing_journal_setting.html.erb | 9 + .../built_in_modules/personal_journal/init.rb | 2 +- .../personal_lab/back_end/labs_controller.rb | 13 ++ .../back_end/labs/_filter.html.erb | 8 +- .../personal_lab/back_end/labs/_lab.html.erb | 10 +- .../personal_lab/back_end/labs/edit.html.erb | 10 + .../personal_lab/back_end/labs/index.html.erb | 17 +- .../back_end/labs/lab_setting.html.erb | 9 + .../personal_lab/back_end/labs/new.html.erb | 11 + vendor/built_in_modules/personal_lab/init.rb | 2 +- .../back_end/writing_patents/_form.html.erb | 209 ------------------ .../plugin/writing_patents/_form.html.erb | 209 ------------------ .../back_end/writing_patents_controller.rb | 13 ++ .../back_end/writing_patents/_filter.html.erb | 8 +- .../writing_patents/_writing_patent.html.erb | 16 +- .../back_end/writing_patents/edit.html.erb | 10 + .../back_end/writing_patents/index.html.erb | 20 +- .../back_end/writing_patents/new.html.erb | 11 + .../writing_patent_setting.html.erb | 9 + .../built_in_modules/personal_patent/init.rb | 2 +- .../back_end/projects_controller.rb | 13 ++ .../back_end/projects/_filter.html.erb | 8 +- .../back_end/projects/_project.html.erb | 14 +- .../back_end/projects/edit.html.erb | 10 + .../back_end/projects/index.html.erb | 19 +- .../back_end/projects/new.html.erb | 11 + .../projects/project_setting.html.erb | 9 + .../built_in_modules/personal_project/init.rb | 4 +- .../back_end/researchs_controller.rb | 12 +- .../back_end/researchs/_filter.html.erb | 8 +- .../back_end/researchs/_research.html.erb | 10 +- .../back_end/researchs/edit.html.erb | 10 + .../back_end/researchs/index.html.erb | 17 +- .../back_end/researchs/new.html.erb | 11 + .../personal_research/init.rb | 2 +- .../back_end/writing_seminars_controller.rb | 13 ++ .../writing_seminars/_filter.html.erb | 8 +- .../_writing_seminar.html.erb | 8 +- .../back_end/writing_seminars/edit.html.erb | 10 + .../back_end/writing_seminars/index.html.erb | 16 +- .../back_end/writing_seminars/new.html.erb | 11 + .../writing_seminar_setting.html.erb | 9 + .../built_in_modules/personal_seminar/init.rb | 2 +- 98 files changed, 819 insertions(+), 699 deletions(-) create mode 100644 app/views/admin/plugins/_plugin_list.html.erb delete mode 100644 vendor/built_in_modules/personal_patent/app - %BDƻs/views/panel/personal_patent/back_end/writing_patents/_form.html.erb delete mode 100644 vendor/built_in_modules/personal_patent/app - %BDƻs/views/panel/personal_patent/plugin/writing_patents/_form.html.erb diff --git a/app/controllers/admin/plugins_controller.rb b/app/controllers/admin/plugins_controller.rb index feeff300..424a482d 100644 --- a/app/controllers/admin/plugins_controller.rb +++ b/app/controllers/admin/plugins_controller.rb @@ -7,7 +7,17 @@ class Admin::PluginsController < ApplicationController @plugins = OrbitApp::Module::Registration.all if(!params[:show_plugin_profile].nil?) - @right_partial = OrbitApp::Plugin::Registration.find_by_key(params[:show_plugin_profile]).profile_partial_path rescue 'plugin_summary' + + @right_partial = OrbitApp::Plugin::Registration.find_by_key(params[:show_plugin_profile]).admin_partial_path + + if !@right_partial.blank? + respond_to do |format| + format.html { redirect_to( @right_partial ) } + end + else + @right_partial = "admin/users_new_interface/plugin_summary" + end + else @right_partial = "admin/users_new_interface/plugin_summary" end diff --git a/app/views/admin/attributes/edit.html.erb b/app/views/admin/attributes/edit.html.erb index aa87d73c..252cdf71 100644 --- a/app/views/admin/attributes/edit.html.erb +++ b/app/views/admin/attributes/edit.html.erb @@ -8,6 +8,20 @@

<%= t(eval(":#{@attribute_type}"))%>

+ +
+ +
+ <% if @attribute.new_record? %> + <%= f.text_field :key, :placeholder => t(:key) %> + <% else %> +
<%= @attribute.key%>
+ <% end %> +
+
+ <%= render :partial=>"shared/attribute_field/placeholder_block",:locals=>{:values=>@attribute.title_translations,:class_ext=>"pull-left",:label_ext=>t(:item_name),:field_name=>"#{@attribute_type}[title_translations]"}%> + +
@@ -23,24 +37,13 @@
-
- -
- <% if @attribute.new_record? %> - <%= f.text_field :key, :placeholder => t(:key) %> - <% else %> -
<%= @attribute.key%>
- <% end %> -
-
- <%= render :partial=>"shared/attribute_field/placeholder_block",:locals=>{:values=>@attribute.title_translations,:class_ext=>"pull-left",:label_ext=>t(:item_name),:field_name=>"#{@attribute_type}[title_translations]"}%>
<% if @attribute._type == "Info" %>
-

<%= @attribute.title+ t(:attributes)%>

+

<%= @attribute.title+ t(:field)%>

<%= render :partial=>"shared/attribute_field/attribute_field",:collection=>@attribute.attribute_fields%>
diff --git a/app/views/admin/plugins/_plugin_list.html.erb b/app/views/admin/plugins/_plugin_list.html.erb new file mode 100644 index 00000000..f583f92e --- /dev/null +++ b/app/views/admin/plugins/_plugin_list.html.erb @@ -0,0 +1,18 @@ +
+
+
+
+ +
+
\ No newline at end of file diff --git a/app/views/admin/plugins/index.html.erb b/app/views/admin/plugins/index.html.erb index f2b0c21b..cb0d5c7e 100644 --- a/app/views/admin/plugins/index.html.erb +++ b/app/views/admin/plugins/index.html.erb @@ -4,23 +4,6 @@
-
-
-
-
- -
-
+ <%= render :partial => 'plugin_list' %> <%= render :partial => @right_partial %>
\ No newline at end of file diff --git a/app/views/admin/roles/_attribute_field.html.erb b/app/views/admin/roles/_attribute_field.html.erb index 8ec2675d..d9acf6de 100644 --- a/app/views/admin/roles/_attribute_field.html.erb +++ b/app/views/admin/roles/_attribute_field.html.erb @@ -10,6 +10,17 @@ <%= hidden_field "#{@field_name}[attribute_fields][#{@af_counter}]","to_delete",:value=>false,:class=>"attribute_field_to_delete"%> <%= t(:delete_)%>
+
+ +
+
+ <%= text_field "#{@field_name}[attribute_fields][#{@af_counter}]","key",:value=>attribute_field.key%> +
+
+
+ <%= render :partial=>"shared/attribute_field/placeholder_block",:locals=>{:values=>attribute_field.title_translations,:class_ext=>"pull-left",:label_ext=>t(:name),:field_name=>"#{@field_name}[attribute_fields][#{@af_counter}][title_translations]"}%> + +
@@ -21,15 +32,8 @@
-
- -
-
- <%= text_field "#{@field_name}[attribute_fields][#{@af_counter}]","key",:value=>attribute_field.key%> -
-
-
- <%= render :partial=>"shared/attribute_field/placeholder_block",:locals=>{:values=>attribute_field.title_translations,:class_ext=>"pull-left",:label_ext=>t(:name),:field_name=>"#{@field_name}[attribute_fields][#{@af_counter}][title_translations]"}%> + +
@@ -46,7 +50,7 @@
<%= content_tag :div,:class=>show_type_panel(attribute_field,"typeA") do%>
- +