diff --git a/app/api/mobile/apis/courses.rb b/app/api/mobile/apis/courses.rb index 0900f0446..008a08f2f 100644 --- a/app/api/mobile/apis/courses.rb +++ b/app/api/mobile/apis/courses.rb @@ -274,6 +274,13 @@ module Mobile get ":course_id/members" do cs = CoursesService.new count = cs.course_members params + # 我如果在学生当中,那么我将放在第一位 + count.each do |m| + if m.user.id == current_user.id + count.delete m + count.unshift m + end + end present :data, count, with: Mobile::Entities::Member present :status, 0 end @@ -290,6 +297,20 @@ module Mobile present :data,homeworkscore,with: Mobile::Entities::Homeworkscore present :status,0 end + + desc '发布课程通知' + params do + requires :token,type:String + requires :course_id,type:Integer,desc:'课程id' + requires :title,type:String,desc:'通知标题' + requires :desc,type:String,desc:'通知描述' + end + post ':course_id/create_course_notice' do + cs = CoursesService.new + news = cs.create_course_notice params,current_user + present :data,news,with:Mobile::Entities::News + present :status,0 + end end end end diff --git a/app/api/mobile/apis/users.rb b/app/api/mobile/apis/users.rb index 62c9c3926..147cbfda5 100644 --- a/app/api/mobile/apis/users.rb +++ b/app/api/mobile/apis/users.rb @@ -85,6 +85,7 @@ module Mobile requires :search_by, type: String,desc: '搜索依据:0 昵称,1 用户名,2 邮箱,3 昵称和姓名' optional :is_search_assitant,type:Integer,desc:'是否搜索注册用户来作为助教' optional :course_id,type:Integer,desc: '课程id,搜索注册用户不为该课程教师的其他用户' + optional :user_id,type:Integer,desc:'用户id' end get 'search/search_user' do us = UsersService.new diff --git a/app/api/mobile/entities/user.rb b/app/api/mobile/entities/user.rb index 6b0064036..aee687dc9 100644 --- a/app/api/mobile/entities/user.rb +++ b/app/api/mobile/entities/user.rb @@ -9,7 +9,7 @@ module Mobile u[f] elsif u.is_a?(::User) if u.respond_to?(f) - u.send(f) + u.send(f) unless u.user_extensions.nil? else case f when :img_url @@ -17,9 +17,9 @@ module Mobile when :gender u.nil? || u.user_extensions.nil? || u.user_extensions.gender.nil? ? 0 : u.user_extensions.gender when :work_unit - get_user_work_unit u + get_user_work_unit u unless u.user_extensions.nil? when :location - get_user_location u + get_user_location u unless u.user_extensions.nil? when :brief_introduction u.nil? || u.user_extensions.nil? ? "" : u.user_extensions.brief_introduction end diff --git a/app/controllers/account_controller.rb b/app/controllers/account_controller.rb index caa199a72..7976e1aa4 100644 --- a/app/controllers/account_controller.rb +++ b/app/controllers/account_controller.rb @@ -315,7 +315,7 @@ class AccountController < ApplicationController #根据home_url生产正则表达式 eval("code = " + "/^" + home_url.gsub(/\//,"\\\/") + "\\\/*(welcome)?\\\/*(\\\/index\\\/*.*)?\$/") if (code=~params[:back_url] || params[:back_url].to_s.include?('lost_password')) && last_login_on != '' - redirect_to user_activities_path(user,host: Setting.user_domain) + redirect_to user_activities_path(user,host: Setting.host_user) else if last_login_on == '' redirect_to my_account_url @@ -333,7 +333,7 @@ class AccountController < ApplicationController token = Token.get_or_create_permanent_login_token(user) cookie_options = { :value => token.value, - :expires => 7.days.from_now, + :expires => 1.month.from_now, :path => (Redmine::Configuration['autologin_cookie_path'] || '/'), :secure => (Redmine::Configuration['autologin_cookie_secure'] ? true : false), :httponly => true diff --git a/app/controllers/courses_controller.rb b/app/controllers/courses_controller.rb index 1d1212bf1..d616daadc 100644 --- a/app/controllers/courses_controller.rb +++ b/app/controllers/courses_controller.rb @@ -852,7 +852,7 @@ class CoursesController < ApplicationController #验证是否显示课程 def can_show_course @first_page = FirstPage.find_by_page_type('project') - if @first_page.show_course == 2 + if @first_page.try(:show_course) == 2 render_404 end end diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index bb62695c0..506adceec 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -118,11 +118,11 @@ module ApplicationHelper end #if user.active? || (User.current.admin? && user.logged?) - # link_to name, {:controller=> 'users', :action => 'show', id: user.id, host: Setting.user_domain}, :class => user.css_classes + # link_to name, {:controller=> 'users', :action => 'show', id: user.id, host: Setting.host_user}, :class => user.css_classes #else # name #end - link_to name, {:controller=> 'users', :action => 'show', id: user.id, host: Setting.user_domain}, :class => user.css_classes + link_to name, {:controller=> 'users', :action => 'show', id: user.id, host: Setting.host_user}, :class => user.css_classes else h(user.to_s) end @@ -131,7 +131,7 @@ module ApplicationHelper def link_to_isuue_user(user, options={}) if user.is_a?(User) name = h(user.name(options[:format])) - link_to name, {:controller=> 'users', :action => 'show', id: user.id, host: Setting.user_domain}, :class => "pro_info_p" + link_to name, {:controller=> 'users', :action => 'show', id: user.id, host: Setting.host_user}, :class => "pro_info_p" else h(user.to_s) end @@ -140,7 +140,7 @@ module ApplicationHelper def link_to_settings_user(user, options={}) if user.is_a?(User) name = h(user.name(options[:format])) - link_to name, {:controller=> 'users', :action => 'show', id: user.id, host: Setting.user_domain}, :class => "w90 c_orange fl" + link_to name, {:controller=> 'users', :action => 'show', id: user.id, host: Setting.host_user}, :class => "w90 c_orange fl" else h(user.to_s) end @@ -155,7 +155,7 @@ module ApplicationHelper else name = user.login end - link_to name, {:controller=> 'users', :action => 'show', id: user.id, host: Setting.user_domain}, :class => options[:class] + link_to name, {:controller=> 'users', :action => 'show', id: user.id, host: Setting.host_user}, :class => options[:class] else h(user.to_s) end @@ -594,12 +594,22 @@ module ApplicationHelper end # 判断当前用户是否为项目管理员 - def is_project_manager?(user_id,project_id) + def is_project_manager?(user_id, project_id) @result = false mem = Member.where("user_id = ? and project_id = ?",user_id, project_id) unless mem.blank? mem.first.roles.to_s.include?("Manager") - @result = false + @result = true + end + return @result + end + + # 私有项目资源不能引用,不能设置公开私有 + # 公开项目资源可以应用,管理员和资源上传者拥有设置公开私有权限 + def authority_pubilic_for_files(project, file) + @result = false + if (is_project_manager?(User.current.id, @project.id) || file.author_id == User.current.id) && project_contains_attachment?(project,file) && file.container_id == project.id && file.container_type == "Project" + @result = true end return @result end @@ -2076,21 +2086,21 @@ module ApplicationHelper hidden_non_project = Setting.find_by_name("hidden_non_project") visiable = !(hidden_non_project && hidden_non_project.value == "0") - main_course_link = link_to l(:label_course_practice), {:controller => 'welcome', :action => 'index', :host => Setting.course_domain} - main_project_link = link_to l(:label_project_deposit), {:controller => 'welcome', :action => 'index', :host => Setting.project_domain} - main_contest_link = link_to l(:label_contest_innovate), {:controller => 'welcome', :action => 'index', :host => Setting.contest_domain} + main_course_link = link_to l(:label_course_practice), {:controller => 'welcome', :action => 'index', :host => Setting.host_course} + main_project_link = link_to l(:label_project_deposit), {:controller => 'welcome', :action => 'index', :host => Setting.host_name} + main_contest_link = link_to l(:label_contest_innovate), {:controller => 'welcome', :action => 'index', :host => Setting.host_contest} # course_all_course_link = link_to l(:label_course_all), {:controller => 'courses', :action => 'index'} - course_teacher_all_link = link_to l(:label_teacher_all), {:controller => 'users', :action => 'index', :role => 'teacher', :host => Setting.course_domain} + course_teacher_all_link = link_to l(:label_teacher_all), {:controller => 'users', :action => 'index', :role => 'teacher', :host => Setting.host_course} # courses_link = link_to l(:label_course_practice), {:controller => 'courses', :action => 'index'} - #users_link = link_to l(:label_software_user), {:controller => 'users', :action => 'index', :host => Setting.user_domain} + #users_link = link_to l(:label_software_user), {:controller => 'users', :action => 'index', :host => Setting.host_user} # contest_link = link_to l(:label_contest_innovate), {:controller => 'contests', :action => 'index'} bids_link = link_to l(:label_requirement_enterprise), {:controller => 'bids', :action => 'index'} forum_link = link_to l(:label_forum_all), {:controller => "forums", :action => "index"} stores_link = link_to l(:label_stores_index), {:controller => 'stores', :action=> 'index'} school_all_school_link = link_to l(:label_school_all), {:controller => 'school', :action => 'index'} - project_new_link = link_to l(:label_project_new), {:controller => 'projects', :action => 'new', :host => Setting.project_domain} - # project_mine_link = link_to l(:label_my_project), {:controller => 'users', :action => 'user_projects', :host => Setting.project_domain} + project_new_link = link_to l(:label_project_new), {:controller => 'projects', :action => 'new', :host => Setting.host_name} + # project_mine_link = link_to l(:label_my_project), {:controller => 'users', :action => 'user_projects', :host => Setting.host_name} #@nav_dispaly_project_label nav_list = Array.new diff --git a/app/helpers/gitlab_helper.rb b/app/helpers/gitlab_helper.rb index ceaaf6d21..836a973a9 100644 --- a/app/helpers/gitlab_helper.rb +++ b/app/helpers/gitlab_helper.rb @@ -11,7 +11,7 @@ module GitlabHelper PROJECT_PATH_CUT = 40 # gitlab版本库所在服务器 # 注意REPO_IP_ADDRESS必须以http://开头,暂时只支持HTTP协议,未支持SSH - #REPO_IP_ADDRESS = "http://" + Setting.repository_domain + #REPO_IP_ADDRESS = "http://" + Setting.host_repository REPO_IP_ADDRESS = "http://192.168.137.100" GITLAB_API = "/api/v3" diff --git a/app/helpers/repositories_helper.rb b/app/helpers/repositories_helper.rb index 9ee11e392..5cbc3af5a 100644 --- a/app/helpers/repositories_helper.rb +++ b/app/helpers/repositories_helper.rb @@ -24,7 +24,7 @@ module RepositoriesHelper ROOT_PATH="/home/pdl/redmine-2.3.2-0/apache2/" end PROJECT_PATH_CUT = 40 - REPO_IP_ADDRESS = Setting.repository_domain + REPO_IP_ADDRESS = Setting.host_repository def format_revision(revision) if revision.respond_to? :format_identifier diff --git a/app/services/courses_service.rb b/app/services/courses_service.rb index 36d542d58..26d8df16f 100644 --- a/app/services/courses_service.rb +++ b/app/services/courses_service.rb @@ -508,6 +508,12 @@ class CoursesService end end + def create_course_notice params ,current_user + n = News.new(:course_id =>params[:course_id], :author_id => current_user.id,:title =>params[:title],:description=> params[:desc]) + n.save + {:id => n.id,:title => n.title,:author_name => n.author.name,:author_id => n.author.id, :description => n.description,:created_on => format_time(n.created_on),:comments_count => n.comments_count} + end + private def searchmember_by_name members, name #searchPeopleByRoles(project, StudentRoles) diff --git a/app/views/attachments/_form_project.html.erb b/app/views/attachments/_form_project.html.erb index 0478ba613..d1cdf8cc9 100644 --- a/app/views/attachments/_form_project.html.erb +++ b/app/views/attachments/_form_project.html.erb @@ -24,7 +24,7 @@ <%= l(:field_is_public)%>: <%= check_box_tag("attachments[p#{i}][is_public_checkbox]", attachment.is_public,attachment.is_public == 1 ? true : false, :class => 'is_public_checkbox')%> - <%= link_to(' '.html_safe, attachment_path(attachment, :attachment_id => "p#{i}", :format => 'js'), :method => 'delete', :remote => true, :class => 'remove-upload') %> + <%= link_to(' '.html_safe, attachment_path(attachment, :attachment_id => "p#{i}", :format => 'js'), 'data-containerid'=>"#{container.id}",:method => 'delete', :remote => true, :class => 'remove-upload') %> <%#= render :partial => 'tags/tag', :locals => {:obj => attachment, :object_flag => "6"} %> <%= hidden_field_tag "attachments[p#{i}][token]", "#{attachment.token}" %> @@ -41,7 +41,7 @@ // file.click(); // } - + <%#= button_tag "浏览", :type=>"button", :onclick=>"CompatibleSend();" %> <%= button_tag "文件浏览", :type=>"button", :onclick=>"_file#{container.id}.click()", :class =>"sub_btn",:style => ie8? ? 'display:none' : '' %> @@ -60,7 +60,8 @@ :field_is_public => l(:field_is_public), :are_you_sure => l(:text_are_you_sure), :file_count => l(:label_file_count), - :delete_all_files => l(:text_are_you_sure_all) + :delete_all_files => l(:text_are_you_sure_all), + :containerid => "#{container.id}" } %> <%= l(:label_no_file_uploaded)%> (<%= l(:label_max_size) %>: <%= number_to_human_size(Setting.attachment_max_size.to_i.kilobytes) %>) @@ -124,9 +125,9 @@ :file_count => l(:label_file_count), :delete_all_files => l(:text_are_you_sure_all) } %> - <% if container.nil? %> - <%= l(:label_no_file_uploaded)%> - <% end %> + <% if defined?(container) %> + <%= l(:label_no_file_uploaded)%> + <% end %> (<%= l(:label_max_size) %>: <%= number_to_human_size(Setting.attachment_max_size.to_i.kilobytes) %>) diff --git a/app/views/attachments/destroy.js.erb b/app/views/attachments/destroy.js.erb index d2a3a11a1..0b6cee0df 100644 --- a/app/views/attachments/destroy.js.erb +++ b/app/views/attachments/destroy.js.erb @@ -1,8 +1,26 @@ -$('#attachments_<%= j params[:attachment_id] %>').remove(); -var count=$('#attachments_fields>span').length; -if(count<=0){ - $("#upload_file_count").text(<%= l(:label_no_file_uploaded)%>); - $(".remove_all").remove(); +var attachment_html_obj = $('#attachments_<%= j params[:attachment_id] %>'); +//modify by yutao 2015-5-14 当1个页面存在多个上传控件时此块代码存在bug 故改之 start +var containerid=$('.remove-upload',attachment_html_obj).data('containerid'); +if(containerid==undefined){ + $('#attachments_<%= j params[:attachment_id] %>').remove(); + var count=$('#attachments_fields>span').length; + if(count<=0){ + $("#upload_file_count").text('<%= l(:label_no_file_uploaded)%>'); + $(".remove_all").remove(); + }else{ + $("#upload_file_count").html(""+count+""+"个文件"+"已上传"); + } }else{ - $("#upload_file_count").html("已上传"+""+count+""+"个文件"); -} \ No newline at end of file + $('#attachments_<%= j params[:attachment_id] %>').remove(); + var count=$('#attachments_fields'+containerid+'>span').length; + if(count<=0){ + $('#upload_file_count'+containerid).text('<%= l(:label_no_file_uploaded)%>'); + var remove_all_html_obj = $(".remove_all").filter(function(index){ + return $(this).data('containerid')==containerid; + }); + remove_all_html_obj.remove(); + }else{ + $('#upload_file_count'+containerid).html(""+count+""+"个文件"+"已上传"); + } +} +//modify by yutao 2015-5-14 当1个页面存在多个上传控件时此块代码存在bug 故改之 end \ No newline at end of file diff --git a/app/views/avatar/_avatar_form.html.erb b/app/views/avatar/_avatar_form.html.erb index 43aaf9132..632ea5d4d 100644 --- a/app/views/avatar/_avatar_form.html.erb +++ b/app/views/avatar/_avatar_form.html.erb @@ -43,7 +43,7 @@
-<%= link_to l(:button_delete_file),{:controller => :avatar,:action => :delete_image,:remote=>true,:source_type=> source.class,:source_id=>source.id},:confirm => l(:text_are_you_sure), :method => :post, :class => "btn_addPic", :style => "text-decoration:none;" %> +<%#= link_to l(:button_delete_file),{:controller => :avatar,:action => :delete_image,:remote=>true,:source_type=> source.class,:source_id=>source.id},:confirm => l(:text_are_you_sure), :method => :post, :class => "btn_addPic", :style => "text-decoration:none;" %> <%= l(:button_upload_photo) %> diff --git a/app/views/avatar/_new_avatar_form.html.erb b/app/views/avatar/_new_avatar_form.html.erb index 793252d3a..64abfbc30 100644 --- a/app/views/avatar/_new_avatar_form.html.erb +++ b/app/views/avatar/_new_avatar_form.html.erb @@ -9,8 +9,8 @@ :size => "1", :multiple => true, :data => { - :max_file_size => Setting.attachment_max_size.to_i.kilobytes, - :max_file_size_message => l(:error_attachment_too_big, :max_size => number_to_human_size(Setting.attachment_max_size.to_i.kilobytes)), + :max_file_size => Setting.upload_avatar_max_size, + :max_file_size_message => l(:error_upload_avatar_to_large, :max_size => number_to_human_size(Setting.upload_avatar_max_size.to_i)), :max_concurrent_uploads => Redmine::Configuration['max_concurrent_ajax_uploads'].to_i, :file_type => Redmine::Configuration['pic_types'].to_s, :type_support_message => l(:error_pic_type), diff --git a/app/views/contests/_new_softapplication.html.erb b/app/views/contests/_new_softapplication.html.erb index 5849132ae..3bba3db41 100644 --- a/app/views/contests/_new_softapplication.html.erb +++ b/app/views/contests/_new_softapplication.html.erb @@ -187,7 +187,7 @@ <%= link_to l(:label_create_new_projects), - new_project_path(:course => 0, :project_type => 0, :host => Setting.project_domain), + new_project_path(:course => 0, :project_type => 0, :host => Setting.host_name), :target => '_blank' %> diff --git a/app/views/courses/settings.html.erb b/app/views/courses/settings.html.erb index 69ce4f5dc..4ca8d3d43 100644 --- a/app/views/courses/settings.html.erb +++ b/app/views/courses/settings.html.erb @@ -23,6 +23,7 @@ +
  • diff --git a/app/views/files/_project_file_list.html.erb b/app/views/files/_project_file_list.html.erb index d3e383a4e..1042be584 100644 --- a/app/views/files/_project_file_list.html.erb +++ b/app/views/files/_project_file_list.html.erb @@ -20,10 +20,8 @@
    <%= link_to_attachment file, :download => true,:text => truncate(file.filename,length: 35, omission: '...'), :title => file.filename+"\n"+file.description.to_s, :style => "overflow: hidden; white-space: nowrap;text-overflow: ellipsis;",:class => "c_dblue f_14 f_b f_l" %> <% if User.current.logged? %> - <%#--私有项目资源不能引用,不能设置公开私有--%> - <%#--公开项目资源可以应用,管理员和资源上传者拥有设置公开私有权限--%> <%= link_to(l(:label_slected_to_other_project),quote_resource_show_project_project_file_path(project,file),:class => "f_l re_select",:remote => true) if has_project?(User.current,file) %> - <% if (is_project_manager?(User.current.id, @project.id) || file.author_id == User.current.id) && project_contains_attachment?(project,file) && file.container_id == project.id && file.container_type == "Project" %> + <% if authority_pubilic_for_files(project, file) %> <%= link_to (file.is_public? ? "公开":"私有"), update_file_dense_attachments_path(:attachmentid=>file.id,:newtype=>(file.is_public? ? 0:1)),:remote=>true,:class=>"f_l re_open",:method => :post %> diff --git a/app/views/forums/_show_topics.html.erb b/app/views/forums/_show_topics.html.erb index e61995ecc..9af8538ed 100644 --- a/app/views/forums/_show_topics.html.erb +++ b/app/views/forums/_show_topics.html.erb @@ -1,5 +1,4 @@ - - +
    共有 <%=link_to @forum.memos.count %> 个贴子
    <% if memos.any? %> diff --git a/app/views/issues/_list.html.erb b/app/views/issues/_list.html.erb index 30bd06b9a..fa34ecb3b 100644 --- a/app/views/issues/_list.html.erb +++ b/app/views/issues/_list.html.erb @@ -31,5 +31,5 @@
    <% end -%> \ No newline at end of file diff --git a/app/views/issues/show.html.erb b/app/views/issues/show.html.erb index 8fb63bd10..1d1802172 100644 --- a/app/views/issues/show.html.erb +++ b/app/views/issues/show.html.erb @@ -46,59 +46,52 @@
    <%= issue_fields_rows do |rows| %> -
      - -
    • * 状态  : 

      - -

      <%= @issue.status.name %>

      -
    • -
      -
    • * 优先级  : 

      - <%= @issue.priority.name %> -
    • -
      +
        +
      •  状态  : 

        <%= @issue.status.name %>

        +
      • +
        <% unless @issue.disabled_core_fields.include?('assigned_to_id') %> -
      •  指派给  : 

        - <%= @issue.assigned_to ? link_to_isuue_user(@issue.assigned_to) : "-" %> -
      • +
      •  指派给  : 

        <%= @issue.assigned_to ? link_to_isuue_user(@issue.assigned_to) : "--" %> +
      • <% end %> -
        - <% unless @issue.disabled_core_fields.include?('fixed_version_id') %> -
      •  目标版本  : 

        - <%= (@issue.fixed_version ? link_to_version(@issue.fixed_version, :class => "pro_info_p") : "-") %> -
      • +
        +
      +
        +
      •  优先级  : 

        <%= @issue.priority.name %> +
      • +
        + <% unless @issue.disabled_core_fields.include?('done_ratio') %> +
      •  % 完成  : 

        <%= @issue.done_ratio %>% +
      • <% end %> -
        -
      -
        - <% unless @issue.disabled_core_fields.include?('start_date') %> -
      •  开始日期  : 

        +
        +
      -

      <%= format_date(@issue.start_date) %>

      - <% end %> -
      - <% unless @issue.disabled_core_fields.include?('due_date') %> -
    •  计划完成日期  : 

      - <%= format_date(@issue.due_date) %> -
    • +
        + <% unless @issue.disabled_core_fields.include?('start_date') %> +
      •  开始  : 

        <%= format_date(@issue.start_date) %>

        +
      • <% end %> -
        +
        <% unless @issue.disabled_core_fields.include?('estimated_hours') %> - -
      •  预期时间  : 

        - <%= l_hours(@issue.estimated_hours) %> -
      • - +
      •  周期  : 

        <%= l_hours(@issue.estimated_hours) %> +
      • <% end %> -
        - <% unless @issue.disabled_core_fields.include?('done_ratio') %> -
      •  % 完成  : 

        - <%= @issue.done_ratio %>% -
      • +
        +
      +
        + <% unless @issue.disabled_core_fields.include?('due_date') %> +
      •  计划完成  : 

        <%= format_date(@issue.due_date)? format_date(@issue.due_date) : "--" %> +
      • <% end %> -
        -
      - <% end %> +
      + <% unless @issue.disabled_core_fields.include?('fixed_version_id') %> +
    •  目标版本  : 

      <%= (@issue.fixed_version ? link_to_version(@issue.fixed_version, :class => "pro_info_p") : "--") %> +
    • + <% end %> +
      +
    + <% end %> <%#= render_custom_fields_rows(@issue) %> <%#= call_hook(:view_issues_show_details_bottom, :issue => @issue) %>
    diff --git a/app/views/layouts/_base_development_group.html.erb b/app/views/layouts/_base_development_group.html.erb index 6d6e0eed1..4b0692f9e 100644 --- a/app/views/layouts/_base_development_group.html.erb +++ b/app/views/layouts/_base_development_group.html.erb @@ -55,7 +55,7 @@ <% end %> <% end %> - + \ No newline at end of file diff --git a/app/views/layouts/_base_feedback.html.erb b/app/views/layouts/_base_feedback.html.erb index 540293a48..d9bd5e376 100644 --- a/app/views/layouts/_base_feedback.html.erb +++ b/app/views/layouts/_base_feedback.html.erb @@ -169,15 +169,15 @@ function cookieget(n)
    <% get_memo %> - <% if @public_forum %> - <%= form_for(@new_memo, :url => create_feedback_forum_path(@public_forum)) do |f| %> - <%= f.text_area :subject,:id=>"subject", :class => "opnionText", :placeholder => l(:label_feedback_tips) %> - <%= f.hidden_field :content,:id => 'hidden', :required => true , :value => l(:label_feedback_value) %> - <%#= f.submit :value => l(:label_memo_create), :class => "opnionButton", :id => "button1" %> - - <%= l(:label_submit)%> - <% end %> - <% end %> + <% if @public_forum %> + <%= form_for(@new_memo, :url => create_feedback_forum_path(@public_forum)) do |f| %> + <%= f.text_area :subject,:id=>"subject", :class => "opnionText", :placeholder => l(:label_feedback_tips) %> + <%= f.hidden_field :content,:id => 'hidden', :required => true , :value => l(:label_feedback_value) %> + <%#= f.submit :value => l(:label_memo_create), :class => "opnionButton", :id => "button1" %> + + <%= l(:label_submit)%> + <% end %> + <% end %>
    <%= l(:label_technical_support) %>白   羽 diff --git a/app/views/layouts/_base_header.html.erb b/app/views/layouts/_base_header.html.erb index 9eaf7f6ed..7a25819ab 100644 --- a/app/views/layouts/_base_header.html.erb +++ b/app/views/layouts/_base_header.html.erb @@ -27,13 +27,13 @@ <% end %> <%= render :partial => 'layouts/user_project_list', :locals => {:hasCourse => hasCourse} %>
  • - <%=link_to l(:label_user_edit), {:controller => 'my', :action=> 'account', host: Setting.user_domain}%> + <%=link_to l(:label_user_edit), {:controller => 'my', :action=> 'account', host: Setting.host_user}%>
  • <%=link_to l(:label_my_message)+'('+User.current.count_new_jour.to_s+')', - { :controller => 'users', :action => 'user_newfeedback', id: User.current.id, host: Setting.user_domain }, + { :controller => 'users', :action => 'user_newfeedback', id: User.current.id, host: Setting.host_user }, {:class => 'my-message'} if User.current.logged?%>
  • diff --git a/app/views/layouts/_bootstrap_base_header.html.erb b/app/views/layouts/_bootstrap_base_header.html.erb index a968ace94..b93d27f49 100644 --- a/app/views/layouts/_bootstrap_base_header.html.erb +++ b/app/views/layouts/_bootstrap_base_header.html.erb @@ -67,17 +67,17 @@ end <%=User.current%> diff --git a/app/views/layouts/_new_header.html.erb b/app/views/layouts/_new_header.html.erb index 489612c9a..e4d2658b1 100644 --- a/app/views/layouts/_new_header.html.erb +++ b/app/views/layouts/_new_header.html.erb @@ -18,15 +18,15 @@ <% if User.current.logged? -%>
  • - <%= link_to "#{User.current.login}".html_safe, {:controller=> 'users', :action => 'show', id: User.current.id, host: Setting.user_domain}, :class => "uses_name"%> + <%= link_to "#{User.current.login}".html_safe, {:controller=> 'users', :action => 'show', id: User.current.id, host: Setting.host_user}, :class => "uses_name"%>
  • diff --git a/app/views/layouts/_user_project_list.html.erb b/app/views/layouts/_user_project_list.html.erb index 3170ff43f..b05a065c8 100644 --- a/app/views/layouts/_user_project_list.html.erb +++ b/app/views/layouts/_user_project_list.html.erb @@ -1,10 +1,10 @@ <% if User.current.projects.count>0 %>
  • - <%= link_to l(:label_my_projects), {:controller => 'users', :action => 'user_projects', id: User.current.id, host: Setting.project_domain} %> + <%= link_to l(:label_my_projects), {:controller => 'users', :action => 'user_projects', id: User.current.id, host: Setting.host_name} %> diff --git a/app/views/layouts/base_courses.html.erb b/app/views/layouts/base_courses.html.erb index 6923b17c2..6820ccaf3 100644 --- a/app/views/layouts/base_courses.html.erb +++ b/app/views/layouts/base_courses.html.erb @@ -52,7 +52,7 @@ <%= l(:label_search)%> -
    +
    <% end %> diff --git a/app/views/layouts/base_projects.html.erb b/app/views/layouts/base_projects.html.erb index 51f8b9a80..71975c5c3 100644 --- a/app/views/layouts/base_projects.html.erb +++ b/app/views/layouts/base_projects.html.erb @@ -157,7 +157,7 @@