完成项目base搭建
This commit is contained in:
parent
61f99137fc
commit
751665089c
|
@ -344,7 +344,7 @@ module WatchersHelper
|
|||
def exit_project_link(project)
|
||||
link_to(l(:label_exit_project),exit_cur_project_path(project.id),
|
||||
:remote => true, :confirm => l(:lable_sure_exit_project),
|
||||
:class => "pr_join_a_quit" )
|
||||
:class => "sy_btn_grey mr5" )
|
||||
end
|
||||
|
||||
#项目关注、取消关注
|
||||
|
|
|
@ -20,18 +20,16 @@
|
|||
<a href="javascript:void(0);"class=" ml5 c_dark"><%= @project.name %></a>
|
||||
</h3>
|
||||
<span class="sy_new_orange fl ml10 mt5"><%= @project.is_public? ? l(:label_public) : l(:label_private) %></span>
|
||||
|
||||
</div>
|
||||
<p class="sy_cgrey">
|
||||
<span class=" mr15">项目评分:
|
||||
<% if @project.project_type == 0 %>
|
||||
<% unless static_project_score(@project.project_score) == 0 %>
|
||||
<span class="fb f14 "><%= l(:label_project_score)%> :</span>
|
||||
<%= link_to(format("%.2f" ,static_project_score(@project.project_score)).to_i,
|
||||
{:controller => 'projects',
|
||||
:action => 'show_projects_score',
|
||||
:remote => true,
|
||||
:id => @project.id}, :class => "sy_cblue" ) %>
|
||||
{:controller => 'projects',
|
||||
:action => 'show_projects_score',
|
||||
:remote => true,
|
||||
:id => @project.id}, :class => "sy_cblue" ) %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</span>
|
||||
|
@ -39,10 +37,8 @@
|
|||
<span class=" mr15"><%= l(:label_user_watcher) %>: <%= link_to "#{@project.watcher_users.count}", {:controller=>"projects", :action=>"watcherlist", :id => @project.id}, :class => 'sy_corange' %></span>
|
||||
<span class=" mr15"><%= l(:label_member) %>: <%= link_to "#{@project.members.count}", project_member_path(@project), :class => 'sy_corange', :id => 'project_members_number' %></span>
|
||||
</p>
|
||||
<div class="mt15 clear">
|
||||
<% text = @project.project_new_type == 1 ? l(:label_development_team) : (@project.project_new_type == 2 ? l(:label_research_group) : l(:label_friend_organization))%>
|
||||
<% typeclass = @project.project_new_type == 1 ? "pr_kafa" : (@project.project_new_type == 2 ? "pr_keyan" : "pr_friend")%>
|
||||
<%= render 'layouts/join_exit_project',{:text => text, :typeclass => typeclass} %>
|
||||
<div class="mt15 clear" id="join_exit_project_div">
|
||||
<%= render 'layouts/join_exit_project' %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
|
|
|
@ -48,81 +48,17 @@
|
|||
|
||||
<div id="content">
|
||||
<%= render :partial => 'layouts/base_project_top' %>
|
||||
|
||||
<div id="LSide" class="fl">
|
||||
<div class="project_info">
|
||||
<div class="pr_info_logo fl mr10 mb5">
|
||||
<div class="pr" style="width: 64px; height:64px;">
|
||||
<% if User.current.logged? && (User.current.allowed_to?({:controller => 'projects', :action => 'settings'}, @project) || User.current.admin?)%>
|
||||
<%=link_to image_tag(url_to_avatar(@project),width:"60", height: "60", :id=>'nh_source_tx'), my_clear_user_avatar_temp_path(:project => @project.id), :remote => true%>
|
||||
<div class="homepageEditProfile undis">
|
||||
<%=link_to '', my_clear_user_avatar_temp_path(:project => @project.id), :remote => true, :class => 'homepageEditProfileIcon', :title => '点击编辑Logo' %>
|
||||
</div>
|
||||
<% else %>
|
||||
<%= image_tag(url_to_avatar(@project), :width => "60", :height => "60", :alt => "项目logo") %>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="pr_info_id fl mb5 f14">
|
||||
<%= l(:label_project_ivite_code)%>
|
||||
<%= (User.current.member_of?(@project) || User.current.admin?) ? @project.invite_code : "******" %>
|
||||
</div>
|
||||
<!--关注、申请加入/退出项目-->
|
||||
<div id="join_exit_project_div">
|
||||
<%= render 'layouts/join_exit_project' %>
|
||||
</div>
|
||||
<!-- 项目得分 -->
|
||||
<div class="cl"></div>
|
||||
<div>
|
||||
<%= link_to "#{@project.name}", project_path(@project.id), :class=>"pr_info_name fl c_dark fb break_word" %>
|
||||
<% 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>
|
||||
<%# 更新访问数,刷新的时候更新访问次数 %>
|
||||
<% update_visiti_count @project %>
|
||||
<%# over %>
|
||||
<div>
|
||||
<% if @project.project_type == 0 %>
|
||||
<% unless static_project_score(@project.project_score) == 0 %>
|
||||
<span class="fb f14 "><%= l(:label_project_score)%> :</span>
|
||||
<%= link_to(format("%.2f" ,static_project_score(@project.project_score)).to_i,
|
||||
{:controller => 'projects',
|
||||
:action => 'show_projects_score',
|
||||
:remote => true,
|
||||
:id => @project.id}, :class => "c_orange f14" ) %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<!--参数-->
|
||||
<div class="pr_info_foot">
|
||||
<%= l(:label_member) %>(<%= link_to "#{@project.members.count}", project_member_path(@project), :class => 'info_foot_num c_blue', :id => 'project_members_number' %>)
|
||||
<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' %>)
|
||||
<% unless @project.enabled_modules.where("name = 'files'").empty? %>
|
||||
<span>| </span>
|
||||
<%= l(:project_module_attachments) %>(
|
||||
<% @project.project_score.attach_num %>
|
||||
<%= link_to "#{@project.project_score.attach_num }", project_files_path(@project), :class => 'info_foot_num c_blue', :id=>'project_files_count_info' %></span>)
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</div><!--参数 end-->
|
||||
|
||||
<%# 更新访问数,刷新的时候更新访问次数 %>
|
||||
<% update_visiti_count @project %>
|
||||
<!--邀请加入-->
|
||||
<div class="subNavBox">
|
||||
<div class="subNavBoxProject">
|
||||
<div id="project_memu_list">
|
||||
<%= render :partial => 'projects/development_group', :locals => {:project => @project} %>
|
||||
</div>
|
||||
|
||||
<!-- end -->
|
||||
</div><!--项目侧导航 end-->
|
||||
</div>
|
||||
<!--项目侧导航 end-->
|
||||
<div class="cl"></div>
|
||||
|
||||
<!-- 项目描述 -->
|
||||
<div class="project_intro">
|
||||
<div id="course_description" class="course_description">
|
||||
|
@ -149,7 +85,6 @@
|
|||
</div>
|
||||
<div class="cl"></div>
|
||||
</div><!--项目标签 end-->
|
||||
|
||||
<div class="fontGrey5 mt10 ml10 mb10">访问计数 <%= @project.visits.to_i %> (自2016年5月)</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -375,6 +375,7 @@ ul.subNavArrow:hover li ul {display:block;}
|
|||
|
||||
/*左侧导航*/
|
||||
.subNavBox{width:240px; background:#fff;margin:10px 10px 0 0;}
|
||||
.subNavBoxProject{width:240px; background:#fff;}
|
||||
.subNav{border-bottom:solid 1px #e5e3da;cursor:pointer;font-weight:bold;font-size:14px;color:#3ca5c6; height:26px;padding-left:10px;background-color:#fff; padding-top:2px;}
|
||||
.subNav_jiantou{background:url(/images/jiantou1.jpg) no-repeat;background-position:95% 50%; background-color:#fff;}
|
||||
.subNav_jiantou:hover{color:#0781b4; }
|
||||
|
|
Loading…
Reference in New Issue