修改了任务分工上几条

This commit is contained in:
huangjingquan 2013-08-06 10:16:51 +08:00
parent db85ff2946
commit d4494b3803
15 changed files with 104 additions and 113 deletions

View File

@ -50,7 +50,7 @@ class ProjectsController < ApplicationController
helper :members
helper :activities
helper :documents
helper :watchers
helper :watchers
# Lists visible projects

View File

@ -30,9 +30,11 @@ module WatchersHelper
objects = Array.wrap(objects)
watched = objects.any? {|object| object.watched_by?(user)}
css = [watcher_css(objects), watched ? 'icon icon-fav' : 'icon icon-fav-off'].join(' ')
@watch_flag = (objects.first.instance_of?(User) or objects.first.instance_of?(Project) or (objects.first.instance_of?(Bid)))
css = @watch_flag ? ([watcher_css(objects), watched ? 'icon' : 'icon'].join(' ')) :
([watcher_css(objects), watched ? 'icon icon-fav' : 'icon icon-fav-off'].join(' '))
text = (objects.first.instance_of?(User) or objects.first.instance_of?(Project) or (objects.first.instance_of?(Bid))) ?
text = @watch_flag ?
(watched ? l(:button_unfollow) : l(:button_follow)) : (watched ? l(:button_unwatch) : l(:button_watch))
url = watch_path(
@ -40,7 +42,7 @@ module WatchersHelper
:object_id => (objects.size == 1 ? objects.first.id : objects.map(&:id).sort)
)
method = watched ? 'delete' : 'post'
link_to text, url, :remote => true, :method => method, :class => css
end

View File

@ -79,7 +79,7 @@ class Project < ActiveRecord::Base
############################added by william
acts_as_taggable
###################added by liuping 关注
###################added by liuping 关注
acts_as_watchable
attr_protected :status

View File

@ -84,13 +84,7 @@
</div>
<% end -%>
</div>
<!--end-->
<div class="pagination">
<ul>
<%= pagination_links_full @activity_pages%>

View File

@ -1,6 +1,6 @@
<div id="tags">
<%= tag('img', {:src => "/images/sidebar/tags.png"}, false, false) %>
<label><%= l(:label_tag) %>:</label>
<strong><label><%= l(:label_tag) %>:</label></strong>
<!-- 1代表是user类型 2代表是project类型 3代表是issue类型 -->
<!-- 3 代表的是issue 当是issue是 处理方式与前2个对象不同 -->
<% if object_flag == '3' %>

View File

@ -19,41 +19,35 @@
<body class="<%= h body_css_classes %>">
<div id="wrapper">
<div id="wrapper2">
<div id="wrapper3">
<div id="wrapper3">
<%=render :partial => 'layouts/base_header'%>
<div id="main" class="">
<div id="main">
<!--project page-->
<div id="sidebar">
<div class="spaceleft">
<!--信息-->
<!--informations-->
<div class="inf_user_image">
<table>
<tr>
<td align="left" valign="middle" width="100"><%= link_to image_tag(avatar_image(@project), :class => 'avatar2'), :class => "avatar" %></td>
<td>
<table>
<tr>
<td class="info_font"><%= textilizable @project.name %></td>
</tr>
<tr>
<td>
</td>
</tr>
</table></td>
</tr>
<td><%= link_to image_tag(avatar_image(@project), :class => 'avatar') %></td>
<td align="center">
<div class="info_font"><%= textilizable @project.name %></div>
<div>
</div>
</td>
</tr>
</table>
<!--标签-->
<div class="tags">
<!--tags-->
<div class="tags">
<!-- added by william -for tag -->
<div id="tags">
<%= render :partial => 'layouts/tag', :locals => {:obj => @project,:object_flag => "2"}%>
</div>
</div>
</div>
<!--指数-->
</div>
<!--parameter-->
<div class="user_fans">
<div class="user_underline"></div>
<table width="240" border="0">
@ -61,8 +55,7 @@
<td class="font_index"><%= @project.members.count %></td>
<td class="font_index"><%= @project.issues.count %></td>
<td class="font_index"><%= @project.attachments.count %></td>
<td class="font_index"><%= @project.attachments.count %></td>
<tr>
<td align="center" width="80px"><strong><%= link_to('成员 ', project_member_path(@project), :class => 'project_infor_tag') %></strong></td>
<td align="center" width="80px"><strong><%= link_to('缺陷 ', project_issues_path(@project), :class => 'project_infor_tag') %></strong></td>
@ -71,24 +64,28 @@
</table>
<div class="user_underline"></div>
</div>
<!--描述-->
<!--description-->
<div class="inf_user_context">
<div class="font_title_left">
<span ><img src="/images/sidebar/tag_title.png" width="18" height="18"/></span>概述
概述<!-- <%= l(:label_project_overview) %> -->
</div>
<div class="user_underline2"></div>
<div style="padding-bottom: 8px"><div class="font_lighter_sidebar">
<div style="padding-bottom: 8px">
<div class="font_lighter_sidebar">
<%= textilizable @project.description %>
</div>
<div style="padding-bottom: 5px">
</div>
<div class="created_on_project">
<strong style="color: #31a0d5">创建时间:</strong><%= @project.created_on %>
</div>
</div><div class="user_underline"></div>
</div>
<!--工具-->
</div>
<div class="user_underline"></div>
</div>
<!--tool-->
<div class="tool">
<div class="font_title_left">
<span ><img src="/images/sidebar/tag_title.png" width="18" height="18"/></span>工具
工具<!-- <%= l(:label_project_tool)%> -->
</div>
<div class="user_underline2"></div>
<table class="font_tool">
@ -102,13 +99,12 @@
</tr>
<tr>
<td align="left" width="190px" valign="left"><img src="/images/sidebar/tool_tag.png" width="15" height="15"/><%= link_to l(:project_module_boards) ,project_boards_path(@project) %></td>
</tr>
</tr>
</table>
</div>
<div class="user_underline"></div>
</div>
</div>
<div id="content">
<div class="tabs_new">
<%= render_main_menu(@project) %>
@ -125,9 +121,7 @@
<div id="ajax-indicator" style="display:none;">
<span><%= l(:label_loading) %></span>
</div>
<div id="ajax-modal" style="display:none;"></div>
<div id="ajax-modal" style="display:none;"></div>
</div>
</div>
<%= call_hook :view_layouts_base_body_bottom %>

View File

@ -20,25 +20,26 @@
<div id="wrapper2">
<div id="wrapper3">
<%=render :partial => 'layouts/base_header'%>
<div id="main" class="">
<div id="main">
<!--user page, add by huang-->
<div id="sidebar">
<div class="main_context">
<div class="spaceleft">
<div class="inf_user_image">
<div class="inf_user_image">
<table>
<tr>
<td align="left" valign="middle" ><%= link_to image_tag(url_to_avatar(@user), :class => 'avatar'), :class => "avatar" %></td>
<td>
<table>
<tr>
<td class="info_font"><%= h @user.name%> <img src="/images/sidebar/male.png" width="11" height="11"/> </td>
<td class="info_font" align="center"><%= h @user.name%> <img src="/images/sidebar/male.png" width="11" height="11"/> </td>
</tr>
<tr>
<td align="center"><% unless User.current == @user %>
<%= watcher_link(@user, User.current) %>
<% else %><%= link_to(l(:label_user_edit), edit_user_path(@user)) if User.current.admin? %><% end %></td>
<td align="center">
<% unless User.current == @user %>
<%= watcher_link(@user, User.current) %>
<% else %>
<%= link_to(l(:label_user_edit), edit_user_path(@user)) if User.current.admin? %><% end %></td>
</tr>
</table></td>
</tr>
@ -48,7 +49,7 @@
</div>
</div>
<div class="user_underline"></div>
<!--个人信息-->
<!--info-->
<div class="inf_user_context">
<table style="font-family:微软雅黑">
<tr>
@ -64,7 +65,8 @@
</div>
<div class="user_underline"></div>
<!--关注-->
<!--watch-->
<div class="user_fans">
<div class="font_title_left">
<strong>关注(<%= link_to User.watched_by(@user.id).count, home_path %>)</strong>
@ -81,7 +83,7 @@
</div>
</div>
<div class="user_underline"></div>
<!--粉丝-->
<!--fans-->
<div class="user_fans">
<div class="font_title_left">
<strong>粉丝(<%= link_to @user.watcher_users.count, home_path %>)</strong>
@ -98,12 +100,9 @@
</div>
</div>
<div class="user_underline"></div>
<!--扩充 y有待增加-->
<!--扩充 y有待增加-->
</div>
</div>
</div>
<div id="content" style="padding-top: 0px;">

View File

@ -34,9 +34,7 @@
<% end %> -->
<!--add by huang-->
<div style="padding-top: 0px">
<div style="padding-top: 15px">
<% if @newss.empty? %>
<p class="nodata"><%= l(:label_no_data) %></p>
<% else %>
@ -49,7 +47,7 @@
<td colspan="2" valign="top"><strong><%=link_to_user(news.author)if news.respond_to?(:author) %></strong> <a class="font_lighter">分享了</a> <%= link_to h(news.title), news_path(news) %></td>
</tr>
<tr>
<td colspan="2" width="580px" ><p class="font_description"><%= textilizable(news, :description) %></p></td>
<td colspan="2" width="580px" ><span class="font_description"><%= textilizable(news, :description) %></span></td>
</tr>
<tr>
<td align="left"><a class="font_lighter"> <%= news.created_on %></a></td>
@ -60,8 +58,6 @@
</table>
<% end %>
<% end %></div>
<!--end-->
<div style="padding-right: 10px">
<p class="pagination"><%= pagination_links_full @news_pages %></p>

View File

@ -1,4 +1,7 @@
<div class="box tabular" style="margin-right:10px;" >
<p><%= render :partial=>"avatar/avatar_form",:locals=> {source:@project} %></p>
<%= labelled_form_for @project do |f| %>
<%= render :partial => 'form', :locals => { :f => f } %>
<%= submit_tag l(:button_save) %>
<% end %>
</div>

View File

@ -1,8 +1,5 @@
<%= error_messages_for 'project' %>
<div class="box tabular" style="margin-right:10px;" >
<!--[form:project]-->
<p><%= render :partial=>"avatar/avatar_form",:locals=> {source:@project}%></p>
<p><%= f.text_field :name, :required => true, :size => 60, :style => "width:490px;" %></p>
<p style="margin-left:-10px;padding-right: 20px;"><%= f.text_area :description, :rows => 8, :class => 'wiki-edit', :style => "font-size:small;width:490px;margin-left:10px;" %></p><!--by young-->
@ -27,7 +24,7 @@
<p><%= custom_field_tag_with_label :project, value %></p>
<% end %>
<%= call_hook(:view_projects_form, :project => @project, :form => f) %>
</div>
<% if @project.new_record? %>
<fieldset class="box tabular"><legend><%= l(:label_module_plural) %></legend>

View File

@ -1,5 +1,3 @@
<h3><%=l(:label_settings)%></h3>
<%= render_tabs project_settings_tabs %>
<% html_title(l(:label_settings)) -%>

View File

@ -1,8 +1,9 @@
<div style="margin-top: 30px">
<div id='leave-message'>
<%= render :partial => 'words/new', :locals => {:user => @user, :sta => @state} %>
</div>
<div id="message">
<%= render :partial => 'words/message', :locals => {:jour => @jour, :state => @state, :user => @user} %>
</div>
<div id='leave-message'>
<%= render :partial => 'words/new', :locals => {:user => @user, :sta => @state} %>
</div></div>
</div>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@ -7,6 +7,8 @@ h2, .wiki h1 {font-size: 20px;}
h3, .wiki h2 {font-size: 16px;}
h4, .wiki h3 {font-size: 13px;}
h4 {border-bottom: 1px dotted #bbb;}
/*new by huang*/
/**/
.new_creat{
@ -65,7 +67,7 @@ ul.tool li{list-style-type:none;
.font_title_left{
font-family:微软雅黑;
font-weight:bold;
padding-left: 8px;
padding-left: 12px;
padding-top:3px;
padding-bottom:3px;
font-size:16px;
@ -102,9 +104,10 @@ ul.tool li{list-style-type:none;
padding-top: 50px;
}
.info_font{
padding-left: 8px;
font-family:微软雅黑;
font-weight:bold;
font-size:18px;
font-size:16px;
color:#4d4d4d;
}
.font_lighter{
@ -118,30 +121,31 @@ ul.tool li{list-style-type:none;
font-family:宋体;
}
.font_lighter_sidebar{
font-family:微软雅黑;
/*font-family:微软雅黑;*/
color:#919294;
font-size:13px;
padding-left: 8px;
padding-left: 12px;
padding-right: 8px;
line-height: 1.5em;
}
.created_on_project{
padding-left: 12px;
padding-bottom: 5px;
}
.font_description{
font-size:14px;
line-height: 22px;
font-size:13px;
line-height: 1.5em;
}
.font_tool{
font-family:微软雅黑;
font-size:16px;
font-size:14px;
color: 1a1a1a;
padding-left: 6px;
}
.spaceleft{float:left; width:240px;}
.spaceleft{float: left; width: 240px;}
.spaceright{float:left; width:620px;}
.inf_user_image img.avatar2{
height80px;
width: 80px;
}
.inf_user_motto{
padding-left:8px;
margin:5px 0px 0px 0px;
@ -157,20 +161,25 @@ ul.tool li{list-style-type:none;
}*/
.inf_user_image{
padding-left:8px;
margin:0px 0px 0px 0px;
margin:0px;
background-color:#fff;
height: auto;
padding-bottom: 8px;
}
.inf_user_image img.avatar2{
height80px;
width: 80px;
}
.user_fans{
padding-left:0px;
margin:0px 0px 0px 0px;
margin:0px;
height: auto;
background-color:#fff;
}
.inf_user_context{
padding-left:0px;
margin:0px 0px 0px 0px;
margin:0px;
padding-top:1px;
background-color:#fff;
height: auto;
@ -458,13 +467,6 @@ ul.newprojects2 li{
color: inherit;
text-d
}
/***** Layout *****/
#wrapper {background: white;}
@ -1024,6 +1026,7 @@ html>body .tabular p {overflow:hidden;}
margin-left: -180px;
/* width of labels. Should be smaller than left column to create some right margin */
width: 175px;
font-size: 12px;
}
.tabular label.floating{
@ -1108,7 +1111,7 @@ textarea.text_cf {width:90%;}
#tab-content-members .splitcontentleft, #tab-content-memberships .splitcontentleft, #tab-content-users .splitcontentleft {width: 64%;}
#tab-content-members .splitcontentright, #tab-content-memberships .splitcontentright, #tab-content-users .splitcontentright {width: 34%;}
#tab-content-members fieldset, #tab-content-memberships fieldset, #tab-content-users fieldset {padding:1em; margin-bottom: 1em;}
#tab-content-members fieldset legend, #tab-content-memberships fieldset legend, #tab-content-users fieldset legend {font-weight: bold;}
#tab-content-members fieldset legend, #tab-content-memberships fieldset legend, #tab-content-users fieldset legend {font-weight: bold; font-size: 12px}
#tab-content-members fieldset label, #tab-content-memberships fieldset label, #tab-content-users fieldset label {display: block;}
#tab-content-members #principals, #tab-content-users #principals {max-height: 400px; overflow: auto;}
@ -1551,7 +1554,6 @@ a.close-icon:hover {background-image:url('../images/close_hl.png');}
padding-top: 2px;
padding-bottom: 3px;
}
.icon-add { background-image: url(../images/add.png); }
.icon-edit { background-image: url(../images/edit.png); }
.icon-copy { background-image: url(../images/copy.png); }

View File

@ -443,6 +443,7 @@ ul.projects li.root
width:240px;/*by young*/
height: auto;
background:#edecec; /*主题框架背景yanse*/
margin-bottom: 30px;
border-right:1px solid #C6E9F1;
overflow:auto;
/*by young*/
@ -576,7 +577,7 @@ div.splitcontentleft h2
#sidebar a:hover
{
background-color:#039;
background-color:#c6e9fe; /*add by huang*/
color:#FFF;
text-decoration:none
}
@ -1298,9 +1299,9 @@ div.nomargin {
div.pagination {
margin: 18px 0px;
margin: 25px 0px;
height: 36px;
text-align: center;
text-align: left;
font-size: 13px;
}
@ -1329,7 +1330,8 @@ div.pagination li:first-child a {
div.pagination a {
float: left;
padding: 0px 14px;
line-height: 34px;
/*line-height: 34px; add by huang*/
line-height: 25px;
text-decoration: none;
border-width: 1px 1px 1px 0px;
border-style: solid;
@ -1343,7 +1345,8 @@ div.pagination a {
div.pagination span {
float: left;
padding: 0px 14px;
line-height: 34px;
/*line-height: 34px; add by huang*/
line-height: 25px;
text-decoration: none;
border-width: 1px 1px 1px 0px;
border-style: solid;
@ -1357,12 +1360,14 @@ div.pagination span {
}
div.pagination span.current-page {
color: rgb(153, 153, 153);
/*color: rgb(153, 153, 153); add by huang*/
color:#e2f4ff;
cursor: default;
}
div.pagination a:hover, div.pagination span.current-page {
background-color: rgb(245, 245, 245);
/*background-color: rgb(245, 245, 245); add by huang*/
background-color:#e2f4ff;
}
/*added by young*/
div.pagination_new {