2014-09-15 10:58:14 +08:00
|
|
|
|
<% @nav_dispaly_project_label = 1
|
2015-03-06 14:55:21 +08:00
|
|
|
|
@nav_dispaly_forum_label = 1 %>
|
2014-09-15 10:58:14 +08:00
|
|
|
|
<%#@nav_dispaly_project_label = 1 %>
|
|
|
|
|
<!DOCTYPE html>
|
|
|
|
|
<html lang="en">
|
|
|
|
|
<head>
|
|
|
|
|
<meta charset="utf-8" />
|
|
|
|
|
<title><%= h html_title %></title>
|
|
|
|
|
<meta name="description" content="<%= Redmine::Info.app_name %>" />
|
|
|
|
|
<meta name="keywords" content="issue,bug,tracker" />
|
|
|
|
|
<%= csrf_meta_tag %>
|
|
|
|
|
<%= favicon %>
|
|
|
|
|
<%= javascript_heads %>
|
|
|
|
|
<%= heads_for_theme %>
|
2015-04-15 16:34:34 +08:00
|
|
|
|
<%= stylesheet_link_tag 'public', 'pleft', 'project','jquery/jquery-ui-1.9.2' %>
|
2015-04-07 12:48:47 +08:00
|
|
|
|
<%= javascript_include_tag 'project', 'header' %>
|
2014-09-15 10:58:14 +08:00
|
|
|
|
<%= call_hook :view_layouts_base_html_head %>
|
|
|
|
|
<!-- page specific tags -->
|
|
|
|
|
<%= yield :header_tags -%>
|
2015-04-09 19:18:04 +08:00
|
|
|
|
|
|
|
|
|
<!--项目的三种类型-->
|
|
|
|
|
<script type="text/javascript">
|
2015-04-14 10:17:42 +08:00
|
|
|
|
function click_ok(url)
|
2015-04-09 19:18:04 +08:00
|
|
|
|
{
|
|
|
|
|
$('#light').css('display','none');
|
|
|
|
|
$('#fade').css('display','none');
|
2015-04-14 10:17:42 +08:00
|
|
|
|
//ajax处理请求
|
|
|
|
|
var project_type;
|
2015-04-09 19:18:04 +08:00
|
|
|
|
if($("#development_group").attr("checked") == "checked"){
|
2015-04-14 10:17:42 +08:00
|
|
|
|
project_type = 1;
|
2015-04-09 19:18:04 +08:00
|
|
|
|
}
|
2015-04-14 10:17:42 +08:00
|
|
|
|
else if($("#research_group").attr("checked") == "checked"){
|
|
|
|
|
project_type = 2;
|
|
|
|
|
|
2015-04-09 19:18:04 +08:00
|
|
|
|
}
|
2015-04-14 10:17:42 +08:00
|
|
|
|
else if($("#friend_organization").attr("checked") == "checked"){
|
|
|
|
|
project_type = 3;
|
2015-04-09 19:18:04 +08:00
|
|
|
|
}
|
2015-04-14 10:17:42 +08:00
|
|
|
|
$.get(
|
|
|
|
|
url,
|
|
|
|
|
{ project_type: project_type},
|
|
|
|
|
function (data) {
|
|
|
|
|
if(data == 1)
|
|
|
|
|
{
|
|
|
|
|
$("#setting_project_type").replaceWith("<%= escape_javascript(project_type_link(l(:label_development_team)))%>");
|
2015-04-16 09:30:06 +08:00
|
|
|
|
$("#project_memu_list").html('<%= escape_javascript(render(:partial => 'layouts/base_development_group')) %>');
|
2015-04-14 10:17:42 +08:00
|
|
|
|
$("#close_light").attr("onClick","close_window('development_group');");
|
|
|
|
|
}
|
|
|
|
|
else if(data == 2)
|
|
|
|
|
{
|
|
|
|
|
$("#setting_project_type").replaceWith("<%= escape_javascript(project_type_link(l(:label_research_group)))%>");
|
2015-04-16 09:30:06 +08:00
|
|
|
|
$("#project_memu_list").html('<%= escape_javascript(render(:partial => 'layouts/base_research_team')) %>');
|
2015-04-14 10:17:42 +08:00
|
|
|
|
$("#close_light").attr("onClick","close_window('research_group');");
|
|
|
|
|
}
|
|
|
|
|
else if(data == 3)
|
|
|
|
|
{
|
|
|
|
|
$("#setting_project_type").replaceWith("<%= escape_javascript(project_type_link(l(:label_friend_organization)))%>");
|
2015-04-16 09:30:06 +08:00
|
|
|
|
$("#project_memu_list").html('<%= escape_javascript(render(:partial => 'layouts/base_friend_group')) %>');
|
2015-04-14 10:17:42 +08:00
|
|
|
|
$("#close_light").attr("onClick","close_window('friend_organization');");
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
alert("服务器异常,请与管理员联系");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
);
|
2015-04-09 19:18:04 +08:00
|
|
|
|
}
|
|
|
|
|
</script>
|
2014-09-15 10:58:14 +08:00
|
|
|
|
</head>
|
|
|
|
|
<!--add by huang-->
|
2015-04-07 12:48:47 +08:00
|
|
|
|
<body>
|
|
|
|
|
<div id="Container">
|
|
|
|
|
<%= render :partial => 'layouts/new_header'%>
|
|
|
|
|
<div class="cl"></div>
|
2014-12-19 14:39:24 +08:00
|
|
|
|
|
2015-04-07 12:48:47 +08:00
|
|
|
|
<!--TopBar begin-->
|
|
|
|
|
<div id="TopBar">
|
|
|
|
|
<div class="topbar_info02 fl">
|
|
|
|
|
<h2>
|
|
|
|
|
<a href="http://<%= Setting.host_name %>" target="_blank" class="c_blue">
|
|
|
|
|
<%= l(:label_projects_community) %>
|
|
|
|
|
</a>
|
|
|
|
|
</h2>
|
|
|
|
|
<p>
|
|
|
|
|
<%= l(:label_user_location) %> :
|
|
|
|
|
<%= link_to l(:field_homepage), home_path %>
|
|
|
|
|
>
|
|
|
|
|
<a href="http://<%= Setting.host_name %>">
|
|
|
|
|
<%=l(:label_project_hosting_platform) %>
|
|
|
|
|
</a>
|
|
|
|
|
>
|
|
|
|
|
<%= link_to @project.name, nil %>
|
|
|
|
|
</p>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="search fl">
|
2015-03-06 14:55:21 +08:00
|
|
|
|
|
2015-04-07 12:48:47 +08:00
|
|
|
|
<%= form_tag(projects_search_path, :method => :get, :id => "project_search_form", :class => "search_form") do %>
|
|
|
|
|
<%= text_field_tag 'name', params[:name], :placeholder => "项目名称", :class => "search_text fl", :onkeyup => "regexName('#{l(:label_search_conditions_not_null)}');" %>
|
|
|
|
|
<a href="#" onclick="submitSerch('<%= l(:label_search_conditions_not_null) %>');" class="search_btn fl f14 c_white" >
|
|
|
|
|
<%= l(:label_search)%>
|
|
|
|
|
</a>
|
2015-04-16 04:12:26 +08:00
|
|
|
|
<div class="cl"></div>
|
2015-04-16 04:53:09 +08:00
|
|
|
|
<span id="project_name_span" class="fl"></span>
|
2015-04-07 12:48:47 +08:00
|
|
|
|
<% end %>
|
|
|
|
|
</div>
|
|
|
|
|
</div><!--TopBar end-->
|
|
|
|
|
<div id="content">
|
|
|
|
|
<div id="LSide" class="fl">
|
|
|
|
|
<div class="project_info">
|
|
|
|
|
<div class="pr_info_logo fl mr10 mb5">
|
|
|
|
|
<%= image_tag(url_to_avatar(@project), :width => "60", :height => "60") %>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="pr_info_id fl mb5 f14">
|
|
|
|
|
<%= l(:label_project_id)%><%= @project.id %>
|
|
|
|
|
</div>
|
|
|
|
|
<!--关注、申请加入/退出项目-->
|
|
|
|
|
<div id="join_exit_project_div">
|
2015-04-14 10:17:42 +08:00
|
|
|
|
<% text = @project.project_new_type == 1 ? l(:label_development_team) : (@project.project_new_type == 2 ? l(:label_research_group) : l(:label_friend_organization))%>
|
|
|
|
|
<%= render 'layouts/join_exit_project',{:text => text} %>
|
2015-04-07 12:48:47 +08:00
|
|
|
|
</div>
|
|
|
|
|
<!-- 项目得分 -->
|
|
|
|
|
<div class="cl"></div>
|
|
|
|
|
<div>
|
|
|
|
|
<a class="pr_info_name fl c_dark fb" href="javascript:void(0)" target="_blank">
|
|
|
|
|
<%= l(:label_project_name) %><%= @project.name %></a>
|
|
|
|
|
<% if @project.is_public? %>
|
|
|
|
|
<span class="img_private"><%= l(:label_public)%></span>
|
|
|
|
|
<% else %>
|
|
|
|
|
<span class="img_private"><%= l(:label_private)%></span>
|
|
|
|
|
<% end %>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="cl"></div>
|
|
|
|
|
<div>
|
|
|
|
|
<% if @project.project_type == 0 %>
|
|
|
|
|
<span class="fb f14 "><%= l(:label_project_score)%> :</span>
|
|
|
|
|
<%= link_to(format("%.2f" ,project_scores(@project) ).to_i, {:controller => 'projects',
|
|
|
|
|
:action => 'show_projects_score',
|
|
|
|
|
:remote => true,
|
|
|
|
|
:id => @project.id
|
|
|
|
|
}, :class => "c_orange f14" ) %>
|
|
|
|
|
<% end %>
|
|
|
|
|
</div>
|
2015-04-09 19:18:04 +08:00
|
|
|
|
|
2015-04-07 12:48:47 +08:00
|
|
|
|
<!--参数-->
|
|
|
|
|
<div class="pr_info_foot">
|
|
|
|
|
<%= l(:label_member) %>(<%= link_to "#{@project.members.count}", project_member_path(@project), :class => 'info_foot_num c_blue' %>)
|
|
|
|
|
<span>| </span>
|
|
|
|
|
<%= l(:label_user_watcher) %>(<%= link_to "#{@project.watcher_users.count}", {:controller=>"projects", :action=>"watcherlist", :id => @project.id}, :class => 'info_foot_num c_blue' %>)
|
|
|
|
|
<span>| </span>
|
|
|
|
|
<%= l(:project_module_attachments) %>(
|
|
|
|
|
<% attaments_num = @project.attachments.count+Attachment.where(["`container_type` = 'Version' and `container_id` in (?)",@project.versions.map{ |v| v.id}]).all.count %>
|
|
|
|
|
<%= link_to "#{attaments_num}", project_files_path(@project), :class => 'info_foot_num c_blue' %></span>)
|
|
|
|
|
</div>
|
|
|
|
|
<div class="cl"></div>
|
|
|
|
|
</div><!--参数 end-->
|
2015-04-09 19:18:04 +08:00
|
|
|
|
|
2015-04-07 12:48:47 +08:00
|
|
|
|
<!--邀请加入-->
|
|
|
|
|
<div class="subNavBox">
|
|
|
|
|
<% if User.current.member_of?(@project) %>
|
|
|
|
|
<div class="subNav currentDd currentDt subNav_jiantou"><%= l(:label_invite)%></div>
|
|
|
|
|
<ul class="navContent " style="display:block">
|
|
|
|
|
<li><%= link_to l(:label_invite_new_user), :controller=>"projects", :action=>"invite_members_by_mail", :id => @project %></li>
|
|
|
|
|
<li><%= link_to l(:label_invite_trustie_user), :controller=>"projects", :action=>"invite_members", :id => @project %></li>
|
|
|
|
|
</ul>
|
|
|
|
|
<% end %><!--end-->
|
2015-04-14 11:47:47 +08:00
|
|
|
|
<!--menu 左侧工具栏 -->
|
|
|
|
|
<!--project_new_type: 1为开发组;2为科研组;3为朋友圈子-->
|
2015-04-16 09:30:06 +08:00
|
|
|
|
<div id="project_memu_list">
|
|
|
|
|
<% if @project.project_new_type == 1 || @project.project_new_type.nil? %>
|
2015-04-14 11:47:47 +08:00
|
|
|
|
<%= render :partial => 'layouts/base_development_group', :locals => {:project => @project}%>
|
|
|
|
|
<% elsif @project.project_new_type == 2 %>
|
|
|
|
|
<%= render :partial => 'layouts/base_research_team', :locals => {:project => @project}%>
|
2015-04-16 09:30:06 +08:00
|
|
|
|
<% else %>
|
2015-04-14 11:47:47 +08:00
|
|
|
|
<%= render :partial => 'layouts/base_friend_group', :locals => {:project => @project}%>
|
|
|
|
|
<% end %>
|
2015-04-16 09:30:06 +08:00
|
|
|
|
</div>
|
2015-04-14 11:47:47 +08:00
|
|
|
|
<!-- end -->
|
2015-04-07 12:48:47 +08:00
|
|
|
|
</div><!--项目侧导航 end-->
|
|
|
|
|
<div class="cl"></div>
|
2015-04-09 19:18:04 +08:00
|
|
|
|
|
2015-04-07 12:48:47 +08:00
|
|
|
|
<!-- 项目描述 -->
|
|
|
|
|
<div class="project_intro">
|
|
|
|
|
<div id="course_description" class="course_description">
|
2015-04-16 10:00:36 +08:00
|
|
|
|
<h4 ><%= l(:label_project_overview)%>:</h4>
|
2015-04-09 08:43:51 +08:00
|
|
|
|
<div id="course_description_content">
|
|
|
|
|
<%= textilizable(@project.description) if @project.description && !@project.description.blank? %>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="lg-foot" id="lg-foot" onclick="show_more_msg();">
|
2015-04-16 04:53:09 +08:00
|
|
|
|
<label id="expend_more_information" value="<%= l(:label_expend_information)%>"><%= l(:label_expend_information)%></label>
|
2015-04-09 08:43:51 +08:00
|
|
|
|
<span class="g-arr-down">
|
2015-04-16 09:54:10 +08:00
|
|
|
|
<img id="arrow" src="/images/jiantou.jpg" width="12" height="6" />
|
2015-04-09 08:43:51 +08:00
|
|
|
|
</span>
|
2015-04-07 12:48:47 +08:00
|
|
|
|
</div>
|
2015-04-09 08:43:51 +08:00
|
|
|
|
</div><!--项目简介 end-->
|
2015-04-09 19:18:04 +08:00
|
|
|
|
|
2015-04-07 12:48:47 +08:00
|
|
|
|
<!-- tag模块 -->
|
|
|
|
|
<div class="project_Label">
|
|
|
|
|
<h4 class="mb5"><%= l(:label_tag)%>:</h4>
|
|
|
|
|
<div class="tag_h">
|
|
|
|
|
<div id="tags">
|
|
|
|
|
<%= render :partial => 'tags/project_tag', :locals => {:obj => @project,:object_flag => "2"}%>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="cl"></div>
|
|
|
|
|
</div><!--项目标签 end-->
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2014-09-15 10:58:14 +08:00
|
|
|
|
|
2015-04-07 12:48:47 +08:00
|
|
|
|
<div id="RSide" class="fl">
|
|
|
|
|
<%= render_flash_messages %>
|
|
|
|
|
<%= yield %>
|
|
|
|
|
<%= call_hook :view_layouts_base_content %>
|
|
|
|
|
<div style="clear:both;"></div>
|
|
|
|
|
</div>
|
|
|
|
|
<div style="clear:both;"></div>
|
|
|
|
|
<div class="cl"></div>
|
|
|
|
|
<%= render :partial => 'layouts/new_footer'%>
|
|
|
|
|
<div class="cl"></div>
|
|
|
|
|
</div><!--Container end-->
|
2015-04-09 19:18:04 +08:00
|
|
|
|
<div id="light" class="white_content02">
|
|
|
|
|
<!-- 这里写需弹出框的HTML代码 -->
|
2015-04-14 10:17:42 +08:00
|
|
|
|
<% text = @project.project_new_type == 1 ? "development_group" : (@project.project_new_type == 2 ? "research_group" : "friend_organization")%>
|
2015-04-14 11:47:47 +08:00
|
|
|
|
<div ><a href="javascript:void(0)" onClick="close_window('<%= text%>');" class="box_close" id="close_light"></a></div>
|
2015-04-09 19:18:04 +08:00
|
|
|
|
<div class=" mt10">
|
|
|
|
|
<h3 class="mb10 c_blue">请选择项目类型:</h3>
|
|
|
|
|
<ul class="mb10" id="project_type">
|
2015-04-14 11:47:47 +08:00
|
|
|
|
<li><input type="radio" name="project_type" <%= @project.project_new_type == 1 ? 'checked' : ''%> id="development_group"/><label > 开发组</label></li>
|
|
|
|
|
<li><input type="radio" name="project_type" <%= @project.project_new_type == 2 ? 'checked' : ''%> id="research_group"/><label > 科研组</label></li>
|
|
|
|
|
<li><input type="radio" name="project_type" <%= @project.project_new_type == 3 ? 'checked' : ''%> id="friend_organization"/><label > 朋友圈</label></li>
|
2015-04-09 19:18:04 +08:00
|
|
|
|
</ul>
|
2015-04-14 10:17:42 +08:00
|
|
|
|
<a href="javascript:void(0)" class="orange_btn" onclick="click_ok('<%= change_project_type_project_path @project%>');" >确定</a>
|
2015-04-09 19:18:04 +08:00
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div id="fade" class="black_overlay">123</div>
|
2015-04-07 12:48:47 +08:00
|
|
|
|
<div id="ajax-indicator" style="display:none;">
|
|
|
|
|
<span><%= l(:label_loading) %></span>
|
|
|
|
|
</div>
|
|
|
|
|
<div id="ajax-modal" style="display:none;"></div>
|
|
|
|
|
<%= call_hook :view_layouts_base_body_bottom %>
|
2014-09-15 10:58:14 +08:00
|
|
|
|
</body>
|
|
|
|
|
</html>
|
|
|
|
|
|