diff --git a/app/controllers/files_controller.rb b/app/controllers/files_controller.rb index 7ec796b61..1c05399c4 100644 --- a/app/controllers/files_controller.rb +++ b/app/controllers/files_controller.rb @@ -26,7 +26,7 @@ class FilesController < ApplicationController before_filter :authorize, :except => [:create,:getattachtype,:quote_resource_show,:search,:searchone4reload,:search_project,:quote_resource_show_project, :search_tag_attachment,:subfield_upload_file,:search_org_subfield_tag_attachment, :search_tag_attachment,:quote_resource_show_org_subfield,:find_org_subfield_attache, - :search_files_in_subfield,:upload_files_menu,:file_hidden,:republish_file] + :search_files_in_subfield,:upload_files_menu,:file_hidden,:republish_file,:update_file_description] helper :sort include SortHelper @@ -911,5 +911,10 @@ class FilesController < ApplicationController def upload_files_menu -end + end + def update_file_description + @attachment = Attachment.find(params[:id]) + @attachment.description = params[:description] + @attachment.save + end end diff --git a/app/controllers/org_subfields_controller.rb b/app/controllers/org_subfields_controller.rb index 34e996494..3edda8285 100644 --- a/app/controllers/org_subfields_controller.rb +++ b/app/controllers/org_subfields_controller.rb @@ -9,7 +9,7 @@ class OrgSubfieldsController < ApplicationController @subfield = OrgSubfield.create(:name => params[:name], :organization_id => params[:organization_id], :priority => @organization.org_subfields.order("priority").last.priority + 1) if !params[:sub_dir].blank? sql = "select subfield_subdomain_dirs.* from subfield_subdomain_dirs, org_subfields where subfield_subdomain_dirs.org_subfield_id = org_subfields.id "+ - "and org_subfields.organization_id=#{@organization.id} and subfield_subdomain_dirs.name='#{params[:sub_dir]}'" + "and org_subfields.organization_id=#{@organization.id} and subfield_subdomain_dirs.name='#{params[:sub_dir]}'" if SubfieldSubdomainDir.find_by_sql(sql).count == 0 SubfieldSubdomainDir.create(:org_subfield_id => @subfield.id, :name => params[:sub_dir].downcase) end diff --git a/app/views/account/login.html.erb b/app/views/account/login.html.erb index f2b43c9a3..23acabd1f 100644 --- a/app/views/account/login.html.erb +++ b/app/views/account/login.html.erb @@ -2,32 +2,6 @@ <%= stylesheet_link_tag 'leftside'%> -
-
-
- -
  欢迎加入Trustie创新实践社区!在这里,您的创新意识和创新潜力将得到充分发挥!目前已有超过200所高校和科研机构在平台中开展在线协同开发、协同学习和协同研究。

  Trustie社区的理想是:让创新过程变的更美好!
+ +
<%= render_flash_messages %> diff --git a/app/views/layouts/base_projects.html.erb b/app/views/layouts/base_projects.html.erb index 44dfeeea2..52e42f1be 100644 --- a/app/views/layouts/base_projects.html.erb +++ b/app/views/layouts/base_projects.html.erb @@ -146,7 +146,7 @@
-
访问计数 <%= @project.visits.to_i %>
+
访问计数 <%= @project.visits.to_i %> (自<%= Time.now.year %>年<%= Time.now.month %>月)
diff --git a/app/views/layouts/login.html.erb b/app/views/layouts/login.html.erb index 60ffbce1a..c20335b1d 100644 --- a/app/views/layouts/login.html.erb +++ b/app/views/layouts/login.html.erb @@ -14,19 +14,8 @@ <%= heads_for_theme %> <%= call_hook :view_layouts_base_html_head %> <%= yield :header_tags -%> - - - - +
-
访问计数 <%= @user.visits.to_i %>
+
访问计数 <%= @user.visits.to_i %> (自<%= Time.now.year %>年<%= Time.now.month %>月)
<%= yield %> diff --git a/app/views/org_subfields/create.js.erb b/app/views/org_subfields/create.js.erb index 952ed7b2c..a7647b0ad 100644 --- a/app/views/org_subfields/create.js.erb +++ b/app/views/org_subfields/create.js.erb @@ -1,9 +1,9 @@ <% if @res %> - $("#org_subfield_list").html(""); - $("#org_subfield_list").html("<%= escape_javascript(render :partial => 'organizations/subfield_list', :locals => {:subfields => subfield_to_addmin?(@organization)}) %>"); - $("#sub_field_left_lists").html(""); - $("#sub_field_left_lists").html("<%= escape_javascript(render :partial => 'organizations/org_left_subfield_list', :locals => {:organization => @organization}) %>"); - $("#org_custom_admin").html("<%= escape_javascript(render :partial => 'organizations/org_custom_admin') %>"); +$("#org_subfield_list").html(""); +$("#org_subfield_list").html("<%= escape_javascript(render :partial => 'organizations/subfield_list', :locals => {:subfields => subfield_to_addmin?(@organization)}) %>"); +$("#sub_field_left_lists").html(""); +$("#sub_field_left_lists").html("<%= escape_javascript(render :partial => 'organizations/org_left_subfield_list', :locals => {:organization => @organization}) %>"); +$("#org_custom_admin").html("<%= escape_javascript(render :partial => 'organizations/org_custom_admin') %>"); <% end %> $("#subfield_name").val(""); $("#sub_dir").val(""); \ No newline at end of file diff --git a/config/locales/account/zh.yml b/config/locales/account/zh.yml index c6a23b964..532806356 100644 --- a/config/locales/account/zh.yml +++ b/config/locales/account/zh.yml @@ -37,7 +37,7 @@ zh: label_password_lost: "忘记密码?" button_login: 登录 # account_controller中判断用户名或密码输入有误的提示信息 - notice_account_invalid_creditentials: "无效的用户名或密码,注意登录名区分大小写,谢谢!" + notice_account_invalid_creditentials: "无效的用户名或密码,注意登录名区分大小写。" # account_controller中判断未激活的提示信息 notice_account_invalid_creditentials_new: "您还未到邮箱激活。如果您丢失帐户,电子邮件验证帮助我们的支持团队验证帐户的所有权,并允许您接收所有您要求的通知。" diff --git a/config/routes.rb b/config/routes.rb index e4b462d93..a778a8016 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -975,7 +975,6 @@ RedmineApp::Application.routes.draw do match 'delete_softapplications', :via => [:get, :post] end end - resources :groups do member do get 'autocomplete_for_user' @@ -1114,6 +1113,7 @@ RedmineApp::Application.routes.draw do match "quote_resource_show", :via => [:get] get "file_hidden" post "republish_file" + get "update_file_description" end end resources :memberships, :shallow => true, :controller => 'members', :only => [:index, :show, :new, :create, :update, :destroy] do diff --git a/public/images/login/bg_login.jpg b/public/images/login/bg_login.jpg new file mode 100644 index 000000000..274dcb6f6 Binary files /dev/null and b/public/images/login/bg_login.jpg differ diff --git a/public/images/login/bg_register.jpg b/public/images/login/bg_register.jpg new file mode 100644 index 000000000..c1a027a86 Binary files /dev/null and b/public/images/login/bg_register.jpg differ diff --git a/public/images/login/icons_login.png b/public/images/login/icons_login.png new file mode 100644 index 000000000..9d1ba136d Binary files /dev/null and b/public/images/login/icons_login.png differ diff --git a/public/javascripts/application.js b/public/javascripts/application.js index 73b667740..0437125e8 100644 --- a/public/javascripts/application.js +++ b/public/javascripts/application.js @@ -1480,3 +1480,21 @@ function autoUrl(id){ } } +//编辑资源描述 +function show_edit_file_description(id) { + $("#file_description_show_"+id).hide(); + $("#file_description_edit_"+id).show(); + $("#file_description_edit_"+id).focus(); +} + +//编辑资源描述之后提交 +function edit_file_description(url,id){ + $.get( + url, + {id: id ,description: $("#file_description_edit_"+id).val() }, + function (data) { + + } + ); +} + diff --git a/public/javascripts/new_user.js b/public/javascripts/new_user.js index b6301afad..d2eb7a168 100644 --- a/public/javascripts/new_user.js +++ b/public/javascripts/new_user.js @@ -627,4 +627,52 @@ var autoTextarea2 = function (elem,elem2, extra, maxHeight) { addEvent(elem2, 'input', change); addEvent(elem2, 'focus', change); change(); -}; \ No newline at end of file +}; + +function user_name_keypress(e){ + if (e.keyCode == '13') { + $('#main_login_form').submit(); + } +} + +function changeRegisterBtn(checkbox){ + if(checkbox.checked == true){ + $("#loginUpButton").removeClass('new_login_submit_disable'); + $("#loginUpButton").addClass('new_login_submit'); + }else{ + $("#loginUpButton").removeClass('new_login_submit') + $("#loginUpButton").addClass('new_login_submit_disable'); + } +} + +function clearInfo(id, content) { + var text = $('#' + id); + if (text.val() == content) { + $('#' + id).val(''); + } +} + +function showInfo(id, content) { + var text = $('#' + id); + if (text.val() == '') { + $('#' + id).val(content); + } +} + +function login(){ + $('#main_login_form').submit(); //表单提交没有任何反应的原因:js冲突 +} + +function register(){ + if($("#loginUpButton").hasClass('new_login_submit_disable')){ + return; + } + if($login_correct && $mail_correct && $passwd_correct && $passwd_comfirm_correct && $("#read_and_confirm").attr("checked") == 'checked'){ + $("#main_reg_form").submit(); + }else{ + $('#user_login').blur(); + $('#user_mail').blur(); + $('#user_password').blur(); + $('#user_password_confirmation').blur(); + } +} \ No newline at end of file diff --git a/public/stylesheets/new_user.css b/public/stylesheets/new_user.css index 32e727ba4..ba7836a3e 100644 --- a/public/stylesheets/new_user.css +++ b/public/stylesheets/new_user.css @@ -747,8 +747,8 @@ a:hover .gz_btn{color:#ff5722;} .homepageCoursesType {width:75px; background-color:#ffffff; float:left; list-style:none; position:absolute; border:1px solid #eaeaea; border-radius:5px; top:15px; padding:5px 10px; left:-65px; font-size:12px; color:#4b4b4b; line-height:2; z-index:9999; display:none;} /*注册登陆页面*/ -#loginInBox {display:block; margin-top:143px;} -#signUpBox {display:none; margin-top:79px;} +#loginInBox {display:block;} +#signUpBox {display:none;} #loginSignButton {height:54px; padding-left:10px; padding-right:10px; text-align:center; line-height:54px; vertical-align:middle; color:#ffffff; font-size:16px;} #loginInButton {height:54px; padding-left:10px; padding-right:10px; text-align:center; line-height:54px; vertical-align:middle; color:#ffffff; font-size:16px;} #loginSignButton:hover {background-color:#297fb8;} @@ -1628,3 +1628,167 @@ ul.wlist li a:hover{ background:#15bccf; color:#fff; text-decoration:none;} span.shadowbox_news_user{ color:#3b94d6;} a.shadowbox_news_all{ display:block; width:305px; height:40px; line-height:40px; color:#3b94d6; text-align:center;border-top:1px solid #eee;} +/* 新版登录注册 */ +.mr45{ margin-right:45px;} +.mt100{ margin-top:100px;} +.mt50{ margin-top:50px;} +.new_login{ + width:100%; + height:524px; + background-color:#3b94d6; +} +.new_login_con{ + width:1000px; + height:524px; + margin:0 auto; + background:url(../images/login/bg_login.jpg) 0 0 no-repeat; +} +.new_login_box{ + background:#FFF; + width:265px; + padding:20px 15px; + -webkit-border-radius:5px; + -moz-border-radius:5px; + -o-border-radius:5px; + border-radius:5px; + background-color: rgba(255,255,255,0.3); +} +.new_login_h2{ + font-size:18px; + color:#fff; + border-bottom:1px solid #fff; + font-weight:normal; + padding-bottom:5px; + margin-bottom:30px; +} +.new_login_h2 a{ + font-size:12px; + color:#fff; + background:url(../images/login/icons_login.png) 0 -69px no-repeat; + padding-left:10px; +} +input.new_register_input{ + -webkit-box-shadow: 0 0 0px 1000px white inset; + margin-left:5px; + width:250px; + height:45px; + border:none; + outline: none; +} +input.new_loggin_input{ + -webkit-box-shadow: 0 0 0px 1000px white inset; + outline: none; + width:205px; + height:45px; + border:none; + margin-left:50px; +} +.new_loggin_users{ + width:265px; + height:45px; + -webkit-border-radius:5px; + -moz-border-radius:5px; + -o-border-radius:5px; + border-radius:5px; + border:none; + background:#fff url(../images/login/icons_login.png) 8px 9px no-repeat; + +} +.new_login_lock{ + background:#fff url(../images/login/icons_login.png) 8px -28px no-repeat; + width:265px; + height:45px; + -webkit-border-radius:5px; + -moz-border-radius:5px; + -o-border-radius:5px; + border-radius:5px; + border:none; +} +.new_register_li{ + background:#fff; + width:265px; + height:45px; + -webkit-border-radius:5px; + -moz-border-radius:5px; + -o-border-radius:5px; + border-radius:5px; + border:none; +} + +.new_login_form ul li{ + margin-bottom:20px; +} +.new_login_error{ + color:#c00202; +} +.new_login_submit_disable{ + width:265px; + height:40px; + line-height: 40px; + background:#ccc; + color:#fff; + font-size:14px; + -webkit-border-radius:5px; + -moz-border-radius:5px; + -o-border-radius:5px; + border-radius:5px; + border:none; + text-align:center; + cursor:pointer; + vertical-align: middle; +} +.new_login_submit{ + width:265px; + height:40px; + line-height: 40px; + background:#f27d0d; + color:#fff; + font-size:14px; + -webkit-border-radius:5px; + -moz-border-radius:5px; + -o-border-radius:5px; + border-radius:5px; + border:none; + text-align:center; + cursor:pointer; + vertical-align: middle; +} +.new_login_check{ + width:15px; + height:15px; + border:1px solid #fff; + border-style:none; + margin-right:5px; + vertical-align: -2px; +} +.new_login_form label{ color:#fff;} +.new_login_form a{ color:#fff; text-decoration:underline;} +.new_register{ + width:100%; + height:579px; + background-color:#3b94d6; +} +.new_register_con{ + width:1000px; + height:580px; + margin:0 auto; + background:url(../images/login/bg_register.jpg) 0 0 no-repeat; +} +.new_login_txt{ + width:282px; + height:140px; + padding:30px 12px 0; + color:#fff; + margin:235px 0 0 165px; +} +.new_login_txt h3{ + font-size:18px; + text-align:center; + margin-bottom:20px; +} +.new_login_txt p{ + line-height:2.0; +} +.new_register_left{ + margin-top:250px; +}