commit
6a4f239961
@ -0,0 +1,4 @@
|
||||
class PullRequest < ActiveRecord::Base
|
||||
attr_accessible :gpid, :pull_request_id, :user_id
|
||||
validates_uniqueness_of :pull_request_id
|
||||
end
|
@ -1,6 +1,27 @@
|
||||
class UserWechat < ActiveRecord::Base
|
||||
attr_accessible :subscribe, :openid, :nickname, :sex, :language, :city, :province, :country,
|
||||
:headimgurl, :subscribe_time, :unionid, :remark, :groupid, :user, :user_id
|
||||
:headimgurl, :subscribe_time, :unionid, :remark, :groupid, :user, :user_id, :bindtype
|
||||
|
||||
belongs_to :user
|
||||
|
||||
def real?
|
||||
bindtype == 0
|
||||
end
|
||||
|
||||
def migrate_user(u)
|
||||
self.bindtype = 0
|
||||
old_user = user.id
|
||||
self.user = u
|
||||
self.save
|
||||
|
||||
## 主要是将comment 迁移
|
||||
User.delete(old_user)
|
||||
|
||||
JournalsForMessage.where(user_id: old_user).update_all(user_id: u.id)
|
||||
Journal.where(user_id: old_user).update_all(user_id: u.id)
|
||||
Comment.where(author_id: old_user).update_all(author_id: u.id)
|
||||
Message.where(author_id: old_user).update_all(author_id: u.id)
|
||||
BlogComment.where(author_id: old_user).update_all(author_id: u.id)
|
||||
UserActivity.where(user_id: old_user).update_all(user_id: u.id)
|
||||
end
|
||||
end
|
||||
|
@ -1,11 +1,11 @@
|
||||
[
|
||||
<% @users && @users.each_with_index do |person,index| %>
|
||||
<% if index == 0 %>
|
||||
{"id":<%=index%>, "userid": "<%=person.id%>", "name": "所有人", "login": "<%=person.name%>", "searchKey": "<%=person.name%>"}
|
||||
<%= index != @users.size-1 ? ',' : '' %>
|
||||
<% else %>
|
||||
{"id":<%=index%>, "userid": <%=person.id%>, "name": "<%=person.show_name%>", "login": "<%=person.login%>", "searchKey": "<%=person.get_at_show_name%>"}
|
||||
<%= index != @users.size-1 ? ',' : '' %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% @users && @users.each_with_index do |person,index| %>
|
||||
<% if index == 0 %>
|
||||
{"id":<%=index%>, "userid": "<%=person.id%>", "name": "所有人", "login": "<%=person.name%>", "searchKey": "<%=person.name%>"}
|
||||
<%= index != @users.size-1 ? ',' : '' %>
|
||||
<% else %>
|
||||
{"id":<%=index%>, "userid": "<%=person.id%>", "name": "<%=person.show_name%>", "login": "<%=person.login%>", "searchKey": "<%=person.get_at_show_name%>"}
|
||||
<%= index != @users.size-1 ? ',' : '' %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
]
|
||||
|
@ -1,19 +1,14 @@
|
||||
<% curse_attachments.each do |file| %>
|
||||
<% if file.is_public? || User.current.member_of_course?(course) || User.current.admin? %>
|
||||
<% curse_attachments.each do |file| %>
|
||||
<% if file.is_public? || User.current.member_of_course?(course) || User.current.admin? %>
|
||||
<div id="resource_detail_<%=file.id %>">
|
||||
<%=render :partial=>'files/resource_detail',:locals => {:file => file} %>
|
||||
<%=render :partial=>'files/resource_detail',:locals => {:file => file} %>
|
||||
</div>
|
||||
<% else %>
|
||||
<div class="re_con_box"><span class='fr mr10 pr_join_span '><%= file.filename %>是私有资源</span></div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<% if curse_attachments.count == 10%>
|
||||
<% if params[:action] == 'search' %>
|
||||
<%=link_to "点击展开更多", search_course_files_path({:course_id => course.id,:page => @obj_pages.nil? ? @feedback_pages.page + 1 : @obj_pages.page + 1}.merge(params)),:id => "show_more_attachments",:remote => "true",:class => "loadMore mt10 f_grey" %>
|
||||
<% else %>
|
||||
<!-- 全站搜索的时候 返回的页码对象是obj_pages,而站内搜索返回的页码对象是feedback_pages -->
|
||||
<%=link_to "点击展开更多", course_files_path(:course_id => course.id, :page => @page), :id => "show_more_attachments",:remote => "true",:class => "loadMore mt10 f_grey" %>
|
||||
<%end%>
|
||||
<% end%>
|
||||
<div class="re_con_box"><span class='fr mr10 pr_join_span '><%= file.filename %>是私有资源</span></div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<ul class="wlist">
|
||||
<%= pagination_links_full @feedback_pages, @feedback_count, :per_page_links => false, :remote => true, :flag => true%>
|
||||
</ul>
|
||||
|
||||
|
@ -1,7 +1,9 @@
|
||||
<% if @course %>
|
||||
$("#show_more_attachments").replaceWith("<%= escape_javascript( render :partial => 'files/course_list',:locals => {course:@course,all_attachments: @all_attachments,sort:@sort,order:@order,curse_attachments:@obj_attachments} )%>");
|
||||
$("#resource_list").html("<%= escape_javascript( render :partial => 'files/course_file',:locals => {course:@course,all_attachments: @all_attachments,sort:@sort,order:@order,curse_attachments:@obj_attachments}) %>");
|
||||
$("#pages").html('<%= pagination_links_full @feedback_pages, @feedback_count, :per_page_links => false, :remote => true, :flag => true %>');
|
||||
<% elsif @project %>
|
||||
$("#show_more_attachments").replaceWith("<%= escape_javascript( render :partial => 'files/project_list', :locals => {project:@project, all_attachments:@all_attachments, sort:@sort, order:@order, project_attachments:@obj_attachments})%>");
|
||||
$("#resource_list").html("<%= escape_javascript( render :partial => 'files/project_file',:locals => {project:@project, all_attachments:@all_attachments, sort:@sort, order:@order, project_attachments:@obj_attachments}) %>");
|
||||
$("#pages").html('<%= pagination_links_full @feedback_pages, @feedback_count, :per_page_links => false, :remote => true, :flag => true %>');
|
||||
<% elsif @org_subfield %>
|
||||
$("#show_more_attachments").replaceWith("<%= escape_javascript( render :partial => 'files/org_subfield_list', :locals => {org_subfield:@org_subfield, all_attachments:@all_attachments, sort:@sort, order:@order, org_subfield_attachments:@obj_attachments})%>");
|
||||
<%end %>
|
@ -1,6 +1,3 @@
|
||||
<% if (@obj_pages &&( @obj_pages.page > 1)) || (@feedback_pages && (@feedback_pages.page > 1)) %> //搜索的时候有时候是需要加载下一页,有时候是直接替换当前 #course_list。这个根据 page来判定
|
||||
$("#show_more_attachments").replaceWith("<%= escape_javascript( render :partial => 'files/course_list',:locals => {course: @course,all_attachments: @result,sort:@sort,order:@order,curse_attachments:@searched_attach} )%>");
|
||||
<% else %>
|
||||
$("#course_list").html("<%= escape_javascript(render :partial => 'files/course_list',:locals => {course: @course,all_attachments: @result,sort:@sort,order:@order,curse_attachments:@searched_attach})%>");
|
||||
$("#attachment_count").html("<%= @result.count%>")
|
||||
<% end %>
|
||||
|
||||
$("#resource_list").html("<%= escape_javascript( render :partial => 'files/course_file',:locals => {course:@course,all_attachments: @all_attachments,sort:@sort,order:@order,curse_attachments:@obj_attachments} )%>");
|
||||
$("#pages").html('<%= pagination_links_full @feedback_pages, @feedback_count, :per_page_links => false, :remote => true, :flag => true %>');
|
||||
|
@ -1,7 +1,2 @@
|
||||
<% if (@obj_pages &&( @obj_pages.page > 1)) || (@feedback_pages && (@feedback_pages.page > 1)) %> //搜索的时候有时候是需要加载下一页,有时候是直接替换当前 #course_list。这个根据 page来判定
|
||||
$("#show_more_attachments").replaceWith("<%= escape_javascript( render :partial => 'files/project_list',
|
||||
:locals => {project: @project, all_attachments:@result, sort:@sort, order:@order, project_attachments:@searched_attach})%>");
|
||||
<% else %>
|
||||
$("#course_list").html("<%= escape_javascript(render :partial => 'files/project_list',:locals => {project:@project, all_attachments:@result, sort:@sort, order:@order,project_attachments:@searched_attach})%>");
|
||||
$("#attachment_count").html("<%= @project_attachment_result.count %>")
|
||||
<% end %>
|
||||
$("#resource_list").html("<%= escape_javascript( render :partial => 'files/project_file',:locals => {project:@project, all_attachments:@all_attachments, sort:@sort, order:@order, project_attachments:@obj_attachments}) %>");
|
||||
$("#pages").html('<%= pagination_links_full @feedback_pages, @feedback_count, :per_page_links => false, :remote => true, :flag => true %>');
|
||||
|
@ -1,8 +1,7 @@
|
||||
<% if @course %>
|
||||
$("#course_list").html("<%= escape_javascript(render :partial => 'course_list',:locals => {course: @course,all_attachments: @result,sort:@sort,order:@order,curse_attachments:@searched_attach})%>");
|
||||
$("#course_filter_order").html("<%= escape_javascript(render :partial => 'course_file_filter_order', :locals => {course: @course,all_attachments: @result,sort:@sort,order:@order,curse_attachments:@searched_attach, tag_name: @tag_name, q: @q})%>");
|
||||
$("#attachment_count").html("<%= @result.count%>")
|
||||
$("#resource_list").html("<%= escape_javascript( render :partial => 'files/course_file',:locals => {course:@course,all_attachments: @all_attachments,sort:@sort,order:@order,curse_attachments:@obj_attachments} )%>");
|
||||
$("#pages").html('<%= pagination_links_full @feedback_pages, @feedback_count, :per_page_links => false, :remote => true, :flag => true %>');
|
||||
<% else %>
|
||||
$("#course_list").html("<%= escape_javascript(render :partial => 'project_list',:locals => {project:@project, all_attachments:@result_search_project, sort:@sort, order:@order, project_attachments:@searched_attach}) %>");
|
||||
$("#attachment_count").html("<%= @result_search_project.count%>")
|
||||
$("#resource_list").html("<%= escape_javascript( render :partial => 'files/project_file',:locals => {project:@project, all_attachments:@all_attachments, sort:@sort, order:@order, project_attachments:@obj_attachments}) %>");
|
||||
$("#pages").html('<%= pagination_links_full @feedback_pages, @feedback_count, :per_page_links => false, :remote => true, :flag => true %>');
|
||||
<% end %>
|
||||
|
@ -0,0 +1,49 @@
|
||||
<div class="merge-discussion-input">
|
||||
<%= form_tag(url_for(:controller => 'pull_requests', :action => 'create_pull_request_comment', :project_id => @project.id), :id => 'pull_request_comment_form', :method => "post", :remote => true) do %>
|
||||
<textarea id="pull_request_comment" name="pull_request_comment"></textarea>
|
||||
<span id ="pr_comment_tip" class="fontGrey2 c_red" style="display: none">内容不能为空</span>
|
||||
<a href="javascript:void(0);" class="BlueCirBtn mt10" onclick="pull_request_commit()">留言</a>
|
||||
<% end %>
|
||||
</div>
|
||||
<% @comments.each do |comment| %>
|
||||
<div class="merge-discussion-content merge-discussion-automatic">
|
||||
<%= link_to comment.author.try(:username), user_path(get_user_by_login_and(comment.author.try(:username))), :class => "link-blue mr15 fl" %>
|
||||
<span class="fl fontGrey2"><%= time_tag(comment.created_at) %>前</span>
|
||||
<div class="cl"></div>
|
||||
<div class="merge-discussion-detail"><%= comment.note %></div>
|
||||
</div>
|
||||
<% end %>
|
||||
<div style="text-align:center;">
|
||||
<div class="pages" style="width:auto; display:inline-block;">
|
||||
<ul id="homework_pository_ref_pages">
|
||||
<%= pagination_links_full @pages, @count, :per_page_links => false, :remote => @is_remote, :flag => true, :is_new => true%>
|
||||
</ul>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
function regex_pr_comment()
|
||||
{
|
||||
var comment = $.trim($("#pull_request_comment").val());
|
||||
if(comment.length == 0)
|
||||
{
|
||||
$("#pr_comment_tip").show();
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
$("#pr_comment_tip").hide();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
//提交pull request_comment
|
||||
function pull_request_commit()
|
||||
{
|
||||
if(regex_pr_comment())
|
||||
{
|
||||
$("#pull_request_comment_form").submit();
|
||||
}
|
||||
}
|
||||
</script>
|
@ -1,19 +1,32 @@
|
||||
<% @commits.each do |commit| %>
|
||||
<div class="new-merge-wrap">
|
||||
<div class="merge-commit-time">
|
||||
<img width="16" class="ui-datepicker-trigger mr15" style="cursor:default; margin-top:3px; margin-left:0;" /><span class="fontGrey3"><%= format_date(commit.created_at) %></span>
|
||||
<!--<p class="mt10 fontGrey2">1次提交</p>-->
|
||||
<p class="mt10 fontGrey2"><%= link_to commit.author_name, user_path(get_user_by_mail(commit.author_email)), :class => "link-blue" %>创建于<%= time_tag(commit.created_at) %>前</p>
|
||||
</div>
|
||||
<div class="merge-commit-detail">
|
||||
<span class="fontGrey3 fb"><%= commit.title %></span>
|
||||
<div class="new-merge-row b_grey fontGrey2"><span class="ml10"> 根据最近提交时间排列</span></div>
|
||||
<% if !@commits.blank? && @type == "2" %>
|
||||
<% @commits.each do |commit| %>
|
||||
<div class="new-merge-wrap">
|
||||
<div class="merge-commit-time">
|
||||
<img width="16" class="ui-datepicker-trigger mr15" style="cursor:default; margin-top:3px; margin-left:0;" /><span class="fontGrey3"><%= format_date(commit.created_at) %></span>
|
||||
<!--<p class="mt10 fontGrey2">1次提交</p>-->
|
||||
<p class="mt10 fontGrey2"><%= link_to commit.author_name, user_path(get_user_by_mail(commit.author_email)), :class => "link-blue" %> 创建于<%= time_tag(commit.created_at) %>前</p>
|
||||
</div>
|
||||
<div class="merge-commit-detail">
|
||||
<span class="fontGrey3 fb"><%= commit.title %></span>
|
||||
|
||||
</div>
|
||||
<div class="merge-commit-code">
|
||||
</div>
|
||||
<div class="merge-commit-code">
|
||||
<span class="fontGrey3">
|
||||
<%= link_to truncate(commit.short_id, :length => 20), {:controller => 'repositories', :action => 'commit_diff', :id => @project.id, :changeset => commit.id}, :target => "_blank" %>
|
||||
</span>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<% end %>
|
||||
<div style="text-align:center;">
|
||||
<div class="pages" style="width:auto; display:inline-block;">
|
||||
<ul id="homework_pository_ref_pages">
|
||||
<%= pagination_links_full @pages, @count, :per_page_links => false, :remote => @is_remote, :flag => true, :is_new => true%>
|
||||
</ul>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
|
||||
|
@ -1 +1 @@
|
||||
$("#merge_record_1").html('<%= escape_javascript( render :partial => "pull_requests/pull_request_changes", :locals => {:type => @type} ) %>');
|
||||
$("#merge_record_2").html('<%= escape_javascript( render :partial => "pull_requests/pull_request_changes") %>');
|
@ -0,0 +1 @@
|
||||
$("#merge_record_0").html('<%= escape_javascript( render :partial => "pull_requests/pull_request_comments") %>');
|
@ -1 +1 @@
|
||||
$("#merge_record_0").html('<%= escape_javascript( render :partial => "pull_requests/pull_request_commits", :locals => {:type => @type} ) %>');
|
||||
$("#merge_record_1").html('<%= escape_javascript( render :partial => "pull_requests/pull_request_commits") %>');
|
@ -0,0 +1,3 @@
|
||||
<div id="user_join_projects_list">
|
||||
<%= render :partial => 'users/project_list', :locals => {:projects => @my_joined_projects, :list_type => 2, :count => @my_joined_projects_count}%>
|
||||
</div>
|
@ -0,0 +1,3 @@
|
||||
<div id="user_projects_list">
|
||||
<%= render :partial => 'users/project_list', :locals => {:projects => @my_projects, :list_type => 1, :count => @my_projects_count}%>
|
||||
</div>
|
@ -0,0 +1,63 @@
|
||||
<div class="syllabus_category">
|
||||
<% unless projects.empty? %>
|
||||
<% if @type.to_i == 2 %>
|
||||
<%= link_to "", {:controller => 'users', :action => 'sort_project_list', :id =>@user,:list_type => list_type, :type => @type, :sort => @c_sort, :order => 2 }, :class => "#{@c_sort.to_i == 1 ? 'sortupbtn' : 'sortdownbtn'} fr", :style => "margin-right: 5px;", :remote => true %>
|
||||
<% else %>
|
||||
<%= link_to "", {:controller => 'users', :action => 'sort_project_list', :id =>@user,:list_type => list_type, :type => @type, :sort => @c_sort, :order => 2 }, :class => "sortdownbtn sort_no fr", :style => "margin-right: 5px;", :remote => true %>
|
||||
<% end %>
|
||||
<%= link_to "人气", {:controller => 'users', :action => 'sort_project_list', :id =>@user,:list_type => list_type, :type => @type, :sort => @c_sort, :order => 2 }, :class => "sortTxt fr", :remote => true %>
|
||||
<% if @type.to_i == 1 %>
|
||||
<%= link_to "", {:controller => 'users', :action => 'sort_project_list', :id =>@user,:list_type => list_type, :type => @type, :sort => @c_sort, :order => 1 }, :class => "#{@c_sort.to_i == 1 ? 'sortupbtn' : 'sortdownbtn'} fr", :remote => true %>
|
||||
<% else %>
|
||||
<%= link_to "", {:controller => 'users', :action => 'sort_project_list', :id =>@user,:list_type => list_type, :type => @type, :sort => @c_sort, :order => 1 }, :class => "sortdownbtn sort_no fr", :remote => true %>
|
||||
<% end %>
|
||||
<%= link_to "时间", {:controller => 'users', :action => 'sort_project_list', :id =>@user,:list_type => list_type, :type => @type, :sort => @c_sort, :order => 1 }, :class => "sortTxt fr", :remote => true %>
|
||||
<% end %>
|
||||
<span class="grayTxt fl "><%=@user == User.current ? "我" : "他" %><%= list_type == 1 ? "创建" : "参与"%>的项目</span>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<div class="syllabus_courses_box" id="project_li_<%=list_type %>">
|
||||
<% if projects.empty? %>
|
||||
<div class="icons_tishi"><img src="/images/sy/icons_tan.png" width="110" height="110" alt="" ></div>
|
||||
<% if list_type == 1 %>
|
||||
<p class="sy_tab_con_p"><%=@user == User.current ? "您" : "他" %>还没有创建项目~~<br />
|
||||
<%= link_to "创建项目", new_project_path(:host=> Setting.host_name), :target => "_blank", :class => "sy_btn_green ml5 mt5" if @user == User.current %>
|
||||
</p>
|
||||
<% else %>
|
||||
<p class="sy_tab_con_p"><%=@user == User.current ? "您" : "他" %>还没有加入项目~~<br />
|
||||
<%= link_to "加入项目", applied_join_project_path, :remote => true, :method => "post", :class => "sy_btn_green ml5 mt5" if @user == User.current %>
|
||||
</p>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<% projects.each_with_index do |project, i| %>
|
||||
<div class="syllabus_courses_list <%= i > 4 ? 'none' : ''%>" style="cursor: default;">
|
||||
<div class="sy_courses_open">
|
||||
<span class="icons_project_list fl mt5 mr10"></span>
|
||||
<h3><%= link_to project.name, project_path(project.id,:host=>Setting.host_name), :target => '_blank', :class => "new_project_title fl",:id => "show_project_#{project.id}", :title => (project.is_public? ? "公开项目:":"私有项目:") + project.name%></h3>
|
||||
<% unless project.is_public? %>
|
||||
<span class="hw_icon_private fl"></span>
|
||||
<% end %>
|
||||
<% projectUser = User.where("id=?",project.user_id).first %>
|
||||
<%=link_to "<span class='fr grayTxt'>创建者:#{projectUser.try(:realname) != " " ? projectUser.lastname + projectUser.firstname : projectUser.try(:login)}</span>".html_safe, user_path(projectUser) %>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<div>
|
||||
<p class="fl sy_p_grey">更新时间:<%= format_date(project.updatetime) %></p>
|
||||
<div class=" fr">
|
||||
<p class="list-info fr grayTxt">
|
||||
<%= link_to project.members.count, member_project_path(project), :class => "c_blue" %><span class="mr5">成员 |</span>
|
||||
<%= link_to project.project_score.issue_num, project_issues_path(project), :class => "c_blue" %><span class="mr5">问题 |</span>
|
||||
<%= link_to project.project_score.attach_num, project_files_path(project), :class => "c_blue" %><span class="mr5">资源</span>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<% end %>
|
||||
<% if count > 5 %>
|
||||
<div class="syllabus_courses_list">
|
||||
<p class="new_projectlist_more"><a id="project_more_<%=list_type %>" href="javascript:void(0);" data-count="<%= count %>" data-init="0" onclick="expand_projects('#project_more_<%=list_type %>', '#project_li_<%=list_type %>', <%=count%>);">共<%=count %>个项目,点击全部展开</a></p>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div><!--syllabus_courses_box end-->
|
@ -0,0 +1,5 @@
|
||||
<% if @list_type.to_i == 1 %>
|
||||
$("#user_projects_list").html('<%= escape_javascript(render :partial => 'users/project_list', :locals => {:projects => @projects, :list_type => 1, :count => @projects_count}) %>');
|
||||
<% else %>
|
||||
$("#user_join_projects_list").html('<%= escape_javascript(render :partial => 'users/project_list', :locals => {:projects => @projects, :list_type => 2, :count => @projects_count}) %>');
|
||||
<% end %>
|
@ -1 +1,39 @@
|
||||
<%= render :partial => 'users/user_project_list'%>
|
||||
<div class="syllabus_box">
|
||||
<h2 class="syllabus_h2_top"><span class="icon_course fl mt7 mr5"></span>项目列表</h2>
|
||||
<%= render :partial => 'users/my_projects'%>
|
||||
<div class="" style="height:20px; background:#eaebec;"></div>
|
||||
<%= render :partial => 'users/my_joined_projects'%>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
//如果右边的列表比左边的高度低则将右边的高度设为与左边对齐
|
||||
$(function() {
|
||||
var leftHeight = $("#LSide").height() - $(".fontGrey5").height() - 20;
|
||||
var rightHeight = $(".homepageRight").height();
|
||||
if (rightHeight < leftHeight) {
|
||||
var diffHeight = leftHeight - rightHeight;
|
||||
var tmpHeight = $(".syllabus_box").height() + diffHeight;
|
||||
$(".syllabus_box").css("minHeight", tmpHeight);
|
||||
}
|
||||
});
|
||||
function expand_projects(btnid,container,count){
|
||||
var target = $(container).children('.syllabus_courses_list');
|
||||
var btn = $(btnid);
|
||||
if(btn.data('init')=='0'){
|
||||
btn.data('init',1);
|
||||
btn.html('点击收起');
|
||||
target.show();
|
||||
}else{
|
||||
btn.data('init',0);
|
||||
btn.html('共' + count + '个项目,点击全部展开');
|
||||
target.hide();
|
||||
target.eq(0).show();
|
||||
target.eq(1).show();
|
||||
target.eq(2).show();
|
||||
target.eq(3).show();
|
||||
target.eq(4).show();
|
||||
btn.parent().parent().show();
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
@ -1 +1 @@
|
||||
$("#user_show_more_project").replaceWith("<%= escape_javascript( render :partial => 'layouts/user_projects',:locals => {:projects => @projects,:user => @user, :page => @page} )%>");
|
||||
$("#user_show_more_project").replaceWith("<%= escape_javascript( render :partial => 'layouts/user_projects',:locals => {:projects => @projects,:user => @user, :page => @page, :all_count => @all_count} )%>");
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue