| Author | SHA1 | Message | Date |
|---|---|---|---|
|
|
af8dcd2d7d | 隐藏质量分析 | 9 years ago |
|
|
20dc90c93e | 隐藏项目ZIP下载 | 9 years ago |
|
|
59548d0e55 | trustie注册时登录名是不能少于4个字符,但是修改资料时登录名可以改为1位数 | 9 years ago |
|
|
9079b9d6e6 | 讨论区点击发帖子的取消,无效 | 9 years ago |
|
|
e2afee3f3a | 新创建issue,不输入任何内容点击保存,跳转页面不见了 | 9 years ago |
|
|
2ae998e148 | 项目首页中上传资源样式有问题,点击叉叉无法取消 | 9 years ago |
|
|
2cab0dab79 | 项目首页最新动态没刷选条件 | 9 years ago |
|
|
b75434d122 | 里程碑已经关闭/锁定,issue列表是没有里程碑可以选择,但是新建issue中选择里程碑还是有数据 | 9 years ago |
|
|
cfde8cc829 | 点击添加关注无反应,页面没刷新 | 9 years ago |
|
|
c355bf6201 | 项目-配置-模块中去掉实训任务 | 9 years ago |
|
|
73706d18a2 | 非项目信息隐藏 | 9 years ago |
|
|
3178e344b1 | 隐藏非项目的信息 | 9 years ago |
|
|
64ccb03c9e | Merge branch 'develop' into daiao_dev | 9 years ago |
| @@ -92,7 +92,7 @@ class WatchersController < ApplicationController | |||||
| else | else | ||||
| respond_to do |format| | respond_to do |format| | ||||
| format.html { redirect_to_referer_or {render :text => (false ? 'Watcher added.' : 'Watcher removed.'), :layout => true}} | format.html { redirect_to_referer_or {render :text => (false ? 'Watcher added.' : 'Watcher removed.'), :layout => true}} | ||||
| format.js { render :partial => 'set_watcher', :locals => {:user => User.current, :watched => watchables,:params=>params,:opt=>'delete',:list=>@list,:action_name=>params[:action_name],:page=>params[:page],:count=>@obj_count} } | |||||
| format.js { render :partial => 'set_watcher', :locals => {:user => User.current, :watched => watchables,:params=>params, :opt=>'delete',:list=>@list,:action_name=>params[:action_name],:page=>params[:page],:count=>@obj_count} } | |||||
| end | end | ||||
| end | end | ||||
| rescue Exception => e | rescue Exception => e | ||||
| @@ -861,7 +861,7 @@ class Issue < ActiveRecord::Base | |||||
| # versions = project.shared_versions.open.all | # versions = project.shared_versions.open.all | ||||
| # versions = Version.where(:project_id => project.id, :status => "open").order("created_on desc") | # versions = Version.where(:project_id => project.id, :status => "open").order("created_on desc") | ||||
| versions = Version.where(:project_id => project.id).order("created_on desc") | |||||
| versions = Version.where(:project_id => project.id, :status => "open").order("created_on desc") | |||||
| if fixed_version | if fixed_version | ||||
| if fixed_version_id_changed? | if fixed_version_id_changed? | ||||
| # nothing to do | # nothing to do | ||||
| @@ -9,7 +9,6 @@ | |||||
| <div class=""> | <div class=""> | ||||
| <%= error_messages_for 'attachment' %> | <%= error_messages_for 'attachment' %> | ||||
| <div id="network_issue" style="color: red; display: none;"><%= l(:label_file_upload_error_messages)%></div> | <div id="network_issue" style="color: red; display: none;"><%= l(:label_file_upload_error_messages)%></div> | ||||
| <%= form_tag(project_files_path(project), :multipart => true, :remote => !ie8?, :name=>"upload_form") do %> | <%= form_tag(project_files_path(project), :multipart => true, :remote => !ie8?, :name=>"upload_form") do %> | ||||
| <input type="hidden" name="in_project_toolbar" value="Y"> | <input type="hidden" name="in_project_toolbar" value="Y"> | ||||
| <!--<p class="c_grey fr mt10 mr5">--> | <!--<p class="c_grey fr mt10 mr5">--> | ||||
| @@ -1,10 +1,6 @@ | |||||
| <% if @project %> | <% if @project %> | ||||
| $('#ajax-modal').html('<%= escape_javascript(render :partial => 'files/upload_project_files',:locals => {:project => @project,:project_attachment_type => 1}) %>'); | |||||
| showModal('ajax-modal', '513px'); | |||||
| $('#ajax-modal').siblings().remove(); | |||||
| $('#ajax-modal').before("<a href='javascript:void(0)' onclick='hideModal();' style='margin-left: 480px;'><img src='/images/bid/close.png' width='26px' height='26px' /></a>"); | |||||
| $('#ajax-modal').parent().css("top","40%").css("left","36%").css("border","3px solid #269ac9"); | |||||
| $('#ajax-modal').parent().addClass("popbox_polls"); | |||||
| var htmlvalue = "<%= escape_javascript(render :partial => 'files/upload_project_files',:locals => {:project => @project,:project_attachment_type => 1}) %>"; | |||||
| pop_box_new(htmlvalue,300,316); | |||||
| <% elsif @course %> | <% elsif @course %> | ||||
| $('#ajax-modal').html('<%= escape_javascript(render :partial => 'files/upload_course_files',:locals => {:course => @course,:course_attachment_type => 1}) %>'); | $('#ajax-modal').html('<%= escape_javascript(render :partial => 'files/upload_course_files',:locals => {:course => @course,:course_attachment_type => 1}) %>'); | ||||
| showModal('ajax-modal', '513px'); | showModal('ajax-modal', '513px'); | ||||
| @@ -14,7 +14,7 @@ | |||||
| }); | }); | ||||
| <% end %> | <% end %> | ||||
| <% end %> | <% end %> | ||||
| <span ></span> | |||||
| <span id="error_tip"></span> | |||||
| </li> | </li> | ||||
| <li class="clear"> | <li class="clear"> | ||||
| <% if @issue.safe_attribute? 'description' %> | <% if @issue.safe_attribute? 'description' %> | ||||
| @@ -188,6 +188,12 @@ | |||||
| function issue_create(){ | function issue_create(){ | ||||
| var issue_commit_ids = $("#issue_commit_ids .commit_id_value"); | var issue_commit_ids = $("#issue_commit_ids .commit_id_value"); | ||||
| var str = ""; | var str = ""; | ||||
| var subject = $("#issue_subject").val(); | |||||
| if(subject.trim() == ""){ | |||||
| $("#error_tip").html("标题不能为空"); | |||||
| $("#error_tip").attr("style", "color:red;margin-left:100px;"); | |||||
| return; | |||||
| } | |||||
| for(var i=0; i < issue_commit_ids.length; i++){ | for(var i=0; i < issue_commit_ids.length; i++){ | ||||
| str += $(issue_commit_ids[i]).html(); | str += $(issue_commit_ids[i]).html(); | ||||
| if(i != issue_commit_ids.length -1){ | if(i != issue_commit_ids.length -1){ | ||||
| @@ -46,7 +46,7 @@ | |||||
| </li> | </li> | ||||
| <% end %> | <% end %> | ||||
| <!--实训任务--> | <!--实训任务--> | ||||
| <% if !@project.enabled_modules.where("name = 'training_tasks'").empty? %> | |||||
| <% if !@project.enabled_modules.where("name = 'training_tasks'").empty? && hidden_unproject_infos %> | |||||
| <% if User.current.admin? || is_project_manager?(User.current.id, @project.id) || is_project_manager?(User.current, @project.try(:forked_from_project_id)) %> | <% if User.current.admin? || is_project_manager?(User.current.id, @project.id) || is_project_manager?(User.current, @project.try(:forked_from_project_id)) %> | ||||
| <li id="project_menu_011"> | <li id="project_menu_011"> | ||||
| <%= link_to training_tasks_count > 0 ? "#{l(:project_module_training_tasks)}<span class='issues_nav_tag ml5'>#{switch_integer_into_k training_tasks_count}</span>".html_safe : "#{l(:project_module_training_tasks)}", project_training_tasks_url(@project), :class => "pro_new_proname", :title => "#{training_tasks_count}" %> | <%= link_to training_tasks_count > 0 ? "#{l(:project_module_training_tasks)}<span class='issues_nav_tag ml5'>#{switch_integer_into_k training_tasks_count}</span>".html_safe : "#{l(:project_module_training_tasks)}", project_training_tasks_url(@project), :class => "pro_new_proname", :title => "#{training_tasks_count}" %> | ||||
| @@ -81,9 +81,11 @@ | |||||
| <li> | <li> | ||||
| <%= link_to '我的项目', {:controller => "users", :action => "user_projectlist", :id => User.current}, :class => "menuGrey" %> | <%= link_to '我的项目', {:controller => "users", :action => "user_projectlist", :id => User.current}, :class => "menuGrey" %> | ||||
| </li> | </li> | ||||
| <li> | |||||
| <%= link_to "我的组织", user_organizations_user_path(:id => User.current), :class => "menuGrey"%> | |||||
| </li> | |||||
| <% if hidden_unproject_infos %> | |||||
| <li> | |||||
| <%= link_to "我的组织", user_organizations_user_path(:id => User.current), :class => "menuGrey"%> | |||||
| </li> | |||||
| <% end %> | |||||
| <!--<li><a href="javascript:void(0);" class="menuGrey">账号设置</a> </li>--> | <!--<li><a href="javascript:void(0);" class="menuGrey">账号设置</a> </li>--> | ||||
| <li> | <li> | ||||
| <%= link_to "退出",logout_url_without_domain,:class => "menuGrey",:method => "post", :id => "logout_trustie" %> | <%= link_to "退出",logout_url_without_domain,:class => "menuGrey",:method => "post", :id => "logout_trustie" %> | ||||
| @@ -13,7 +13,7 @@ | |||||
| <% end %> | <% end %> | ||||
| </li> | </li> | ||||
| <li style="width: 118px; float: left;"> | <li style="width: 118px; float: left;"> | ||||
| <%if(target.watched_by?(User.current))%> | |||||
| <%if (target.watched_by?(User.current)) %> | |||||
| <%= link_to "取消关注",watch_path(:object_type=> 'user',:object_id=>target.id,:target_id=>target.id),:class => "user_editinfo", :method => "delete",:remote => "true", :title => "取消关注"%> | <%= link_to "取消关注",watch_path(:object_type=> 'user',:object_id=>target.id,:target_id=>target.id),:class => "user_editinfo", :method => "delete",:remote => "true", :title => "取消关注"%> | ||||
| <% else %> | <% else %> | ||||
| <%= link_to "添加关注",watch_path(:object_type=> 'user',:object_id=>target.id,:target_id=>target.id),:class => "user_editinfo", :method => "post",:remote => "true", :title => "添加关注"%> | <%= link_to "添加关注",watch_path(:object_type=> 'user',:object_id=>target.id,:target_id=>target.id),:class => "user_editinfo", :method => "post",:remote => "true", :title => "添加关注"%> | ||||
| @@ -123,21 +123,23 @@ | |||||
| <% if User.current == @user %> | <% if User.current == @user %> | ||||
| <%= link_to '个人主页', homepage_user_path(@user), :class => "home-big-btn-grey", :target => '_blank' %> | <%= link_to '个人主页', homepage_user_path(@user), :class => "home-big-btn-grey", :target => '_blank' %> | ||||
| <% else %> | <% else %> | ||||
| <% if(@user.watched_by?(User.current)) %> | |||||
| <%= link_to "取消关注", | |||||
| watch_path(:object_type => 'user', :object_id => @user.id, :target_id => @user.id), | |||||
| :class => "home-btn-grey fl mr12", | |||||
| :method => "delete", | |||||
| :remote => "true", | |||||
| :title => "取消关注" %> | |||||
| <% else %> | |||||
| <%= link_to "添加关注", | |||||
| watch_path(:object_type => 'user', :object_id => @user.id, :target_id => @user.id), | |||||
| :class => "home-btn-grey fl mr12", | |||||
| :method => "post", | |||||
| :remote => "true", | |||||
| :title => "添加关注" %> | |||||
| <% end %> | |||||
| <div id="add_or_cancle_watch"> | |||||
| <% if(@user.watched_by?(User.current)) %> | |||||
| <%= link_to "取消关注", | |||||
| watch_path(:object_type => 'user', :object_id => @user.id, :target_id => @user.id), | |||||
| :class => "home-btn-grey fl mr12", | |||||
| :method => "delete", | |||||
| :remote => "true", :id => "cancle_watch", | |||||
| :title => "取消关注" %> | |||||
| <% else %> | |||||
| <%= link_to "添加关注", | |||||
| watch_path(:object_type => 'user', :object_id => @user.id, :target_id => @user.id), | |||||
| :class => "home-btn-grey fl mr12", | |||||
| :method => "post", | |||||
| :remote => "true", | |||||
| :title => "添加关注" %> | |||||
| <% end %> | |||||
| </div> | |||||
| <% if @user.base_homepage.nil? %> | <% if @user.base_homepage.nil? %> | ||||
| <a href="javascript:void(0)" class ="home-btn-grey fl" title="该用户暂未设置主页">TA的主页</a> | <a href="javascript:void(0)" class ="home-btn-grey fl" title="该用户暂未设置主页">TA的主页</a> | ||||
| <% else %> | <% else %> | ||||
| @@ -46,12 +46,21 @@ | |||||
| :required => true, | :required => true, | ||||
| :style => "color:grey", | :style => "color:grey", | ||||
| :nh_required => "1", | :nh_required => "1", | ||||
| :name => "login", | |||||
| :class => "w210" | |||||
| :name => "login", | |||||
| :class => "w210", | |||||
| :disabled => true | |||||
| %> | %> | ||||
| <%= f.text_field :login, | |||||
| :no_label => true, | |||||
| :required => true, | |||||
| :style => "color:grey", | |||||
| :nh_required => "1", | |||||
| :name => "login", | |||||
| :class => "w210 undis" | |||||
| %> | |||||
| </li> | </li> | ||||
| <% if @force %> | <% if @force %> | ||||
| <li><%= f.text_field :mail,:no_label=>true, :required => true,:nh_required => "1",:class=>"w210",:disabled=>'disabled'%></li> | |||||
| <li><%= f.text_field :mail,:no_label=>true, :required => true,:nh_required => "1",:class=>"w210", :disabled => true %></li> | |||||
| <% else %> | <% else %> | ||||
| <li><%= f.text_field :mail,:no_label=>true, :required => true,:nh_required=>"1",:class=>"w210"%></li> | <li><%= f.text_field :mail,:no_label=>true, :required => true,:nh_required=>"1",:class=>"w210"%></li> | ||||
| <% end %> | <% end %> | ||||
| @@ -19,7 +19,7 @@ | |||||
| <% if User.current.allowed_to?(:manage_repository, @project) %> | <% if User.current.allowed_to?(:manage_repository, @project) %> | ||||
| <li><a href="javascript:void(0)" id="pro_st_tb_6" class="<%= show_memu == 'manage_repository' ? 'active' : ''%>" onclick="project_setting(6);">版本库</a></li> | <li><a href="javascript:void(0)" id="pro_st_tb_6" class="<%= show_memu == 'manage_repository' ? 'active' : ''%>" onclick="project_setting(6);">版本库</a></li> | ||||
| <% end %> | <% end %> | ||||
| <% if !@project.enabled_modules.where("name = 'training_tasks'").empty? %> | |||||
| <% if !@project.enabled_modules.where("name = 'training_tasks'").empty? && hidden_unproject_infos %> | |||||
| <li><a href="javascript:void(0)" id="pro_st_tb_7" class="<%= show_memu == 'trainig_task' ? 'active' : ''%>" onclick="project_setting(7);">实训任务</a></li> | <li><a href="javascript:void(0)" id="pro_st_tb_7" class="<%= show_memu == 'trainig_task' ? 'active' : ''%>" onclick="project_setting(7);">实训任务</a></li> | ||||
| <% end %> | <% end %> | ||||
| <!--<li id="pro_st_tb_7" class="pro_st_normaltab" onclick="project_setting(7);">活动(时间跟踪)</li>--> | <!--<li id="pro_st_tb_7" class="pro_st_normaltab" onclick="project_setting(7);">活动(时间跟踪)</li>--> | ||||
| @@ -1,4 +1,6 @@ | |||||
| <div class="pro_new_prompt ml15 mr15 mb10"><p>问题跟踪模块与实训模块不能同时选择</p><p>一旦选定并保存后,将不能修改</p></div> | |||||
| <% if hidden_unproject_infos %> | |||||
| <div class="pro_new_prompt ml15 mr15 mb10"><p>问题跟踪模块与实训模块不能同时选择</p><p>一旦选定并保存后,将不能修改</p></div> | |||||
| <% end %> | |||||
| <ul class="pro_newsetting_con ml30 mb15"> | <ul class="pro_newsetting_con ml30 mb15"> | ||||
| <h2 class="pro_newsetting_title">请选择此项目可以使用的模块:</h2> | <h2 class="pro_newsetting_title">请选择此项目可以使用的模块:</h2> | ||||
| <%= form_for @project,:url => { :action => 'modules', :id => @project },:html => {:id => 'modules-form',:method => :post} do |f| %> | <%= form_for @project,:url => { :action => 'modules', :id => @project },:html => {:id => 'modules-form',:method => :post} do |f| %> | ||||
| @@ -18,17 +18,17 @@ | |||||
| <div class=" fl clearfix"> | <div class=" fl clearfix"> | ||||
| <%= render :partial => 'navigation' %> | <%= render :partial => 'navigation' %> | ||||
| </div> | </div> | ||||
| <a href="<%= @zip_path %>" class="btn_zipdown fl ml10" onclick="">ZIP下载</a> | |||||
| <% if !@entries.blank? && User.current.member_of?(@project) && @project.is_public? %> | |||||
| <% if quality_analysis(User.current.try(:login), @repository.id).nil? %> | |||||
| <%= link_to "质量分析", quality_analysis_path(:id => @project.id, :repository_id => @repository.identifier, :rev => @rev, :default_branch => @g_default_branch, :type => "1"), :remote => true, :class => "btn_zipdown fl ml10" %> | |||||
| <% else %> | |||||
| <%= link_to "重新分析", quality_analysis_path(:id => @project.id, :repository_id => @repository.identifier, :rev => @rev, :default_branch => @g_default_branch, :type => "2"), :remote => true, :class => "btn_zipdown fl ml10" %> | |||||
| <% end %> | |||||
| <% end %> | |||||
| <% unless QualityAnalysis.where(:project_id => @project.id).first.nil? %> | |||||
| <%= link_to "代码分析结果", project_quality_analysis_path(:project_id => @project.id), :class => "btn_zipdown fl ml10" %> | |||||
| <% end %> | |||||
| <!-- <a href="<%#= @zip_path %>" class="btn_zipdown fl ml10" onclick="">ZIP下载</a>--> | |||||
| <%# if !@entries.blank? && User.current.member_of?(@project) && @project.is_public? %> | |||||
| <%# if quality_analysis(User.current.try(:login), @repository.id).nil? %> | |||||
| <%#= link_to "质量分析", quality_analysis_path(:id => @project.id, :repository_id => @repository.identifier, :rev => @rev, :default_branch => @g_default_branch, :type => "1"), :remote => true, :class => "btn_zipdown fl ml10" %> | |||||
| <%# else %> | |||||
| <%#= link_to "重新分析", quality_analysis_path(:id => @project.id, :repository_id => @repository.identifier, :rev => @rev, :default_branch => @g_default_branch, :type => "2"), :remote => true, :class => "btn_zipdown fl ml10" %> | |||||
| <%# end %> | |||||
| <%# end %> | |||||
| <%# unless QualityAnalysis.where(:project_id => @project.id).first.nil? %> | |||||
| <%#= link_to "代码分析结果", project_quality_analysis_path(:project_id => @project.id), :class => "btn_zipdown fl ml10" %> | |||||
| <%# end %> | |||||
| <div class="fr "> | <div class="fr "> | ||||
| <label class="pro-fenzhi-label fl">克隆网址</label> | <label class="pro-fenzhi-label fl">克隆网址</label> | ||||
| @@ -14,7 +14,6 @@ | |||||
| <% else %> | <% else %> | ||||
| <select class="resourcesSendType" onclick="chooseSendType2hidden('<%= send_id %>', '<%= send_ids%>','<%= User.current.id %>','file', '<%= @type %>');"> | <select class="resourcesSendType" onclick="chooseSendType2hidden('<%= send_id %>', '<%= send_ids%>','<%= User.current.id %>','file', '<%= @type %>');"> | ||||
| <option value="1" selected>项目</option> | <option value="1" selected>项目</option> | ||||
| <option value="2">组织</option> | |||||
| </select> | </select> | ||||
| <% end %> | <% end %> | ||||
| </div> | </div> | ||||
| @@ -11,7 +11,6 @@ | |||||
| <% else %> | <% else %> | ||||
| <select class="resourcesSendType" onclick="chooseSendType2hidden('<%= send_id %>', '<%= send_ids%>','<%= User.current.id %>','file', '<%= @type %>');"> | <select class="resourcesSendType" onclick="chooseSendType2hidden('<%= send_id %>', '<%= send_ids%>','<%= User.current.id %>','file', '<%= @type %>');"> | ||||
| <option value="1" selected>项目</option> | <option value="1" selected>项目</option> | ||||
| <option value="2">组织</option> | |||||
| </select> | </select> | ||||
| <% end %> | <% end %> | ||||
| </div> | </div> | ||||
| @@ -11,7 +11,6 @@ | |||||
| <% else %> | <% else %> | ||||
| <select class="resourcesSendType" onclick="chooseSendType2hidden('<%= send_id %>', '<%= send_ids%>','<%= User.current.id %>','file', '<%= @type %>');"> | <select class="resourcesSendType" onclick="chooseSendType2hidden('<%= send_id %>', '<%= send_ids%>','<%= User.current.id %>','file', '<%= @type %>');"> | ||||
| <option value="1" selected>项目</option> | <option value="1" selected>项目</option> | ||||
| <option value="2">组织</option> | |||||
| </select> | </select> | ||||
| <% end %> | <% end %> | ||||
| </div> | </div> | ||||
| @@ -7,7 +7,6 @@ | |||||
| <ul class="homepagePostType" style="margin-left:95px; width:80px" > | <ul class="homepagePostType" style="margin-left:95px; width:80px" > | ||||
| <li> | <li> | ||||
| <ul class="homepagePostTypeHomework fl"> | <ul class="homepagePostTypeHomework fl"> | ||||
| <% if hidden_unproject_infos %> | |||||
| <li><%= link_to "全部动态", {:controller => "users", :action => "project_community", :type => "all"}, :class => "homepagePostTypeAll postTypeGrey" %></li> | <li><%= link_to "全部动态", {:controller => "users", :action => "project_community", :type => "all"}, :class => "homepagePostTypeAll postTypeGrey" %></li> | ||||
| <li><%= link_to @user == User.current ? "我的动态" : "他的动态", {:controller => "users", :action => "project_community", :type => "current_user"}, | <li><%= link_to @user == User.current ? "我的动态" : "他的动态", {:controller => "users", :action => "project_community", :type => "current_user"}, | ||||
| :class => "homepagePostTypeMine postTypeGrey" %></li> | :class => "homepagePostTypeMine postTypeGrey" %></li> | ||||
| @@ -15,7 +14,6 @@ | |||||
| <li><%= link_to "论坛动态", {:controller => "users", :action => "project_community", :type => "project_message"}, :class => "homepagePostTypeForum postTypeGrey"%></li> | <li><%= link_to "论坛动态", {:controller => "users", :action => "project_community", :type => "project_message"}, :class => "homepagePostTypeForum postTypeGrey"%></li> | ||||
| <li><%= link_to "资源库动态", {:controller => "users", :action => "project_community", :type => "project_resource"}, :class => "homepagePostTypeNotice postTypeGrey" %></li> | <li><%= link_to "资源库动态", {:controller => "users", :action => "project_community", :type => "project_resource"}, :class => "homepagePostTypeNotice postTypeGrey" %></li> | ||||
| <!-- <li><%#= link_to "个人留言", {:controller => "users", :action => "project_community", :type => "user_journals"}, :class => "homepagePostTypeMessage postTypeGrey" %></li>--> | <!-- <li><%#= link_to "个人留言", {:controller => "users", :action => "project_community", :type => "user_journals"}, :class => "homepagePostTypeMessage postTypeGrey" %></li>--> | ||||
| <% end %> | |||||
| </ul> | </ul> | ||||
| </li> | </li> | ||||
| </ul> | </ul> | ||||
| @@ -2,11 +2,16 @@ | |||||
| //点击头像下面的添加关注按钮 | //点击头像下面的添加关注按钮 | ||||
| <% if( params[:target_id] == params[:object_id] ) %> | <% if( params[:target_id] == params[:object_id] ) %> | ||||
| <% if @user %> | <% if @user %> | ||||
| $("#watch_user_btn_div").html("<%= escape_javascript render(:partial => "layouts/user_watch_btn", :locals => {:target => watched.first}) %>"); | |||||
| <% if opt == "add" %> | |||||
| $("#add_or_cancle_watch").html('<a href="<%= watch_path(:object_type => 'user', :object_id => @user.id, :target_id => @user.id) %>" class="home-btn-grey fl mr12" data-method="delete" data-remote="true" title="取消关注">取消关注</a>'); | |||||
| <% else %> | |||||
| $("#add_or_cancle_watch").html('<a href="<%= watch_path(:object_type => 'user', :object_id => @user.id, :target_id => @user.id) %>" class="home-btn-grey fl mr12" data-method="post" data-remote="true" title="添加关注">添加关注</a>'); | |||||
| <% end %> | |||||
| /* $("#watch_user_btn_div").html("<%#= escape_javascript render(:partial => "layouts/user_watch_btn", :locals => {:target => watched.first}) %>");*/ | |||||
| <% end %> | <% end %> | ||||
| $("#user_fans_number").html("<%= watched.first.watcher_users.count.to_s%>"); | |||||
| $(".add_cancel_watch_<%= watched.first.id %>").html("<%= escape_javascript (render :partial => 'users/watch_btn_for_picture', :locals => {:user => watched.first}) %>"); | |||||
| $(".fans_count_<%= watched.first.id %>").text("<%= watched.first.watcher_users.count.to_s %>"); | |||||
| /*$("#user_fans_number").html("<%#= watched.first.watcher_users.count.to_s%>"); | |||||
| $(".add_cancel_watch_<%#= watched.first.id %>").html("<%#= escape_javascript (render :partial => 'users/watch_btn_for_picture', :locals => {:user => watched.first}) %>"); | |||||
| $(".fans_count_<%#= watched.first.id %>").text("<%#= watched.first.watcher_users.count.to_s %>");*/ | |||||
| //在当前用户的粉丝、关注页面 | //在当前用户的粉丝、关注页面 | ||||
| <% elsif( params[:target_id] == User.current.id.to_s )%> | <% elsif( params[:target_id] == User.current.id.to_s )%> | ||||
| $("#users_list").html("<%= escape_javascript (render :partial => 'users/user_fans_item', :locals => {:list => list,:target=>User.current,:action_name=>action_name,:page=>params[:page]}) %>"); | $("#users_list").html("<%= escape_javascript (render :partial => 'users/user_fans_item', :locals => {:list => list,:target=>User.current,:action_name=>action_name,:page=>params[:page]}) %>"); | ||||
| @@ -193,10 +193,12 @@ Redmine::AccessControl.map do |map| | |||||
| map.permission :delete_issue_watchers, {:watchers => :destroy} | map.permission :delete_issue_watchers, {:watchers => :destroy} | ||||
| end | end | ||||
| =begin | |||||
| map.project_module :training_tasks do |map| | map.project_module :training_tasks do |map| | ||||
| map.permission :manage_training_tasks, {:training_tasks => [:new, :create]}, :require => :loggedin | map.permission :manage_training_tasks, {:training_tasks => [:new, :create]}, :require => :loggedin | ||||
| map.permission :view_training_tasks, {:training_tasks => :index, :versions => :download}, :read => true | map.permission :view_training_tasks, {:training_tasks => :index, :versions => :download}, :read => true | ||||
| end | end | ||||
| =end | |||||
| # map.project_module :time_tracking do |map| | # map.project_module :time_tracking do |map| | ||||
| # map.permission :log_time, {:timelog => [:new, :create]}, :require => :loggedin | # map.permission :log_time, {:timelog => [:new, :create]}, :require => :loggedin | ||||
| @@ -418,7 +420,9 @@ Redmine::MenuManager.map :project_menu do |menu| | |||||
| #menu.push :roadmap, { :controller => 'versions', :action => 'index' }, :param => :project_id | #menu.push :roadmap, { :controller => 'versions', :action => 'index' }, :param => :project_id | ||||
| # :if => Proc.new { |p| p.shared_versions.any? } | # :if => Proc.new { |p| p.shared_versions.any? } | ||||
| menu.push :issues, { :controller => 'issues', :action => 'index' },:if => Proc.new {|p| p.enabled_module_names.include?('issue_tracking') } ,:param => :project_id, :caption => :label_issue_plural | menu.push :issues, { :controller => 'issues', :action => 'index' },:if => Proc.new {|p| p.enabled_module_names.include?('issue_tracking') } ,:param => :project_id, :caption => :label_issue_plural | ||||
| =begin | |||||
| menu.push :training_tasks, { :controller => 'training_tasks', :action => 'index' },:if => Proc.new {|p| p.enabled_module_names.include?('training_tasks') } ,:param => :project_id, :caption => :label_training_task | menu.push :training_tasks, { :controller => 'training_tasks', :action => 'index' },:if => Proc.new {|p| p.enabled_module_names.include?('training_tasks') } ,:param => :project_id, :caption => :label_training_task | ||||
| =end | |||||
| # menu.push :new_issue, { :controller => 'issues', :action => 'new', :copy_from => nil }, :param => :project_id, :caption => :label_issue_new, | # menu.push :new_issue, { :controller => 'issues', :action => 'new', :copy_from => nil }, :param => :project_id, :caption => :label_issue_new, | ||||
| # :html => { :accesskey => Redmine::AccessKeys.key_for(:new_issue) } | # :html => { :accesskey => Redmine::AccessKeys.key_for(:new_issue) } | ||||
| # menu.push :gantt, { :controller => 'gantts', :action => 'show' }, :param => :project_id, :caption => :label_gantt | # menu.push :gantt, { :controller => 'gantts', :action => 'show' }, :param => :project_id, :caption => :label_gantt | ||||
| @@ -634,7 +634,7 @@ function submit_topic_project() | |||||
| } | } | ||||
| function reset_topic(){ | function reset_topic(){ | ||||
| document.getElementById("topic_editor").style.display = "none"; | |||||
| } | } | ||||
| //查找TAG资源 | //查找TAG资源 | ||||