From 53e6b41d93af31b43bb322606fcd236d94179483 Mon Sep 17 00:00:00 2001 From: Tim Date: Tue, 26 Apr 2016 10:02:16 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E5=8C=97=E6=96=97=E7=99=BB=E5=BD=95?= =?UTF-8?q?=E6=95=88=E6=9E=9C=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/layouts/base_org2.html.erb | 776 +++++++++--------- .../_org_logined_header.html.erb | 102 +-- db/schema.rb | 419 ---------- public/stylesheets/org2.css | 429 +++++----- 4 files changed, 656 insertions(+), 1070 deletions(-) diff --git a/app/views/layouts/base_org2.html.erb b/app/views/layouts/base_org2.html.erb index a605b8d4e..0dec2a85a 100644 --- a/app/views/layouts/base_org2.html.erb +++ b/app/views/layouts/base_org2.html.erb @@ -1,388 +1,388 @@ - - - - - <%= h html_title %> - - - <%= csrf_meta_tag %> - <%= favicon %> - <%= javascript_heads %> - <%= heads_for_theme %> - <%= stylesheet_link_tag 'org2','jquery/jquery-ui-1.9.2' %> - <%= javascript_include_tag 'cookie','project', 'organization','header','prettify','select_list_move','org'%> - <%= javascript_include_tag 'attachments' %> - <%#= call_hook :view_layouts_base_html_head %> - - <%#= yield :header_tags -%> - - - - - - - - - - - - - - - - -
-
- <%= render :partial => 'organizations/org_logined_header' %> -
- -
- -
-
    - <% @subfield_content.each do |field| %> - <% if is_default_field?(field) %> - <% case field.name %> - <% when 'activity' %> - - <% when 'course' %> - - <% when 'project' %> - - <% end %> - <% else %> - <% if field.field_type == "Post" && field.hide == 0 %> - - <% elsif field.field_type == "Resource" && field.hide == 0 %> - - <% end %> - <% end %> - <% end %> - <% if User.current.admin_of_org?(@organization) %> - - <% end %> -
-
- - - - - - - - - - - - - - -
-
- -
-
-
- - - - -
- -
-

业界动态更多

-
-
- -

北斗开放实验室迎湖南省省直机关领导调研参观

- 2016-04-08 -
-

2016年3月27日上午,湖南省经信委巡视员钟志慧,湖南省发改委副主任卓群、高技处处长何志明、就业处处长周建龙等领导代表在长沙中电软件园董事长何明、总经理夏利锋的陪同来北斗开放实验室长沙分实验室调研参观。北斗开放实验室办公室主任明德祥为参观的各位领导详细介绍了北斗开放实验室运行机制及各项共享资源。北斗开放实验室长沙分实验室是由导航仪器湖南省工程研究中心、湖南矩阵电子科技有限公司及中国仪器仪表学会空间仪器分会共同建设。为进一步推动北斗资源共享、创新北斗人才培养......

-
-
- -
-
- - - - - -
-

合作伙伴更多

-
-
    -
  • - - -
  • -
  • - - -
  • -
-
-
-
<
-
>
-
-
-
-
- -
- - - -
- - -
-

关注北斗

-
- -

卫星导航仿真与测试开放实验室
扫一扫 关注我!

-
-
-
- -
- -
-
- -
-
- - - - -<%#= call_hook :view_layouts_base_body_bottom %> - - - + + + + + <%= h html_title %> + + + <%= csrf_meta_tag %> + <%= favicon %> + <%= javascript_heads %> + <%= heads_for_theme %> + <%= stylesheet_link_tag 'org2','jquery/jquery-ui-1.9.2' %> + <%= javascript_include_tag 'cookie','project', 'organization','header','prettify','select_list_move','org'%> + <%= javascript_include_tag 'attachments' %> + <%#= call_hook :view_layouts_base_html_head %> + + <%#= yield :header_tags -%> + + + + + + + + + + + + + + + + +
+
+ <%= render :partial => 'organizations/org_logined_header' %> +
+ +
+ +
+
    + <% @subfield_content.each do |field| %> + <% if is_default_field?(field) %> + <% case field.name %> + <% when 'activity' %> + + <% when 'course' %> + + <% when 'project' %> + + <% end %> + <% else %> + <% if field.field_type == "Post" && field.hide == 0 %> + + <% elsif field.field_type == "Resource" && field.hide == 0 %> + + <% end %> + <% end %> + <% end %> + <% if User.current.admin_of_org?(@organization) %> + + <% end %> +
+
+ + + + + + + + + + + + + + +
+
+ +
+
+
+ + + + +
+ +
+

业界动态更多

+
+
+ +

北斗开放实验室迎湖南省省直机关领导调研参观

+ 2016-04-08 +
+

2016年3月27日上午,湖南省经信委巡视员钟志慧,湖南省发改委副主任卓群、高技处处长何志明、就业处处长周建龙等领导代表在长沙中电软件园董事长何明、总经理夏利锋的陪同来北斗开放实验室长沙分实验室调研参观。北斗开放实验室办公室主任明德祥为参观的各位领导详细介绍了北斗开放实验室运行机制及各项共享资源。北斗开放实验室长沙分实验室是由导航仪器湖南省工程研究中心、湖南矩阵电子科技有限公司及中国仪器仪表学会空间仪器分会共同建设。为进一步推动北斗资源共享、创新北斗人才培养......

+
+
+ +
+
+ + + + + +
+

合作伙伴更多

+
+
    +
  • + + +
  • +
  • + + +
  • +
+
+
+
<
+
>
+
+
+
+
+ +
+ + + +
+ + +
+

关注北斗

+
+ +

卫星导航仿真与测试开放实验室
扫一扫 关注我!

+
+
+
+ +
+ +
+
+ +
+
+ + + + +<%#= call_hook :view_layouts_base_body_bottom %> + + + diff --git a/app/views/organizations/_org_logined_header.html.erb b/app/views/organizations/_org_logined_header.html.erb index ead53de9f..22cf920e9 100644 --- a/app/views/organizations/_org_logined_header.html.erb +++ b/app/views/organizations/_org_logined_header.html.erb @@ -1,50 +1,54 @@ -<% if User.current.logged? %> - -<% else %> -
- -
-<% end %> - - \ No newline at end of file diff --git a/db/schema.rb b/db/schema.rb index ccd953cc5..5bdd5b674 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -52,28 +52,6 @@ ActiveRecord::Schema.define(:version => 20160415030447) do add_index "api_keys", ["access_token"], :name => "index_api_keys_on_access_token" add_index "api_keys", ["user_id"], :name => "index_api_keys_on_user_id" - create_table "application_settings", :force => true do |t| - t.integer "default_projects_limit" - t.boolean "signup_enabled" - t.boolean "signin_enabled" - t.boolean "gravatar_enabled" - t.text "sign_in_text" - t.datetime "created_at" - t.datetime "updated_at" - t.string "home_page_url" - t.integer "default_branch_protection", :default => 2 - t.boolean "twitter_sharing_enabled", :default => true - t.text "restricted_visibility_levels" - t.boolean "version_check_enabled", :default => true - t.integer "max_attachment_size", :default => 10, :null => false - t.integer "default_project_visibility" - t.integer "default_snippet_visibility" - t.text "restricted_signup_domains" - t.boolean "user_oauth_applications", :default => true - t.string "after_sign_out_path" - t.integer "session_expire_delay", :default => 10080, :null => false - end - create_table "applied_projects", :force => true do |t| t.integer "project_id", :null => false t.integer "user_id", :null => false @@ -155,20 +133,6 @@ ActiveRecord::Schema.define(:version => 20160415030447) do t.string "typeName", :limit => 50 end - create_table "audit_events", :force => true do |t| - t.integer "author_id", :null => false - t.string "type", :null => false - t.integer "entity_id", :null => false - t.string "entity_type", :null => false - t.text "details" - t.datetime "created_at" - t.datetime "updated_at" - end - - add_index "audit_events", ["author_id"], :name => "index_audit_events_on_author_id" - add_index "audit_events", ["entity_id", "entity_type"], :name => "index_audit_events_on_entity_id_and_entity_type" - add_index "audit_events", ["type"], :name => "index_audit_events_on_type" - create_table "auth_sources", :force => true do |t| t.string "type", :limit => 30, :default => "", :null => false t.string "name", :limit => 60, :default => "", :null => false @@ -266,17 +230,6 @@ ActiveRecord::Schema.define(:version => 20160415030447) do add_index "boards", ["last_message_id"], :name => "index_boards_on_last_message_id" add_index "boards", ["project_id"], :name => "boards_project_id" - create_table "broadcast_messages", :force => true do |t| - t.text "message", :null => false - t.datetime "starts_at" - t.datetime "ends_at" - t.integer "alert_type" - t.datetime "created_at" - t.datetime "updated_at" - t.string "color" - t.string "font" - end - create_table "bug_to_osps", :force => true do |t| t.integer "osp_id" t.integer "relative_memo_id" @@ -624,15 +577,6 @@ ActiveRecord::Schema.define(:version => 20160415030447) do add_index "delayed_jobs", ["priority", "run_at"], :name => "delayed_jobs_priority" - create_table "deploy_keys_projects", :force => true do |t| - t.integer "deploy_key_id", :null => false - t.integer "project_id", :null => false - t.datetime "created_at" - t.datetime "updated_at" - end - - add_index "deploy_keys_projects", ["project_id"], :name => "index_deploy_keys_projects_on_project_id" - create_table "discuss_demos", :force => true do |t| t.string "title" t.text "body" @@ -682,16 +626,6 @@ ActiveRecord::Schema.define(:version => 20160415030447) do t.datetime "created_at" end - create_table "emails", :force => true do |t| - t.integer "user_id", :null => false - t.string "email", :null => false - t.datetime "created_at" - t.datetime "updated_at" - end - - add_index "emails", ["email"], :name => "index_emails_on_email", :unique => true - add_index "emails", ["user_id"], :name => "index_emails_on_user_id" - create_table "enabled_modules", :force => true do |t| t.integer "project_id" t.string "name", :null => false @@ -714,25 +648,6 @@ ActiveRecord::Schema.define(:version => 20160415030447) do add_index "enumerations", ["id", "type"], :name => "index_enumerations_on_id_and_type" add_index "enumerations", ["project_id"], :name => "index_enumerations_on_project_id" - create_table "events", :force => true do |t| - t.string "target_type" - t.integer "target_id" - t.string "title" - t.text "data" - t.integer "project_id" - t.datetime "created_at" - t.datetime "updated_at" - t.integer "action" - t.integer "author_id" - end - - add_index "events", ["action"], :name => "index_events_on_action" - add_index "events", ["author_id"], :name => "index_events_on_author_id" - add_index "events", ["created_at"], :name => "index_events_on_created_at" - add_index "events", ["project_id"], :name => "index_events_on_project_id" - add_index "events", ["target_id"], :name => "index_events_on_target_id" - add_index "events", ["target_type"], :name => "index_events_on_target_type" - create_table "exercise_answers", :force => true do |t| t.integer "user_id" t.integer "exercise_question_id" @@ -835,15 +750,6 @@ ActiveRecord::Schema.define(:version => 20160415030447) do add_index "forge_messages", ["forge_message_id", "forge_message_type"], :name => "index_forge_messages_on_forge_message_id_and_forge_message_type" add_index "forge_messages", ["user_id", "project_id", "created_at"], :name => "index_forge_messages_on_user_id_and_project_id_and_created_at" - create_table "forked_project_links", :force => true do |t| - t.integer "forked_to_project_id", :null => false - t.integer "forked_from_project_id", :null => false - t.datetime "created_at" - t.datetime "updated_at" - end - - add_index "forked_project_links", ["forked_to_project_id"], :name => "index_forked_project_links_on_forked_to_project_id", :unique => true - create_table "forums", :force => true do |t| t.string "name", :null => false t.text "description" @@ -972,17 +878,6 @@ ActiveRecord::Schema.define(:version => 20160415030447) do t.datetime "updated_at", :null => false end - create_table "identities", :force => true do |t| - t.string "extern_uid" - t.string "provider" - t.integer "user_id" - t.datetime "created_at" - t.datetime "updated_at" - end - - add_index "identities", ["created_at", "id"], :name => "index_identities_on_created_at_and_id" - add_index "identities", ["user_id"], :name => "index_identities_on_user_id" - create_table "invite_lists", :force => true do |t| t.integer "project_id" t.integer "user_id" @@ -1126,20 +1021,6 @@ ActiveRecord::Schema.define(:version => 20160415030447) do t.integer "private", :default => 0 end - create_table "keys", :force => true do |t| - t.integer "user_id" - t.datetime "created_at" - t.datetime "updated_at" - t.text "key" - t.string "title" - t.string "type" - t.string "fingerprint" - t.boolean "public", :default => false, :null => false - end - - add_index "keys", ["created_at", "id"], :name => "index_keys_on_created_at_and_id" - add_index "keys", ["user_id"], :name => "index_keys_on_user_id" - create_table "kindeditor_assets", :force => true do |t| t.string "asset" t.integer "file_size" @@ -1151,27 +1032,6 @@ ActiveRecord::Schema.define(:version => 20160415030447) do t.integer "owner_type", :default => 0 end - create_table "label_links", :force => true do |t| - t.integer "label_id" - t.integer "target_id" - t.string "target_type" - t.datetime "created_at" - t.datetime "updated_at" - end - - add_index "label_links", ["label_id"], :name => "index_label_links_on_label_id" - add_index "label_links", ["target_id", "target_type"], :name => "index_label_links_on_target_id_and_target_type" - - create_table "labels", :force => true do |t| - t.string "title" - t.string "color" - t.integer "project_id" - t.datetime "created_at" - t.datetime "updated_at" - end - - add_index "labels", ["project_id"], :name => "index_labels_on_project_id" - create_table "member_roles", :force => true do |t| t.integer "member_id", :null => false t.integer "role_id", :null => false @@ -1222,47 +1082,6 @@ ActiveRecord::Schema.define(:version => 20160415030447) do t.integer "viewed_count", :default => 0 end - create_table "merge_request_diffs", :force => true do |t| - t.string "state" - t.text "st_commits", :limit => 2147483647 - t.text "st_diffs", :limit => 2147483647 - t.integer "merge_request_id", :null => false - t.datetime "created_at" - t.datetime "updated_at" - end - - add_index "merge_request_diffs", ["merge_request_id"], :name => "index_merge_request_diffs_on_merge_request_id", :unique => true - - create_table "merge_requests", :force => true do |t| - t.string "target_branch", :null => false - t.string "source_branch", :null => false - t.integer "source_project_id", :null => false - t.integer "author_id" - t.integer "assignee_id" - t.string "title" - t.datetime "created_at" - t.datetime "updated_at" - t.integer "milestone_id" - t.string "state" - t.string "merge_status" - t.integer "target_project_id", :null => false - t.integer "iid" - t.text "description" - t.integer "position", :default => 0 - t.datetime "locked_at" - end - - add_index "merge_requests", ["assignee_id"], :name => "index_merge_requests_on_assignee_id" - add_index "merge_requests", ["author_id"], :name => "index_merge_requests_on_author_id" - add_index "merge_requests", ["created_at", "id"], :name => "index_merge_requests_on_created_at_and_id" - add_index "merge_requests", ["created_at"], :name => "index_merge_requests_on_created_at" - add_index "merge_requests", ["milestone_id"], :name => "index_merge_requests_on_milestone_id" - add_index "merge_requests", ["source_branch"], :name => "index_merge_requests_on_source_branch" - add_index "merge_requests", ["source_project_id"], :name => "index_merge_requests_on_source_project_id" - add_index "merge_requests", ["target_branch"], :name => "index_merge_requests_on_target_branch" - add_index "merge_requests", ["target_project_id", "iid"], :name => "index_merge_requests_on_target_project_id_and_iid", :unique => true - add_index "merge_requests", ["title"], :name => "index_merge_requests_on_title" - create_table "message_alls", :force => true do |t| t.integer "user_id" t.integer "message_id" @@ -1297,39 +1116,6 @@ ActiveRecord::Schema.define(:version => 20160415030447) do add_index "messages", ["last_reply_id"], :name => "index_messages_on_last_reply_id" add_index "messages", ["parent_id"], :name => "messages_parent_id" - create_table "milestones", :force => true do |t| - t.string "title", :null => false - t.integer "project_id", :null => false - t.text "description" - t.date "due_date" - t.datetime "created_at" - t.datetime "updated_at" - t.string "state" - t.integer "iid" - end - - add_index "milestones", ["created_at", "id"], :name => "index_milestones_on_created_at_and_id" - add_index "milestones", ["due_date"], :name => "index_milestones_on_due_date" - add_index "milestones", ["project_id", "iid"], :name => "index_milestones_on_project_id_and_iid", :unique => true - add_index "milestones", ["project_id"], :name => "index_milestones_on_project_id" - - create_table "namespaces", :force => true do |t| - t.string "name", :null => false - t.string "path", :null => false - t.integer "owner_id" - t.datetime "created_at" - t.datetime "updated_at" - t.string "type" - t.string "description", :default => "", :null => false - t.string "avatar" - end - - add_index "namespaces", ["created_at", "id"], :name => "index_namespaces_on_created_at_and_id" - add_index "namespaces", ["name"], :name => "index_namespaces_on_name", :unique => true - add_index "namespaces", ["owner_id"], :name => "index_namespaces_on_owner_id" - add_index "namespaces", ["path"], :name => "index_namespaces_on_path", :unique => true - add_index "namespaces", ["type"], :name => "index_namespaces_on_type" - create_table "news", :force => true do |t| t.integer "project_id" t.string "title", :limit => 60, :default => "", :null => false @@ -1355,31 +1141,6 @@ ActiveRecord::Schema.define(:version => 20160415030447) do t.datetime "updated_at", :null => false end - create_table "notes", :force => true do |t| - t.text "note" - t.string "noteable_type" - t.integer "author_id" - t.datetime "created_at" - t.datetime "updated_at" - t.integer "project_id" - t.string "attachment" - t.string "line_code" - t.string "commit_id" - t.integer "noteable_id" - t.boolean "system", :default => false, :null => false - t.text "st_diff", :limit => 2147483647 - end - - add_index "notes", ["author_id"], :name => "index_notes_on_author_id" - add_index "notes", ["commit_id"], :name => "index_notes_on_commit_id" - add_index "notes", ["created_at", "id"], :name => "index_notes_on_created_at_and_id" - add_index "notes", ["created_at"], :name => "index_notes_on_created_at" - add_index "notes", ["noteable_id", "noteable_type"], :name => "index_notes_on_noteable_id_and_noteable_type" - add_index "notes", ["noteable_type"], :name => "index_notes_on_noteable_type" - add_index "notes", ["project_id", "noteable_type"], :name => "index_notes_on_project_id_and_noteable_type" - add_index "notes", ["project_id"], :name => "index_notes_on_project_id" - add_index "notes", ["updated_at"], :name => "index_notes_on_updated_at" - create_table "notificationcomments", :force => true do |t| t.string "notificationcommented_type" t.integer "notificationcommented_id" @@ -1389,49 +1150,6 @@ ActiveRecord::Schema.define(:version => 20160415030447) do t.datetime "updated_at", :null => false end - create_table "oauth_access_grants", :force => true do |t| - t.integer "resource_owner_id", :null => false - t.integer "application_id", :null => false - t.string "token", :null => false - t.integer "expires_in", :null => false - t.text "redirect_uri", :null => false - t.datetime "created_at", :null => false - t.datetime "revoked_at" - t.string "scopes" - end - - add_index "oauth_access_grants", ["token"], :name => "index_oauth_access_grants_on_token", :unique => true - - create_table "oauth_access_tokens", :force => true do |t| - t.integer "resource_owner_id" - t.integer "application_id" - t.string "token", :null => false - t.string "refresh_token" - t.integer "expires_in" - t.datetime "revoked_at" - t.datetime "created_at", :null => false - t.string "scopes" - end - - add_index "oauth_access_tokens", ["refresh_token"], :name => "index_oauth_access_tokens_on_refresh_token", :unique => true - add_index "oauth_access_tokens", ["resource_owner_id"], :name => "index_oauth_access_tokens_on_resource_owner_id" - add_index "oauth_access_tokens", ["token"], :name => "index_oauth_access_tokens_on_token", :unique => true - - create_table "oauth_applications", :force => true do |t| - t.string "name", :null => false - t.string "uid", :null => false - t.string "secret", :null => false - t.text "redirect_uri", :null => false - t.string "scopes", :default => "", :null => false - t.datetime "created_at" - t.datetime "updated_at" - t.integer "owner_id" - t.string "owner_type" - end - - add_index "oauth_applications", ["owner_id", "owner_type"], :name => "index_oauth_applications_on_owner_id_and_owner_type" - add_index "oauth_applications", ["uid"], :name => "index_oauth_applications_on_uid", :unique => true - create_table "onclick_times", :force => true do |t| t.integer "user_id" t.datetime "onclick_time" @@ -1587,23 +1305,6 @@ ActiveRecord::Schema.define(:version => 20160415030447) do t.integer "show_mode", :default => 0 end - create_table "permissions", :force => true do |t| - t.string "controller", :limit => 30, :default => "", :null => false - t.string "action", :limit => 30, :default => "", :null => false - t.string "description", :limit => 60, :default => "", :null => false - t.boolean "is_public", :default => false, :null => false - t.integer "sort", :default => 0, :null => false - t.boolean "mail_option", :default => false, :null => false - t.boolean "mail_enabled", :default => false, :null => false - end - - create_table "permissions_roles", :id => false, :force => true do |t| - t.integer "permission_id", :default => 0, :null => false - t.integer "role_id", :default => 0, :null => false - end - - add_index "permissions_roles", ["role_id"], :name => "permissions_roles_role_id" - create_table "phone_app_versions", :force => true do |t| t.string "version" t.text "description" @@ -1686,11 +1387,6 @@ ActiveRecord::Schema.define(:version => 20160415030447) do t.datetime "updated_at", :null => false end - create_table "project_import_data", :force => true do |t| - t.integer "project_id" - t.text "data" - end - create_table "project_infos", :force => true do |t| t.integer "project_id" t.integer "user_id" @@ -1780,16 +1476,6 @@ ActiveRecord::Schema.define(:version => 20160415030447) do add_index "projects_trackers", ["project_id", "tracker_id"], :name => "projects_trackers_unique", :unique => true add_index "projects_trackers", ["project_id"], :name => "projects_trackers_project_id" - create_table "protected_branches", :force => true do |t| - t.integer "project_id", :null => false - t.string "name", :null => false - t.datetime "created_at" - t.datetime "updated_at" - t.boolean "developers_can_push", :default => false, :null => false - end - - add_index "protected_branches", ["project_id"], :name => "index_protected_branches_on_project_id" - create_table "queries", :force => true do |t| t.integer "project_id" t.string "name", :default => "", :null => false @@ -1924,25 +1610,6 @@ ActiveRecord::Schema.define(:version => 20160415030447) do t.integer "is_teacher_score", :default => 0 end - create_table "services", :force => true do |t| - t.string "type" - t.string "title" - t.integer "project_id" - t.datetime "created_at" - t.datetime "updated_at" - t.boolean "active", :default => false, :null => false - t.text "properties" - t.boolean "template", :default => false - t.boolean "push_events", :default => true - t.boolean "issues_events", :default => true - t.boolean "merge_requests_events", :default => true - t.boolean "tag_push_events", :default => true - t.boolean "note_events", :default => true, :null => false - end - - add_index "services", ["created_at", "id"], :name => "index_services_on_created_at_and_id" - add_index "services", ["project_id"], :name => "index_services_on_project_id" - create_table "settings", :force => true do |t| t.string "name", :default => "", :null => false t.text "value" @@ -1972,26 +1639,6 @@ ActiveRecord::Schema.define(:version => 20160415030447) do t.datetime "updated_at", :null => false end - create_table "snippets", :force => true do |t| - t.string "title" - t.text "content", :limit => 2147483647 - t.integer "author_id", :null => false - t.integer "project_id" - t.datetime "created_at" - t.datetime "updated_at" - t.string "file_name" - t.datetime "expires_at" - t.string "type" - t.integer "visibility_level", :default => 0, :null => false - end - - add_index "snippets", ["author_id"], :name => "index_snippets_on_author_id" - add_index "snippets", ["created_at", "id"], :name => "index_snippets_on_created_at_and_id" - add_index "snippets", ["created_at"], :name => "index_snippets_on_created_at" - add_index "snippets", ["expires_at"], :name => "index_snippets_on_expires_at" - add_index "snippets", ["project_id"], :name => "index_snippets_on_project_id" - add_index "snippets", ["visibility_level"], :name => "index_snippets_on_visibility_level" - create_table "softapplications", :force => true do |t| t.string "name" t.text "description" @@ -2088,17 +1735,6 @@ ActiveRecord::Schema.define(:version => 20160415030447) do t.datetime "updated_at", :null => false end - create_table "subscriptions", :force => true do |t| - t.integer "user_id" - t.integer "subscribable_id" - t.string "subscribable_type" - t.boolean "subscribed" - t.datetime "created_at" - t.datetime "updated_at" - end - - add_index "subscriptions", ["subscribable_id", "subscribable_type", "user_id"], :name => "subscriptions_user_id_and_ref_fields", :unique => true - create_table "system_messages", :force => true do |t| t.integer "user_id" t.string "content" @@ -2293,25 +1929,6 @@ ActiveRecord::Schema.define(:version => 20160415030447) do add_index "user_statuses", ["grade"], :name => "index_user_statuses_on_grade" add_index "user_statuses", ["watchers_count"], :name => "index_user_statuses_on_watchers_count" - create_table "user_wechats", :force => true do |t| - t.integer "subscribe" - t.string "openid" - t.string "nickname" - t.integer "sex" - t.string "language" - t.string "city" - t.string "province" - t.string "country" - t.string "headimgurl" - t.string "subscribe_time" - t.string "unionid" - t.string "remark" - t.integer "groupid" - t.integer "user_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - create_table "users", :force => true do |t| t.string "login", :default => "", :null => false t.string "hashed_password", :limit => 40, :default => "", :null => false @@ -2337,17 +1954,6 @@ ActiveRecord::Schema.define(:version => 20160415030447) do add_index "users", ["id", "type"], :name => "index_users_on_id_and_type" add_index "users", ["type"], :name => "index_users_on_type" - create_table "users_star_projects", :force => true do |t| - t.integer "project_id", :null => false - t.integer "user_id", :null => false - t.datetime "created_at" - t.datetime "updated_at" - end - - add_index "users_star_projects", ["project_id"], :name => "index_users_star_projects_on_project_id" - add_index "users_star_projects", ["user_id", "project_id"], :name => "index_users_star_projects_on_user_id_and_project_id", :unique => true - add_index "users_star_projects", ["user_id"], :name => "index_users_star_projects_on_user_id" - create_table "versions", :force => true do |t| t.integer "project_id", :default => 0, :null => false t.string "name", :default => "", :null => false @@ -2399,31 +2005,6 @@ ActiveRecord::Schema.define(:version => 20160415030447) do t.datetime "updated_at", :null => false end - create_table "web_hooks", :force => true do |t| - t.string "url" - t.integer "project_id" - t.datetime "created_at" - t.datetime "updated_at" - t.string "type", :default => "ProjectHook" - t.integer "service_id" - t.boolean "push_events", :default => true, :null => false - t.boolean "issues_events", :default => false, :null => false - t.boolean "merge_requests_events", :default => false, :null => false - t.boolean "tag_push_events", :default => false - t.boolean "note_events", :default => false, :null => false - end - - add_index "web_hooks", ["created_at", "id"], :name => "index_web_hooks_on_created_at_and_id" - add_index "web_hooks", ["project_id"], :name => "index_web_hooks_on_project_id" - - create_table "wechat_logs", :force => true do |t| - t.string "openid", :null => false - t.text "request_raw" - t.text "response_raw" - t.text "session_raw" - t.datetime "created_at", :null => false - end - create_table "wiki_content_versions", :force => true do |t| t.integer "wiki_content_id", :null => false t.integer "page_id", :null => false diff --git a/public/stylesheets/org2.css b/public/stylesheets/org2.css index b64940322..e738f841d 100644 --- a/public/stylesheets/org2.css +++ b/public/stylesheets/org2.css @@ -1,214 +1,215 @@ -/* CSS Document */ -/* 样式重置 */ -body,h1,h2,h3,h4,h5,h6,hr,p,blockquote,dl,dt,dd,ul,ol,li,pre,form,fieldset,legend,button,input,textarea,th,td{ margin:0; padding:0;} -body,table,input,textarea,select,button { font-family: "微软雅黑","宋体"; font-size:12px;line-height:1.9; background:#f2f2f2;} -div,img,tr,td,table{ border:0;} -table,tr,td{border:0;cellspacing:0; cellpadding:0;} -ol,ul,li{ list-style-type:none} -a:link,a:visited{color:#000;text-decoration:none;} -a:hover,a:active{color:#24366e;} - -.sn-fl {float:left;} -.sn-fr {float:right;} -.sn-cl {clear:both;content:".";display:block;font-size:0;height:0;line-height:0;visibility:hidden} -.sn-container {width:100%; background-color:#fff;} -.sn-p-absolute {position:absolute;} -.sn-grey-opacity {background:rgba(230, 230, 230, 0.9)!important; filter:Alpha(opacity=90); background:#e6e6e6;} -.sn-border {border-top:1px solid #dfdfdf; border-bottom:1px solid #dfdfdf;} -/* 公共 */ -.cl{ clear:both;} -.fl{ float:left;} -.fr{ float:right;} -.mb18{ margin-bottom:18px;} -.mt10{ margin-top:10px;} -.mr20{ margin-right:20px;} -.mr10{ margin-right:10px;} - -/*字体,链接颜色*/ -.sn-font-black {color:#000;} -.sn-font-grey {color:#b4bbbf;} -.sn-font-grey2 {color:#5e5e5e;} -.sn-font-grey3 {color:#999;} -a.sn-link-blue {color:#24366e;} -a.sn-link-white {color:#fff;} -a.sn-link-grey {color:#999;} -a.sn-link-grey:hover {color:#24366e;} -a.sn-link-grey2 {color:#888;} -a.sn-link-select {color:#809df9;} -/*字体大小*/ -.sn-f14 {font-size:14px;} -.sn-f18 {font-size:18px;} -/*padding&margin*/ -.sn-mt-10 {margin-left:-10px;} -.sn-mt10 {margin-top:10px;} -.sn-mt13 {margin-top:13px;} -.sn-mt15 {margin-top:15px;} -.sn-mt28 {margin-top:28px;} -.sn-mb40 {margin-bottom:40px;} -.sn-ml15 {margin-left:15px;} -.sn-ml55 {margin-left:55px;} -.sn-mr0 {margin-right:0px !important;} -.sn-mr50 {margin-right:50px;} -/*头部样式*/ -.sn-header {} -.sn-row {width:100%;} -.sn-bg-grey {background-color:#f4f4f4;} -.sn-bg-grey2 {background-color:#a5a5a5;} -.sn-bg-white {background-color:#fff;} -.sn-bg-blue {background-color:#24366e;} -.sn-login {width:1200px; height:45px; line-height:45px; margin:0 auto; font-size:14px; color:#24366e; vertical-align:middle; text-align:right;} -.sn-logo {width:1200px; height:90px; line-height:90px; margin:0 auto; vertical-align:middle;} -.sn-search-input {width:328px; height:40px; font-size:16px; color:#ccc; padding-left:10px; border:1px solid #ccc; border-right:none; float:right; background-color:#fff; outline:none;} -a.sn-search-button {width:53px; height:40px; border:1px solid #ccc; border-left:none; float:right; outline:none; background:url(../images/sn_search_icon.jpg) 0 3px no-repeat;} -.sn-nav {width:1200px; height:55px; margin:0 auto; font-size:16px; position:relative; line-height:1;} -.sn-nav li {float:left; margin-top:10px; margin-right:50px; border-radius:5px;} -.sn-nav li a {display:inline-block; padding:8px 6px;} -.sn-nav li:hover {background-color:#809df9;} -.sn-sub-nav {width:1200px; margin:0 auto; font-size:14px; position:relative; line-height:1;} -.sn-sub-nav li {color:#999; float:left;} -.sn-sub-nav li a {height:40px; line-height:40px; vertical-align:middle; margin:0 5px; padding:0 5px; display:inline-block;} -.sn-sub-nav li a:hover {border-bottom:3px solid #ffbd18; height:37px;} -.sn-subnav-slice {margin:12px 5px;} -.sn-banner {width:1200px; height:210px; margin:0 auto;} -.sn-content-position {width:1200px; height:50px; line-height:50px; vertical-align:middle; font-size:14px; color:#888; margin:0 auto;} -/*footer样式*/ -.sn-footer {width:1200px; height:220px; margin:0 auto; text-align:center; font-size:14px; color:#fff; line-height:normal;} -.sn-footer-link {padding:40px 0 30px 0;} -.sn-footer-link li {display:inline-block;} -.sn-contact {margin-bottom:30px;} -/* 首页内容 */ -.sn-content{ width:1200px; margin:0 auto;} -.sn-content-left{ width:820px; margin-right:12px; margin-bottom:74px;} -.sn-content-right{ width:368px; margin-bottom:74px; } -/* index-banner */ -.sn-index-banner{ width:820px; height:435px; margin-bottom:20px;} -.focus{ position:relative; width:820px; height:435px; background-color: #000; float: left;} -.focus img{ width:820px; height:435px;} -.focus .shadow .title{width: 260px; height: 65px;padding-left: 30px;padding-top: 20px;} -.focus .shadow .title a{ text-decoration:none; color:#fff; font-size:14px; font-weight:bolder; overflow:hidden; } -.focus .btn{ position:absolute; bottom:34px; left:510px; overflow:hidden; zoom:1;} -.focus .btn a{position:relative; display:inline; width:13px; height:13px; border-radius:7px; margin:0 5px;color:#B0B0B0; text-decoration:none; text-align:center; outline:0; float:left; background:#D9D9D9; } -.focus .btn a:hover,.focus .btn a.current{ cursor:pointer;background:#fc114a;} -.focus .fPic{ position:absolute; left:0px; top:0px; } -.focus .D1fBt{ overflow:hidden; zoom:1; height:16px; z-index:10; } -.focus .shadow{ width:100%; position:absolute; bottom:0; left:0px; z-index:10; height:80px; line-height: 80px; background:rgba(0,0,0,0.6); - filter:progid:DXImageTransform.Microsoft.gradient( GradientType = 0,startColorstr = '#80000000',endColorstr = '#80000000')\9; display:block; text-align:left; } -.focus .shadow a{ text-decoration:none; color:#fff; font-size:20px; overflow:hidden; margin-left:10px; } -.focus .fcon{ position:relative; width:100%; float:left; display:none; background:#000 } -.focus .fcon img{ display:block; } -.focus .fbg{bottom:25px; right:40px; position:absolute; height:21px; text-align:center; z-index: 200; } -.focus .fbg div{margin:4px auto 0;overflow:hidden;zoom:1;height:14px} -.focus .D1fBt a{position:relative; display:inline; width:12px; height:12px; border-radius:7px; margin:0 5px;color:#B0B0B0; text-decoration:none; text-align:center; outline:0; float:left; background:#D9D9D9; } -.focus .D1fBt .current,.focus .D1fBt a:hover{background:#fc114a;} -.focus .D1fBt img{display:none} -.focus .D1fBt i{display:none; font-style:normal; } -.focus .prev,.focus .next{position:absolute;width:40px;height:74px;background: url(../images/banner/focus_btn.png) no-repeat;} -.focus .prev{top: 50%;margin-top: -37px; left: 0;background-position:0 -74px; cursor:pointer; } -.focus .next{top: 50%;margin-top: -37px; right: 0; background-position:-40px -74px; cursor:pointer;} -.focus .prev:hover{ background-position:0 0; } -.focus .next:hover{ background-position:-40px 0;} -/* index-news */ -.sn-index-leftbox{ width:820px; background:#fff; margin-bottom:20px;} -.h2-title{ padding:5px 0 3px; border-bottom:1px solid #ebebeb; font-size:18px; color:#777; font-weight:normal; padding-left:17px;} -.h2-title a.more{ font-size:12px; color:#777; float:right; margin-right:17px; line-height:2.8;} -.h2-title a:hover.more{ color:#24366e;} -.sn-news-bigbox{ padding:0px 26px 0px 18px; margin:18px 0 26px; border-right:1px solid #ebebeb;} -.sn-news-bigbox a.h3-title{ font-size:18px; width:380px; display:block;overflow:hidden;white-space:nowrap; text-overflow:ellipsis;} -.sn-news-bigbox .sn-news-txt{ width:380px; color:#666;} -.sn-news-bigbox .sn-news-bigimg{ width:380px; height:165px;} -.txt-grey{ color:#999;} -.sn-news-smallbox{padding:0px 18px 0px 26px; margin:18px 0 26px; width:350px; } -.sn-news-smallbox .sn-news-smallimg{ width:85px; height:85px; margin-right:10px;} -.sn-news-smallbox a.h4-title{ font-size:14px; width:255px; float:left;} -/* index-resources */ -.sn-index-resourcescon{ padding-top:12px;background:#f2f2f2;} -.sn-index-resourcesbox{ padding:10px; background:#f2f2f2; width:185px; float:left;} -.sn-index-resourcesbox:hover{ background:#fff;} -.sn-index-resourcesbox a.resources-title{ font-size:18px; font-weight:normal; line-height:2.0;width:185px; display:block; border-bottom:1px solid #ccc; margin-bottom:5px;} -.sn-index-resourcesbox a.resources-tag{ font-size:14px; color:#999; margin-right:5px; line-height:1.5;} -a.more-btn{ display:block; width:190px; height:30px; text-align:center; background:#ccc; color:#666; line-height:30px;} -/* index-partner */ -.sn-index-partnerbox{ padding:25px 30px; } -.sn-index-partnerbox{ width:775px;} -.sn-index-partnerbox ul li{ height:55px;} -.sn-index-partnerbox ul li a.partnerimg{ display:block; margin:0 10px 10px 0; border:1px solid #ccc; width:370px; height:43px; float:left;} -.partner-btnbox{ width:90px; margin:0 auto;} -.partner-btn{ width:35px; height:22px; background-color:#999; line-height:1.0; font-size:18px; color:#fff; text-align: center; margin-right:5px; cursor:pointer;} -.partner-btn:hover{ background-color:#172b65;} -/* index-active */ -.sn-index-activebox{ margin-bottom:20px; background:#fff; padding-bottom:10px;} -.active-title{width:330px; display:block;overflow:hidden;white-space:nowrap; text-overflow:ellipsis;} -.sn-index-active{ margin:0px 20px 5px 20px;} -.sn-index-active a.sn-activeimg{width:330px; height:210px;} -/* index-wx*/ -.sn-index-wxbox{margin-bottom:20px; background:#fff;} -.sn-index-wximg{ margin:15px; margin-right:5px;} -.sn-index-txt{ font-size:16px; line-height:2.0; margin-top:30px;} -.sn-index-smallbanner img{ display:block; width:369px; height:169px; } - -/* 内页新闻列表 */ -.sn-inner-body{ width:100%; background-color:#fff;} -.sn-innner-content{ width:1200px; margin:0 auto;} -.sn-inner-newsh2{ font-size:20px; font-weight:normal; padding-bottom:5px; border-bottom:1px dashed #eee;} -.sn-circle{ margin:18px 5px 0 5px ;border:1px solid #24366e; width:5px; height:5px; -webkit-border-radius:50px; -moz-border-radius:50px; -o-border-radius:50px; border-radius:50px; } -.sn-inner-newslist ul li{ line-height:42px; font-size:15px; border-bottom:1px solid #eee;} -.sn-inner-newslist a{font-size:15px; color:#888;} -.sn-inner-newslist a:hover{ color:#24366e;} -a.sn-newslist-titile{ font-size:15px;width:840px; display:block;overflow:hidden;white-space:nowrap; text-overflow:ellipsis;} -a:hover.sn-newslist-reply,a:hover.sn-newslist-zan{ color:#379be9;} -.sn-inner-pages a{ display:block; font-size:12px; border:1px solid #d1d1d1; color:#999; float:left; width:30px; text-align:center; padding:3px 0; line-height:1.9; margin-right:5px; -webkit-border-radius:3px; -moz-border-radius:3px; -o-border-radius:3px; border-radius:3px; } -.sn-inner-pages a:hover{ background-color:#24366e; color:#fff;} -a.sn-inner-pages-big{ width:50px;} -a.sn-pages-active{ background-color:#24366e; color:#fff;} -.sn-inner-pages{width:330px; margin:20px auto 10px;} -/* 内页新闻展示 */ -.sn-inner-newscon{ width:1200px; padding:5px 0 50px; border-bottom:1px solid #e8e8e8; margin-bottom:30px; color:#999; font-size:14px; } -.sn-inner-pcon{text-indent:2em;} -.sn-inner-newscon img{ display:block; width:830px; margin:25px auto 5px;} -.sn-inner-psmall{ color:#999; font-size:12px; margin-bottom:15px;} -.sn-inner-imgp{ color:#000; text-align:center; margin-bottom:30px;} -a.sn-newslist-zan{ display:block; background:url(../images/zan.gif) 0 15px no-repeat; width:54px; height:28px; padding-left:12px; color:#999; } -a:hover.sn-newslist-zan{ background:url(../images/zan.gif) 0 -21px no-repeat; } -/* 留言 */ -.sn-replybox{ margin-bottom:100px;} -.sn-reply-h2{ font-size:18px; font-weight:normal; color:#24366e; margin-bottom:6px;} -.sn-reply-form{ width:1200px;height:180px; border:1px solid #e8e8e8; -webkit-border-radius:3px; -moz-border-radius:3px; -o-border-radius:3px; border-radius:3px; background:#fff; margin-bottom:20px; } -.sn-reply-text{ width:1200px; height:130px; background:#fff; border:none; resize:none;} -.sn-reply-btnbox{border-top:1px solid #e8e8e8; height:48px;} -a.submit-btn{ display:block; color:#fff; text-align:center; font-size:14px; line-height:27px; width:79px; height:27px; -webkit-border-radius:3px; -moz-border-radius:3px; -o-border-radius:3px; border-radius:3px; background:#24366e; margin:8px 0 0 10px;} -a:hover.submit-btn{ color:#16275c; color:#fff;} -.sn-comment-h2{ color:#999; font-size:16px; font-weight:normal; border-bottom:1px solid #e8e8e8; padding-bottom:5px;} -.sn-reply-userpic{ height:65px; margin-right:15px;} -.sn-reply-userpic img{ width:40px; height:40px;-webkit-border-radius:50px; -moz-border-radius:50px; -o-border-radius:50px; border-radius:50px;} -a.sn-reply-zan{ display:block; background:url(../images/zan.gif) 0 4px no-repeat; width:54px; height:16px; padding-left:12px; color:#999; } -a:hover.sn-reply-zan{ background:url(../images/zan.gif) 0 -32px no-repeat; } -.sn-comment-listbox{ padding:23px 0; width:1200px;border-bottom:1px solid #e8e8e8;} -a.sn-reply-username { color:#24366e; margin-right:15px; } -.sn-reply-usertxt{ width:1145px; font-size:14px; } -.sn-reply-more{ width:1200px; height:25px; background:#ddd; text-align:center; line-height:25px;} - -/*用户图像*/ -.topnav_login_list{ border:1px solid #eaeaea; background:#fff; padding-left:10px; padding-bottom:10px; padding-top:8px; width:60px; left:-7px; position:absolute; z-index:9999; line-height:2; box-shadow: 0px 2px 8px rgba(146, 153, 169, 0.5); margin-top: 1px;} -.topnav_login_list a{color:#269ac9;} -.topnav_login_list li{ } -.homepageProfileMenuIcon {background:url(../images/nav_icon.png) 30px -155px no-repeat; width:65px; height:54px; position:relative; display:inline-block; line-height:0;} -.homepageLeft {width:240px; float:left; margin-right:10px; margin-bottom:10px;} -.none {display: none;} -.user-img,.user-img img{ margin-right:10px; -moz-border-radius: 50px; -webkit-border-radius: 50px;border-radius: 50px; display:block; width:40px; height:40px;} -.ml60{ margin-left:60px;} -.user-img img{border:2px solid #e6473b; } -.user-img img:hover{border:2px solid #29156f;} - -.fr{float: right} - - - - - - - - - - - - +/* CSS Document */ +/* 样式重置 */ +body,h1,h2,h3,h4,h5,h6,hr,p,blockquote,dl,dt,dd,ul,ol,li,pre,form,fieldset,legend,button,input,textarea,th,td{ margin:0; padding:0;} +body,table,input,textarea,select,button { font-family: "微软雅黑","宋体"; font-size:12px;line-height:1.9; background:#f2f2f2;} +div,img,tr,td,table{ border:0;} +table,tr,td{border:0;cellspacing:0; cellpadding:0;} +ol,ul,li{ list-style-type:none} +a:link,a:visited{color:#000;text-decoration:none;} +a:hover,a:active{color:#24366e;} + +.sn-fl {float:left;} +.sn-fr {float:right;} +.sn-cl {clear:both;content:".";display:block;font-size:0;height:0;line-height:0;visibility:hidden} +.sn-container {width:100%; background-color:#fff;} +.sn-p-absolute {position:absolute;} +.sn-grey-opacity {background:rgba(230, 230, 230, 0.9)!important; filter:Alpha(opacity=90); background:#e6e6e6;} +.sn-border {border-top:1px solid #dfdfdf; border-bottom:1px solid #dfdfdf;} +/* 公共 */ +.cl {clear:both;} +.fl {float:left;} +.fr {float:right;} +.mb18 {margin-bottom:18px;} +.mt10 {margin-top:10px;} +.mr20 {margin-right:20px;} +.mr10 {margin-right:10px;} + +/*字体,链接颜色*/ +.sn-font-black {color:#000;} +.sn-font-grey {color:#b4bbbf;} +.sn-font-grey2 {color:#5e5e5e;} +.sn-font-grey3 {color:#999;} +a.sn-link-blue {color:#24366e;} +a.sn-link-white {color:#fff;} +a.sn-link-grey {color:#999;} +a.sn-link-grey:hover {color:#24366e;} +a.sn-link-grey2 {color:#888;} +a.sn-link-select {color:#809df9;} +/*字体大小*/ +.sn-f12 {font-size:12px;} +.sn-f14 {font-size:14px;} +.sn-f18 {font-size:18px;} +/*padding&margin*/ +.sn-mt-10 {margin-left:-10px;} +.sn-mt4 {margin-top:4px;} +.sn-mt10 {margin-top:10px;} +.sn-mt13 {margin-top:13px;} +.sn-mt15 {margin-top:15px;} +.sn-mt28 {margin-top:28px;} +.sn-mb40 {margin-bottom:40px;} +.sn-ml15 {margin-left:15px;} +.sn-ml55 {margin-left:55px;} +.sn-mr0 {margin-right:0px !important;} +.sn-mr50 {margin-right:50px;} +/*头部样式*/ +.sn-header {} +.sn-row {width:100%;} +.sn-bg-grey {background-color:#f4f4f4;} +.sn-bg-grey2 {background-color:#a5a5a5;} +.sn-bg-white {background-color:#fff;} +.sn-bg-blue {background-color:#24366e;} +.sn-login {width:1200px; height:45px; line-height:45px; margin:0 auto; font-size:14px; color:#24366e; vertical-align:middle; text-align:right;} +.sn-login2 {width:1200px; height:54px; line-height:54px; margin:0 auto; font-size:14px; color:#24366e; vertical-align:middle; text-align:right;} +.sn-logo {width:1200px; height:90px; line-height:90px; margin:0 auto; vertical-align:middle;} +.sn-search-input {width:328px; height:40px; font-size:16px; color:#ccc; padding-left:10px; border:1px solid #ccc; border-right:none; float:right; background-color:#fff; outline:none;} +a.sn-search-button {width:53px; height:40px; border:1px solid #ccc; border-left:none; float:right; outline:none; background:url(../images/sn_search_icon.jpg) 0 3px no-repeat;} +.sn-nav {width:1200px; height:55px; margin:0 auto; font-size:16px; position:relative; line-height:1;} +.sn-nav li {float:left; padding-top:11px; padding-bottom:12px; margin-right:50px;} +.sn-nav li a {display:inline-block; padding:8px 6px; border-radius:5px;} +.sn-nav li a:hover {background-color:#809df9;} +.sn-sub-nav {width:1200px; margin:0 auto; font-size:14px; position:relative; line-height:1;} +.sn-sub-nav li {color:#999; float:left;} +.sn-sub-nav li a {height:40px; line-height:40px; vertical-align:middle; margin:0 5px; padding:0 5px; display:inline-block;} +.sn-sub-nav li a:hover {border-bottom:3px solid #ffbd18; height:37px;} +.sn-subnav-slice {margin:12px 5px;} +.sn-banner {width:1200px; height:210px; margin:0 auto;} +.sn-content-position {width:1200px; height:50px; line-height:50px; vertical-align:middle; font-size:14px; color:#888; margin:0 auto;} +/*footer样式*/ +.sn-footer {width:1200px; height:220px; margin:0 auto; text-align:center; font-size:14px; color:#fff; line-height:normal;} +.sn-footer-link {padding:40px 0 30px 0;} +.sn-footer-link li {display:inline-block;} +.sn-contact {margin-bottom:30px;} +/* 首页内容 */ +.sn-content{ width:1200px; margin:0 auto;} +.sn-content-left{ width:820px; margin-right:12px; margin-bottom:100px;} +.sn-content-right{ width:368px; margin-bottom:74px; } +/* index-banner */ +.sn-index-banner{ width:820px; height:435px; margin-bottom:20px;} +.focus{ position:relative; width:820px; height:435px; background-color: #000; float: left;} +.focus img{ width:820px; height:435px;} +.focus .shadow .title{width: 260px; height: 65px;padding-left: 30px;padding-top: 20px;} +.focus .shadow .title a{ text-decoration:none; color:#fff; font-size:14px; font-weight:bolder; overflow:hidden; } +.focus .btn{ position:absolute; bottom:34px; left:510px; overflow:hidden; zoom:1;} +.focus .btn a{position:relative; display:inline; width:13px; height:13px; border-radius:7px; margin:0 5px;color:#B0B0B0; text-decoration:none; text-align:center; outline:0; float:left; background:#D9D9D9; } +.focus .btn a:hover,.focus .btn a.current{ cursor:pointer;background:#fc114a;} +.focus .fPic{ position:absolute; left:0px; top:0px; } +.focus .D1fBt{ overflow:hidden; zoom:1; height:16px; z-index:10; } +.focus .shadow{ width:100%; position:absolute; bottom:0; left:0px; z-index:10; height:80px; line-height: 80px; background:rgba(0,0,0,0.6); + filter:progid:DXImageTransform.Microsoft.gradient( GradientType = 0,startColorstr = '#80000000',endColorstr = '#80000000')\9; display:block; text-align:left; } +.focus .shadow a{ text-decoration:none; color:#fff; font-size:20px; overflow:hidden; margin-left:10px; } +.focus .fcon{ position:relative; width:100%; float:left; display:none; background:#000 } +.focus .fcon img{ display:block; } +.focus .fbg{bottom:25px; right:40px; position:absolute; height:21px; text-align:center; z-index: 200; } +.focus .fbg div{margin:4px auto 0;overflow:hidden;zoom:1;height:14px} +.focus .D1fBt a{position:relative; display:inline; width:12px; height:12px; border-radius:7px; margin:0 5px;color:#B0B0B0; text-decoration:none; text-align:center; outline:0; float:left; background:#D9D9D9; } +.focus .D1fBt .current,.focus .D1fBt a:hover{background:#fc114a;} +.focus .D1fBt img{display:none} +.focus .D1fBt i{display:none; font-style:normal; } +.focus .prev,.focus .next{position:absolute;width:40px;height:74px;background: url(../images/banner/focus_btn.png) no-repeat;} +.focus .prev{top: 50%;margin-top: -37px; left: 0;background-position:0 -74px; cursor:pointer; } +.focus .next{top: 50%;margin-top: -37px; right: 0; background-position:-40px -74px; cursor:pointer;} +.focus .prev:hover{ background-position:0 0; } +.focus .next:hover{ background-position:-40px 0;} +/* index-news */ +.sn-index-leftbox{ width:820px; background:#fff; margin-bottom:20px;} +.h2-title{ padding:5px 0 3px; border-bottom:1px solid #ebebeb; font-size:18px; color:#777; font-weight:normal; padding-left:17px;} +.h2-title a.more{ font-size:12px; color:#777; float:right; margin-right:17px; line-height:2.8;} +.h2-title a:hover.more{ color:#24366e;} +.sn-news-bigbox{ padding:0px 26px 0px 18px; margin:18px 0 26px; border-right:1px solid #ebebeb;} +.sn-news-bigbox a.h3-title{ font-size:18px; width:380px; display:block;overflow:hidden;white-space:nowrap; text-overflow:ellipsis;} +.sn-news-bigbox .sn-news-txt{ width:380px; color:#666;} +.sn-news-bigbox .sn-news-bigimg{ width:380px; height:165px;} +.txt-grey{ color:#999;} +.sn-news-smallbox{padding:0px 18px 0px 26px; margin:18px 0 26px; width:350px; } +.sn-news-smallbox .sn-news-smallimg{ width:85px; height:85px; margin-right:10px;} +.sn-news-smallbox a.h4-title{ font-size:14px; width:255px; float:left;} +/* index-resources */ +.sn-index-resourcescon{ padding-top:12px;background:#f2f2f2;} +.sn-index-resourcesbox{ padding:10px; background:#f2f2f2; width:185px; float:left;} +.sn-index-resourcesbox:hover{ background:#fff;} +.sn-index-resourcesbox a.resources-title{ font-size:18px; font-weight:normal; line-height:2.0;width:185px; display:block; border-bottom:1px solid #ccc; margin-bottom:5px;} +.sn-index-resourcesbox a.resources-tag{ font-size:14px; color:#999; margin-right:5px; line-height:1.5;} +a.more-btn{ display:block; width:190px; height:30px; text-align:center; background:#ccc; color:#666; line-height:30px;} +/* index-partner */ +.sn-index-partnerbox{ padding:25px 30px; } +.sn-index-partnerbox{ width:775px;} +.sn-index-partnerbox ul li{ height:55px;} +.sn-index-partnerbox ul li a.partnerimg{ display:block; margin:0 10px 10px 0; border:1px solid #ccc; width:370px; height:43px; float:left;} +.partner-btnbox{ width:90px; margin:0 auto;} +.partner-btn{ width:35px; height:22px; background-color:#999; line-height:1.0; font-size:18px; color:#fff; text-align: center; margin-right:5px; cursor:pointer;} +.partner-btn:hover{ background-color:#172b65;} +/* index-active */ +.sn-index-activebox{ margin-bottom:20px; background:#fff; padding-bottom:10px;} +.active-title{width:330px; display:block;overflow:hidden;white-space:nowrap; text-overflow:ellipsis;} +.sn-index-active{ margin:0px 20px 5px 20px;} +.sn-index-active a.sn-activeimg{width:330px; height:210px;} +/* index-wx*/ +.sn-index-wxbox{margin-bottom:20px; background:#fff;} +.sn-index-wximg{ margin:15px; margin-right:5px;} +.sn-index-txt{ font-size:16px; line-height:2.0; margin-top:30px;} +.sn-index-smallbanner img{ display:block; width:369px; height:169px; } + +/* 内页新闻列表 */ +.sn-inner-body{ width:100%; background-color:#fff;} +.sn-innner-content{ width:1200px; margin:0 auto;} +.sn-inner-newsh2{ font-size:20px; font-weight:normal; padding-bottom:5px; border-bottom:1px dashed #eee;} +.sn-circle{ margin:18px 5px 0 5px ;border:1px solid #24366e; width:5px; height:5px; -webkit-border-radius:50px; -moz-border-radius:50px; -o-border-radius:50px; border-radius:50px; } +.sn-inner-newslist ul li{ line-height:42px; font-size:15px; border-bottom:1px solid #eee;} +.sn-inner-newslist a{font-size:15px; color:#888;} +.sn-inner-newslist a:hover{ color:#24366e;} +a.sn-newslist-titile{ font-size:15px;width:840px; display:block;overflow:hidden;white-space:nowrap; text-overflow:ellipsis;} +a:hover.sn-newslist-reply,a:hover.sn-newslist-zan{ color:#379be9;} +.sn-inner-pages a{ display:block; font-size:12px; border:1px solid #d1d1d1; color:#999; float:left; width:30px; text-align:center; padding:3px 0; line-height:1.9; margin-right:5px; -webkit-border-radius:3px; -moz-border-radius:3px; -o-border-radius:3px; border-radius:3px; } +.sn-inner-pages a:hover{ background-color:#24366e; color:#fff;} +a.sn-inner-pages-big{ width:50px;} +a.sn-pages-active{ background-color:#24366e; color:#fff;} +.sn-inner-pages{width:330px; margin:40px auto 100px;} +/* 内页新闻展示 */ +.sn-inner-newscon{ width:1200px; padding:5px 0 50px; border-bottom:1px solid #e8e8e8; margin-bottom:30px; color:#999; font-size:14px; } +.sn-inner-pcon{text-indent:2em;} +.sn-inner-newscon img{ display:block; width:830px; margin:25px auto 5px;} +.sn-inner-psmall{ color:#999; font-size:12px; margin-bottom:15px;} +.sn-inner-imgp{ color:#000; text-align:center; margin-bottom:30px;} +a.sn-newslist-zan{ display:block; background:url(../images/zan.gif) 0 15px no-repeat; width:54px; height:28px; padding-left:12px; color:#999; } +a:hover.sn-newslist-zan{ background:url(../images/zan.gif) 0 -21px no-repeat; } +/* 留言 */ +.sn-replybox{ margin-bottom:100px;} +.sn-reply-h2{ font-size:18px; font-weight:normal; color:#24366e; margin-bottom:6px;} +.sn-reply-form{ width:1200px;height:180px; border:1px solid #e8e8e8; -webkit-border-radius:3px; -moz-border-radius:3px; -o-border-radius:3px; border-radius:3px; background:#fff; margin-bottom:20px; } +.sn-reply-text{ width:1200px; height:130px; background:#fff; border:none; resize:none;} +.sn-reply-btnbox{border-top:1px solid #e8e8e8; height:48px;} +a.submit-btn{ display:block; color:#fff; text-align:center; font-size:14px; line-height:27px; width:79px; height:27px; -webkit-border-radius:3px; -moz-border-radius:3px; -o-border-radius:3px; border-radius:3px; background:#24366e; margin:8px 0 0 10px;} +a:hover.submit-btn{ color:#16275c; color:#fff;} +.sn-comment-h2{ color:#999; font-size:16px; font-weight:normal; border-bottom:1px solid #e8e8e8; padding-bottom:5px;} +.sn-reply-userpic{ height:65px; margin-right:15px;} +.sn-reply-userpic img{ width:40px; height:40px;-webkit-border-radius:50px; -moz-border-radius:50px; -o-border-radius:50px; border-radius:50px;} +a.sn-reply-zan{ display:block; background:url(../images/zan.gif) 0 4px no-repeat; width:54px; height:16px; padding-left:12px; color:#999; } +a:hover.sn-reply-zan{ background:url(../images/zan.gif) 0 -32px no-repeat; } +.sn-comment-listbox{ padding:23px 0; width:1200px;border-bottom:1px solid #e8e8e8;} +a.sn-reply-username { color:#24366e; margin-right:15px; } +.sn-reply-usertxt{ width:1145px; font-size:14px; } +.sn-reply-more{ width:1200px; height:25px; background:#ddd; text-align:center; line-height:25px;} + +/*用户图像*/ +.topnav_login_list{ border:1px solid #eaeaea; background:#fff; padding-left:10px; padding-bottom:10px; padding-top:8px; width:60px; left:-7px; position:absolute; z-index:9999; line-height:2; box-shadow: 0px 2px 8px rgba(146, 153, 169, 0.5); margin-top: 1px;} +.topnav_login_list a{color:#269ac9;} +.topnav_login_list li{ } +.homepageProfileMenuIcon {background:url(../images/nav_icon.png) 30px -155px no-repeat; width:65px; height:54px; position:relative; display:inline-block; line-height:0;} +.homepageLeft {width:240px; float:left; margin-right:10px; margin-bottom:10px;} +.none {display: none;} +.user-img,.user-img img{ margin-right:10px; -moz-border-radius: 50px; -webkit-border-radius: 50px;border-radius: 50px; display:block; width:40px; height:40px;} +.ml60{ margin-left:60px;} +.user-img img{border:2px solid #e6473b; } +.user-img img:hover{border:2px solid #29156f;} + + + + + + + + + + + + From 9ba0d50f26589c4233e009c1eb6ecf33992eb2e6 Mon Sep 17 00:00:00 2001 From: Tim Date: Tue, 26 Apr 2016 10:16:23 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E6=8B=89=E4=BB=A3=E7=A0=81=E6=9B=B4?= =?UTF-8?q?=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/helpers/organizations_helper.rb | 221 ++++++++------- app/views/organizations/_org_content.html.erb | 259 ++++++++++++++++++ .../organizations/_subfield_list.html.erb | 4 +- 3 files changed, 382 insertions(+), 102 deletions(-) create mode 100644 app/views/organizations/_org_content.html.erb diff --git a/app/helpers/organizations_helper.rb b/app/helpers/organizations_helper.rb index 03a61a65f..e42bae220 100644 --- a/app/helpers/organizations_helper.rb +++ b/app/helpers/organizations_helper.rb @@ -1,100 +1,121 @@ -# encoding: utf-8 -module OrganizationsHelper - include ApplicationHelper - include FilesHelper - - - def find_user_not_in_current_org_by_name org - if params[:q] && params[:q].lstrip.rstrip != "" - scope = Principal.active.sorted.not_member_of_org(org).like(params[:q]) - else - scope = [] - end - principals = paginateHelper scope,10 - s = content_tag('ul', project_member_check_box_tags_ex('membership[user_ids][]', principals), :class => 'mb5', :id => 'principals') - links = pagination_links_full(@obj_pages, @obj_count, :per_page_links => false, :remote => false, :flag => true){|text, parameters, options| - link_to text, org_member_autocomplete_org_member_index_path( parameters.merge(:q => params[:q],:flag => true,:org=>org, :format => 'js')), :remote => true - } - s + content_tag('ul', links,:class => 'wlist',:style=>'float:left !important', :id => "org_member_pagination_links" ) - end - - def get_default_name field - case field.name - when 'activity' then - return '动态' - when 'course' then - return '课程' - when 'project' then - return '项目' - end - end - - def get_message_org(org_id, field_id) - OrgDocumentComment.find_by_sql("SELECT * FROM org_document_comments where organization_id = #{org_id} and org_subfield_id = #{field_id} and parent_id is null order by updated_at desc limit 8;") - end - - def get_message_reply_org(org_id, ids) - # OrgDocumentComment.find_by_sql("SELECT * FROM org_document_comments where organization_id = #{org_id} and parent_id is not null order by updated_at desc limit 1;") - OrgDocumentComment.find_by_sql("SELECT * FROM org_document_comments where organization_id = #{org_id} and parent_id in (#{ids}) order by updated_at desc limit 1;") - end - - def get_attach_org(field_id) - Attachment.find_by_sql("SELECT * FROM `attachments` where container_id =#{field_id} and container_type = 'OrgSubfield' and is_public =1 order by created_on limit 6;") - end - - def get_attach_org2(field) - org_attachments = field.attachments - attachments = User.current.admin? ? org_attachments : visable_attachemnts(org_attachments) - return attachments.sort_by{|x| x.created_on}.reverse.first(6) - # Attachment.find_by_sql("SELECT * FROM `attachments` where container_id =#{field_id} and container_type = 'OrgSubfield' and is_public =1 order by created_on limit 6;") - end - - # 从内容中获取路径 - def get_image_path_from_content content - r = Regexp.new(/src="\/files\/uploads\/image(.+?)"/) - if r.match(content).nil? - image_path = nil - else - image_path = r.match(content)[1] - end - end - - #排列下拉框 - def subfield_status_option - type = [] - option1 = [] - option1 << "左上" - option1 << "1" - type << option1 - option2 = [] - option2 << "左中一" - option2 << "2" - type << option2 - option3 = [] - option3 << "左中二" - option3 << "3" - type << option3 - option4 = [] - option4 << "左中下" - option4 << "4" - type << option4 - option5 = [] - option5 << "左下" - option5 << "5" - type << option5 - option6 = [] - option6 << "右上" - option6 << "6" - type << option6 - option7 = [] - option7 << "右中" - option7 << "7" - type << option7 - option8 = [] - option8 << "右下" - option8 << "8" - type << option8 - type - end - -end +# encoding: utf-8 +module OrganizationsHelper + include ApplicationHelper + include FilesHelper + + + def find_user_not_in_current_org_by_name org + if params[:q] && params[:q].lstrip.rstrip != "" + scope = Principal.active.sorted.not_member_of_org(org).like(params[:q]) + else + scope = [] + end + principals = paginateHelper scope,10 + s = content_tag('ul', project_member_check_box_tags_ex('membership[user_ids][]', principals), :class => 'mb5', :id => 'principals') + links = pagination_links_full(@obj_pages, @obj_count, :per_page_links => false, :remote => false, :flag => true){|text, parameters, options| + link_to text, org_member_autocomplete_org_member_index_path( parameters.merge(:q => params[:q],:flag => true,:org=>org, :format => 'js')), :remote => true + } + s + content_tag('ul', links,:class => 'wlist',:style=>'float:left !important', :id => "org_member_pagination_links" ) + end + + def get_default_name field + case field.name + when 'activity' then + return '动态' + when 'course' then + return '课程' + when 'project' then + return '项目' + end + end + + def get_message_org(org_id, field_id) + OrgDocumentComment.find_by_sql("SELECT * FROM org_document_comments where organization_id = #{org_id} and org_subfield_id = #{field_id} and parent_id is null order by updated_at desc limit 8;") + end + + def get_message_reply_org(org_id, ids) + # OrgDocumentComment.find_by_sql("SELECT * FROM org_document_comments where organization_id = #{org_id} and parent_id is not null order by updated_at desc limit 1;") + OrgDocumentComment.find_by_sql("SELECT * FROM org_document_comments where organization_id = #{org_id} and parent_id in (#{ids}) order by updated_at desc limit 1;") + end + + def get_attach_org(field_id) + Attachment.find_by_sql("SELECT * FROM `attachments` where container_id =#{field_id} and container_type = 'OrgSubfield' and is_public =1 order by created_on limit 6;") + end + + def get_attach_org2(field) + org_attachments = field.attachments + attachments = User.current.admin? ? org_attachments : visable_attachemnts(org_attachments) + return attachments.sort_by{|x| x.created_on}.reverse.first(6) + # Attachment.find_by_sql("SELECT * FROM `attachments` where container_id =#{field_id} and container_type = 'OrgSubfield' and is_public =1 order by created_on limit 6;") + end + + # 从内容中获取路径 + def get_image_path_from_content content + r = Regexp.new(/src="\/files\/uploads\/image(.+?)"/) + if r.match(content).nil? + image_path = nil + else + image_path = r.match(content)[1] + end + end + + #排列下拉框 + def subfield_status_option + type = [] + option1 = [] + option1 << "左上" + option1 << "1" + type << option1 + option2 = [] + option2 << "中一" + option2 << "2" + type << option2 + option3 = [] + option3 << "中二" + option3 << "3" + type << option3 + option4 = [] + option4 << "中下" + option4 << "4" + type << option4 + option5 = [] + option5 << "左下" + option5 << "5" + type << option5 + option6 = [] + option6 << "右上" + option6 << "6" + type << option6 + option7 = [] + option7 << "右中" + option7 << "7" + type << option7 + option8 = [] + option8 << "右下" + option8 << "8" + type << option8 + type + end + + def subfield_list_type subfield + case subfield.to_i + when 1 + resulet = "左上" + when 2 + resulet = "中一" + when 3 + resulet = "中二" + when 4 + resulet = "中下" + when 5 + resulet = "左下" + when 6 + resulet = "右上" + when 7 + resulet = "右中" + when 8 + resulet = "右下" + end + end + +end diff --git a/app/views/organizations/_org_content.html.erb b/app/views/organizations/_org_content.html.erb new file mode 100644 index 000000000..c7d53356c --- /dev/null +++ b/app/views/organizations/_org_content.html.erb @@ -0,0 +1,259 @@ + +<% if is_default_field?(field) %> + <% case field.name %> + <% when 'course' %> + <% if field.status.to_i == 1 %> + + <% elsif field.status.to_i == 2 %> + + <% elsif field.status.to_i == 3 %> + + <% elsif field.status.to_i == 4 %> + + <% elsif field.status.to_i == 5 %> + + <% elsif field.status.to_i == 6 %> + + <% end %> +
+ <% if field.status == 0 %> +
+

课程动态

+ <% if @course_acts.blank? %> + +
+ <%= link_to "More", organization_path(@organization, :list =>1), :class => "more-btn-center mt30" , :target => "_blank" %> +
+ <% else %> +
+
    + <% unless @course_acts.nil? %> + <%= render :partial => 'organizations/org_new_course_pic', :locals => {:activities => @course_acts.first(3)} %> + <% end %> +
    + <%= link_to "More", organization_path(@organization, :list =>1), :class => "more-btn-center mt30" , :target => "_blank" %> +
    +
+
+ <% end %> +
+ <% else %> +
+

课程动态

+ <% if @course_acts.blank? %> + +
+ <%= link_to "More", organization_path(@organization, :list =>1), :class => "more-btn-center mt30" , :target => "_blank" %> +
+ <% else %> +
+ <%= render :partial => 'organizations/org_new_course_act_list', :locals =>{:activities => @course_acts, :field => field, :organization => @organization} %> + +
+
+ <%= link_to "More", organization_path(@organization, :list =>1), :class => "more-btn-center mt30" , :target => "_blank" %> +
+ <% end %> + + +
+ <% end %> +
+ <% when 'project' %> +
+ <% if field.status == 0 %> +
+

项目动态

+ <% if @project_acts.blank? %> + +
+ <%= link_to "More", organization_path(@organization, :list =>1), :class => "more-btn-center mt30" , :target => "_blank" %> +
+ <% else %> +
+
    + <% unless @project_acts.nil? %> + <%= render :partial => 'organizations/org_new_project_pic', :locals => {:activities => @project_acts.first(3)} %> + <% end %> +
    + <%= link_to "More", organization_path(@organization, :list =>1), :class => "more-btn-center mt30" , :target => "_blank" %> +
    +
+
+ <% end %> + +
+ <% else %> +
+

项目动态

+ <% if @project_acts.blank? %> + +
+ <%= link_to "More", organization_path(@organization, :list =>1), :class => "more-btn-center mt30" , :target => "_blank" %> +
+ <% else %> +
+ <%= render :partial => 'organizations/org_new_project_act_list', :locals =>{:activities => @project_acts, :field => field, :organization => @organization} %> + +
+
+ <%= link_to "More", organization_path(@organization, :list =>1), :class => "more-btn-center mt30" , :target => "_blank" %> +
+ <% end %> + +
+ <% end %> +
+ <% end %> +<% else %> + <% if field.field_type == "Post" %> <%# 讨论类型 %> + <% org_subfield = OrgSubfield.find(field.id) %> + <% org_subfield_ids = org_subfield.org_document_comments.map(&:id) << 0 %> + <% org_acts = OrgActivity.where("(org_act_type='OrgDocumentComment'and org_act_id in (#{org_subfield_ids.join(",")})) || (container_type='OrgSubfield' and container_id=#{org_subfield.id})").order('updated_at desc') %> + <%# message_ats = get_message_org(@organization.id, field.id) %> + <%# ids = field.org_document_comments.map{|o| o.id}.join(",") %> +
+ <% if field.status == 0 %> +
+

<%= field.name %>

+ <% if org_acts.blank? %> + +
+ <% if !field.subfield_subdomain_dir.nil? %> + <% if !request.local? and Secdomain.where("sub_type=2 and pid=?", @organization.id).count > 0 and Secdomain.where("sub_type=2 and pid=?", @organization.id).map(&:subname).include?(request.subdomain) %> + <%= link_to "More", show_subfield_without_id_path(:sub_dir_name => field.subfield_subdomain_dir.name), :class => "more-btn-center mt30" , :target => "_blank" %> + <% else %> + <%= link_to "More", show_org_subfield_organization_path(:id => @organization.id, :sub_dir_name => field.subfield_subdomain_dir.name), :class => "more-btn-center mt30" , :target => "_blank" %> + <% end %> + <% else %> + <%= link_to "More", organization_path(@organization, :org_subfield_id => field.id), :class => "more-btn-center mt30" , :target => "_blank" %> + <% end %> + + <%#= link_to "More", organization_path(@organization, :org_subfield_id => field.id), :class => "more-btn-center mt30" , :target => "_blank" %> +
+ <% else %> +
+
    + + <% org_acts.first(3).each do |act| %> + <%= render :partial => 'organizations/org_new_forum_pic', :locals => {:activity => act, :field => field, :organization => @organization} %> + <% end %> +
    +
+ <% if !field.subfield_subdomain_dir.nil? %> + <% if !request.local? and Secdomain.where("sub_type=2 and pid=?", @organization.id).count > 0 and Secdomain.where("sub_type=2 and pid=?", @organization.id).map(&:subname).include?(request.subdomain) %> + <%= link_to "More", show_subfield_without_id_path(:sub_dir_name => field.subfield_subdomain_dir.name), :class => "more-btn-center mt30" , :target => "_blank" %> + <% else %> + <%= link_to "More", show_org_subfield_organization_path(:id => @organization.id, :sub_dir_name => field.subfield_subdomain_dir.name), :class => "more-btn-center mt30" , :target => "_blank" %> + <% end %> + <% else %> + <%= link_to "More", organization_path(@organization, :org_subfield_id => field.id), :class => "more-btn-center mt30" , :target => "_blank" %> + <% end %> + <%#= link_to "More", organization_path(@organization, :org_subfield_id => field.id), :class => "more-btn-center mt30" , :target => "_blank" %> +
+
+ <% end %> + +
+ <% else %> +
+

<%= field.name %>

+ <% if org_acts.blank? %> + +
+ <% if !field.subfield_subdomain_dir.nil? %> + <% if !request.local? and Secdomain.where("sub_type=2 and pid=?", @organization.id).count > 0 and Secdomain.where("sub_type=2 and pid=?", @organization.id).map(&:subname).include?(request.subdomain) %> + <%= link_to "More", show_subfield_without_id_path(:sub_dir_name => field.subfield_subdomain_dir.name), :class => "more-btn-center mt30" , :target => "_blank" %> + <% else %> + <%= link_to "More", show_org_subfield_organization_path(:id => @organization.id, :sub_dir_name => field.subfield_subdomain_dir.name), :class => "more-btn-center mt30" , :target => "_blank" %> + <% end %> + <% else %> + <%= link_to "More", organization_path(@organization, :org_subfield_id => field.id), :class => "more-btn-center mt30" , :target => "_blank" %> + <% end %> +
+ <% else %> +
+ <% org_acts.each do |act| %> + <%= render :partial => 'organizations/org_new_forum_list', :locals => {:activity => act, :field => field, :organization => @organization} %> + <% end %> + +
+
+ <% if !field.subfield_subdomain_dir.nil? %> + <% if !request.local? and Secdomain.where("sub_type=2 and pid=?", @organization.id).count > 0 and Secdomain.where("sub_type=2 and pid=?", @organization.id).map(&:subname).include?(request.subdomain) %> + <%= link_to "More", show_subfield_without_id_path(:sub_dir_name => field.subfield_subdomain_dir.name), :class => "more-btn-center mt30" , :target => "_blank" %> + <% else %> + <%= link_to "More", show_org_subfield_organization_path(:id => @organization.id, :sub_dir_name => field.subfield_subdomain_dir.name), :class => "more-btn-center mt30" , :target => "_blank" %> + <% end %> + <% else %> + <%= link_to "More", organization_path(@organization, :org_subfield_id => field.id), :class => "more-btn-center mt30" , :target => "_blank" %> + <% end %> +
+ <% end %> + +
+
+ <% end %> +
+ <% elsif field.field_type == "Resource" %> + <% org_attachs = get_attach_org2(field) %> +
+
+

<%= field.name %>

+ <% if org_attachs.blank? %> + +
+ <% if !field.subfield_subdomain_dir.nil? %> + <% if !request.local? and Secdomain.where("sub_type=2 and pid=?", @organization.id).count > 0 and Secdomain.where("sub_type=2 and pid=?", @organization.id).map(&:subname).include?(request.subdomain) %> + <%= link_to "More", show_subfield_without_id_path(:sub_dir_name => field.subfield_subdomain_dir.name), :class => "more-btn-center mt30", :target => "_blank" %> + <% else %> + <%= link_to "More", show_org_subfield_organization_path(:id => @organization.id, :sub_dir_name => field.subfield_subdomain_dir.name), :class => "more-btn-center mt30", :target => "_blank" %> + <% end %> + <% else %> + <%= link_to "More", org_subfield_files_path(field), :class => "more-btn-center mt30", :target => "_blank" %> + <% end %> + <%#= link_to "More", organization_path(@organization, :org_subfield_id => field.id), :class => "more-btn-center mt30" , :target => "_blank" %> +
+ <% else %> +
+ <%= render :partial => 'organizations/org_new_resource', :locals => {:org_attachs => org_attachs} %> + +
+ +
+ <% if !field.subfield_subdomain_dir.nil? %> + <% if !request.local? and Secdomain.where("sub_type=2 and pid=?", @organization.id).count > 0 and Secdomain.where("sub_type=2 and pid=?", @organization.id).map(&:subname).include?(request.subdomain) %> + <%= link_to "More", show_subfield_without_id_path(:sub_dir_name => field.subfield_subdomain_dir.name), :class => "more-btn-center mt30", :target => "_blank" %> + <% else %> + <%= link_to "More", show_org_subfield_organization_path(:id => @organization.id, :sub_dir_name => field.subfield_subdomain_dir.name), :class => "more-btn-center mt30", :target => "_blank" %> + <% end %> + <% else %> + <%= link_to "More", org_subfield_files_path(field), :class => "more-btn-center mt30", :target => "_blank" %> + <% end %> + <%#= link_to "More", organization_path(@organization, :org_subfield_id => field.id), :class => "more-btn-center mt30" , :target => "_blank" %> +
+ <% end %> + +
+
+
+ + <% end %> +<% end %> \ No newline at end of file diff --git a/app/views/organizations/_subfield_list.html.erb b/app/views/organizations/_subfield_list.html.erb index 2c679eb3d..7db41cba5 100644 --- a/app/views/organizations/_subfield_list.html.erb +++ b/app/views/organizations/_subfield_list.html.erb @@ -27,7 +27,7 @@ 默认 <% else %> <%= form_tag({:controller => 'org_subfields', :action => 'update_status', :id => field.id,},:remote=>'true', :method => 'post', :id=>"update_status_form_#{field.id}", :class => 'query_form') do %> -
+
<%= select( :name,:group_id, subfield_status_option, @@ -63,7 +63,7 @@ 列表 <% else %> <%= form_tag({:controller => 'org_subfields', :action => 'update_status', :id => field.id,},:remote=>'true', :method => 'post', :id=>"update_status_form_#{field.id}", :class => 'query_form') do %> -
+
<%= select( :name,:group_id, subfield_status_option,