1、讨论区新子界面

2、项目右侧优化
This commit is contained in:
huang 2015-03-17 17:02:32 +08:00
parent 3b0a229c43
commit 4111e2a940
3 changed files with 150 additions and 80 deletions

View File

@ -24,10 +24,6 @@
</div>
<!--display the board-->
<div class="project_r_h">
<h2 class="project_h2"><%= h @board.name %></h2>
</div>
<% if !User.current.logged? %>
<div style="font-size: 14px;margin:20px;">
<% if @project.project_type == 1 %>
@ -39,62 +35,52 @@
<hr/>
</div>
<% end %>
<div class="borad-setitle">
<span class="borad-topic-count">
共有
<%= link_to @topic_count,:controller => 'boards',:action => 'index' %>
个贴子
</span>
<% if @project.enabled_modules.where("name = 'boards'").count > 0 && User.current.member_of?(@project) %>
<span>
<%= link_to l(:label_message_new),
new_board_message_path(@board),
:class => 'icon icon-add',
:onclick => 'showAndScrollTo("add-message", "message_subject"); return false;' if User.current.logged? %>
</span>
<% end %>
</div>
<div style="width: 100%;word-break: break-all;word-wrap: break-word;">
<% if @topics.any? %>
<% @topics.each do |topic| %>
<table class="content-text-list">
<tr>
<td colspan="2" valign="top" width="50">
<%= link_to image_tag(url_to_avatar(topic.author), :class => "avatar"), user_path(topic.author) %>
</td>
<td>
<table width="640px" border="0">
<tr>
<td valign="top" width="500px" class=" <%= topic.sticky? ? 'sticky' : '' %>
<%= topic.locked? ? 'locked' : '' %>">
<%= link_to h(topic.subject.truncate(40,ommision:'...')), board_message_path(@board, topic),title:topic.subject.to_s %>
</td>
<td align="right" rowspan="3">
<table class="borad-count">
<tr>
<td align="center" class="borad-count-digit"><%= link_to (topic.replies_count), board_message_path(@board, topic) %></td>
</tr>
<tr>
<td align="center">回答</td>
</tr>
</table>
</td>
</tr>
<tr>
<td align="left" colspan="2">
<span class="font_lighter"><%= authoring topic.created_on, topic.author %><br/></span></td>
</tr>
</table>
</td>
</tr>
</table>
<% end %>
<div class="pagination">
<%= pagination_links_full @topic_pages, @topic_count %>
</div>
<!-- 内容显示部分 -->
<div class="project_right">
<div class="project_r_h">
<h2 class="project_h2"><%= h @board.name %></h2>
</div>
<div class="talk_top">
<div class="fl">项目讨论区共有<span><%= @topic_count %></span>个帖子 </div>
<% if @project.enabled_modules.where("name = 'boards'").count > 0 && User.current.member_of?(@project) %>
<span id = 'tttttttt'><%= link_to l(:label_message_new), new_board_message_path(@board),
:class => 'problem_new_btn fl',
:onclick => 'showAndScrollTo("add-message", "message_subject"); return false;' if User.current.logged? %></span>
<% end %>
<div class="cl"></div>
</div>
<!-- 帖子内容显示 -->
<% if @topics.any? %>
<% @topics.each do |topic| %>
<div class="problem_main">
<a>
<%= link_to image_tag(url_to_avatar(topic.author), :class => "problem_pic talk_pic fl"), user_path(topic.author) %>
</a>
<div class="talk_txt fl">
<div>
<span><%= link_to h(topic.subject), board_message_path(@board, topic), title:topic.subject.to_s, :class =>"problem_tit fl" %></span>
<% if topic.sticky? %>
<span class="talk_up">置顶</span>
<% end %>
</div>
<div class="problem_line">
<span>由<%= link_to topic.author, user_path(topic.author), :class =>"problem_name" %></span>
<span>添加于<%= format_time topic.created_on %></span>
</div>
</div>
<span class="talk_btn fr">回复<%= link_to (topic.replies_count), board_message_path(@board, topic), :style =>"color:#fff;" %></span>
<div class="cl"></div>
</div><!--讨论主类容 end-->
<% end %>
<ul class="wlist">
<%= pagination_links_full @topic_pages, @topic_count, :per_page_links => false, :remote => false, :flag => true %>
</ul>
<% else %>
<p class="nodata"><%= l(:label_no_data) %></p>
<% end %>
<!--讨论主类容 end-->
<div class="cl"></div>
</div>
<% other_formats_links do |f| %>

View File

@ -126,7 +126,8 @@
<%= link_to "#{@project.watcher_users.count}", {:controller=>"projects", :action=>"watcherlist", :id => @project.id}, :style => "color:#3CA5C6;font-weight:bold" %></span>
<span>| </span>
<%= l(:project_module_attachments) %><span class="info_foot_num" >
<%= link_to "#{@project.attachments.count}", project_files_path(@project), :style => "color:#3CA5C6;font-weight:bold" %></a></div>
<%= link_to "#{@project.attachments.count}", project_files_path(@project), :style => "color:#3CA5C6;font-weight:bold" %></span>
</div>
<div class="cl"></div>
</div><!--项目信息 end-->

View File

@ -75,9 +75,9 @@ a:hover.subnav_green{ background:#14ad5a;}
.lg-foot{ border:1px solid #e8eef2; color: #929598; text-align:center; width:220px; height:23px; cursor:pointer;}
.lg-foot:hover{ color:#787b7e;}
/*右侧内容--动态*/
.project_r_h{ height:40px; background:#eaeaea; margin-bottom: 5px;}
.project_h2{ background:#64bdd9; color:#fff; height:30px; width:90px; text-align:center; font-weight:normal; padding-top:3px; font-size:16px; padding-top:9px;}
/*右侧内容--动态*/
.project_r_h{ width:670px; height:40px; background:#eaeaea; margin-bottom:10px;}
.project_h2{ background:#64bdd9; color:#fff; height:33px; width:90px; text-align:center; font-weight:normal; padding-top:7px; font-size:16px;}
.project_r_box{ border:1px solid #e2e1e1; width:670px; margin-top:10px;}
.project_h3 { color:#646464; font-size:14px; padding:0 10px; border-bottom:1px solid #e2e1e1;}
a.more{ float:right; font-size:12px; font-weight:normal; color:#a9a9a9; margin-top:3px;}
@ -100,42 +100,124 @@ a:hover.more{ color:#64bdd9;}
.box_close{ display:block; float:right; width:16px; height:16px; background:url(../images/img_floatbox.png) 0 0 no-repeat;}
.box_close:hover{background:url(../images/img_floatbox.png) -22px 0 no-repeat;}
/*邮件邀请*/
.box_main{ width:345px; margin:0 auto;padding-left:28px;}
.box_h3{ color:#15bccf; text-align:center; font-size:16px;margin-right:40px;}
.box_main{ width:345px; margin:0 auto;}
.box_main02{ width:390px; margin:15px auto;}
.box_h3{ color:#15bccf; text-align:center; font-size:16px;}
.box_p{ color:#404040; margin-bottom:5px;}
.fb_item{ color:#919191; border:1px solid #919191; height:28px; margin-bottom:10px; padding-left:5px; width:290px;}
.icon_addm{ background:url(../images/img_floatbox.png) 0 -33px no-repeat; width:16px; height:16px; display:block; margin:5px 0 0 5px;}
.icon_addm:hover{background:url(../images/img_floatbox.png) 0 -61px no-repeat; }
.icon_removem{ background:url(../images/img_floatbox.png) -22px -33px no-repeat;width:16px; height:16px; display:block; margin:5px 0 0 5px}
.icon_removem:hover{background:url(../images/img_floatbox.png) -22px -61px no-repeat;}
.btn_free{ background:#ff5722; display:block; width:80px; text-align:center; color:#fff !important; height:26px; padding-top:8px; margin-bottom:10px;}
.btn_free{ background:#ff5722; display:block; width:80px; text-align:center; color:#fff; height:26px; padding-top:3px; margin-bottom:10px;}
.btn_free:hover{ background:#d63502;}
/*成员邀请*/
.invi_search{ width:345px; margin:0 auto;}
.invi_search{ margin-left:50px;}
.invi_search_input{ border:1px solid #15bccf; width:180px; height:24px; color:#9b9b9b; padding-left:5px; margin-bottom:10px;}
.invi_search_btn{ background:#15bccf; color:#fff; text-align: center; width:40px; height:22px;border:1px solid #15bccf; padding-top:2px; cursor:pointer;}
.invi_search_btn:hover{ background:#0da1b2; border:1px solid #0da1b2;}
.rolebox{ margin-left: -40px;}
.rolebox{ margin:10px 0;}
/*问题跟踪*/
.problem_top{ margin:10px 0 ;}
.problem_search_input{ border:1px solid #64bdd9; width:180px; height:24px; color:#9b9b9b; padding-left:5px; margin-bottom:10px;}
.problem_search_btn{ background:#64bdd9; color:#fff; text-align: center; width:40px; height:22px;border:1px solid #64bdd9; padding-top:2px; cursor:pointer;}
.problem_search_btn:hover{ background:#3da1c1; border:1px solid #3da1c1;}
.problem_new_btn{ margin-left:10px; border:1px solid #ff7143; color:#ff7143; width:60px; height:22px; text-align:center; padding-top:2px;}
.problem_new_btn:hover{ background:#ff7143; color:#fff;}
.problem_p{ color:#535252; margin-right: 8px;}
.problem_new_btn{ margin-left:10px; border:1px solid #ff7143; color:#ff7143 !important; width:60px; height:19px; font-size:12px; text-align:center; padding-top:4px;margin-top:-2px;}
.problem_new_btn:hover{ background:#ff7143; color:#fff !important;}
.problem_p{ color:#535252; margin-top:5px;}
.problem_p span{ color:#ff3e00;}
.problem_pic{ display:block; width:42px; height:42px; padding:3px; border:1px solid #e3e3e3;}
.problem_pic{ display:block; width:42px; height:42px; padding:3px; border:1px solid #e3e3e3; margin-top:5px;}
.problem_pic:hover{border:1px solid #64bdd9;}
.problem_txt{ width:610px; margin-left:10px; color:#777777;}
.problem_name{ color:#ff5722 !important;}
.problem_line{margin-top:5px;}
.problem_name:hover{ color:#d33503;}
.problem_tit{ color:#0781b4 !important; width:430px; display:block; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;}
.problem_tit:hover{ color:#09658c !important; }
.problem_main{ border-bottom:1px dashed #d4d4d4; padding-bottom:10px; margin-bottom:10px;}
/****翻页***/
.wlist{}
.wlist a{ float:right; border:1px solid #64bdd9; padding:0 5px; margin-left:3px; color:#64bdd9;}
.wlist_l a{ float:left; margin-right:3px; margin-left:0px;}
.wlist a:hover{border:1px solid #64bdd9; background-color:#64bdd9; color:#fff; text-decoration:none;}
.wlist_select a { background-color:#48aac9; color:#fff;}
/****讨论区***/
.talk_top{ margin:10px 0; font-size:14px; color:#4c4c4c;}
.talk_top span{ color:#ff7143;}
.talk_txt{ width:460px; margin-left:10px; color:#676868;}
.talk_up{ color:#f63c00;}
.talk_pic{width:32px; height:32px; padding:2px;}
.talk_btn{ background:#64bdd9; width:50px; height:22px; color:#fff; text-align:center; margin-top:9px; padding-top:2px;}
.talk_btn:hover{ background:#2a9dc1;}
/****讨论区内页***/
.mt0{ margin-top:0px;}
.talk_info{ color:#7d7d7d; margin-left:50px; margin-top:10px;}
.talk_edit{ color:#426e9a; margin-right:5px;}
.talk_edit:hover{ color:#ff5722;}
.talk_reply { background:#eeeeee; padding:10px; margin-bottom:10px;}
.talkpage_text{ border:1px solid #64bdd9; width:600px; color:#7d7d7d; padding:5px; margin:10px 0 10px 50px;}
/****新建讨论***/
.talk_new{ padding-left:15px; color:#4c4c4c;}
.c_red{ color:#F00;}
.talk_input{ border:1px solid #64bdd9; height:22px; width:595px; margin-bottom:10px;}
.talk_text{ border:1px solid #64bdd9; height:100px;width:595px; margin-bottom:10px;}
.talk_new ul li{ }
.view_span{font-weight:normal; color:#999;}
.sb{width:70px; height:26px; color:#606060;}
.ml60{ margin-left:60px;}
.blue_btn{ background:#64bdd9; display:block; font-size:14px;color:#fff; height:28px; width:50px; text-align:center; margin-left:10px; margin-top:10px;}
.blue_btn:hover{ background:#329cbd;}
.grey_btn{ background:#d9d9d9; color:#656565;}
.grey_btn:hover{ background:#717171; color:#fff;}
/****资源库***/
.f_l{ float:left;}
.f_r{ float:right;}
.resource a{ text-align:center;}
.b_lblue{ background:#64bdd9;}
.b_dblue{ background:#55a1b9; cursor:pointer;}
.f_b{ font-weight: bold;}
.c_blue{ color:#64bdd9;}
a.c_dblue{ color: #3ca5c6;}
a:hover.c_dblue{ color: #0781b4;}
.c_grey{ color:#999999;}
.c_grey02{ color:#666666;}
.f_14{ font-size:14px;}
.c_dblue{ color:#3e6d8e;}
.w90{width:90px;}
.ml10{margin-left:10px;}
.resource{ width:670px;}
.re_top{width:660px; height:40px; background:#eaeaea; padding:5px;}
.re_top input{ float:left;}
.re_search{ margin-top:7px; margin-left:5px;}
.re_schbox{ width:240px; height:24px; border:1px solid #64bdd9; color:#666666;}
.re_schbtn{ width:60px; height:26px; color:#fff; margin-right:5px; border:none; margin-left:0px; }
a.re_fabu { display:block; width:90px; height:35px; font-size:14px; color:#fff; text-align:center; padding-top:5px; }
a:hover.re_fabu{background:#55a1b9;}
.re_con{ margin:5px; width:665px;}
.re_con_top{color:#494949; }
.re_con_top span{ color:#999999; font-weight:bold;}
a.re_select{ display:block; width:88px; height:22px; border:1px solid #ff9900; color:#ff9900; margin-left:10px;}
a:hover.re_select{ background:#ff9900; color:#fff; text-decoration:none;}
.re_open{display:block; width:46px; height:22px; border:1px solid #64bdd9; color:#64bdd9; margin-left:10px;}
a:hover.re_open{ background:#64bdd9; color:#fff; text-decoration:none;}
a.re_de{ color:#6883b6; margin-left:15px;}
.re_con_box{ border-bottom:1px dashed #dadada; padding-bottom:10px; margin-bottom:10px;}
.upload_con { }
.upload_con h2{ display:block; background:#eaeaea; font-size:14px; color:#343333; height:31px; width: auto; margin-top:25px; padding-left:20px; padding-top:5px;}
.upload_box{ width:430px; height:80px;}
a.upload_btn02{ display:block; float:left; margin-top:15px; width:80px; height:30px; text-align: center; color:#fff; font-size:14px; background:#15bccf; margin-right:15px;}
a:hover.upload_btn02{ background:#55a1b9;}
a.upload_btn_grey{background:#a3a3a3;}
a:hover.upload_btn_grey{background:#8a8a8a;}
.upload_btn{width:80px; height:26px;}
.upload_check{ margin-top:4px;}
/****其他未更新页面***/
.setting{ background:url(../images/setting.jpg) 0 0 no-repeat; width:670px; height:443px;}
.newproblem{}
/****标签(和资源库的tag样式一致)***/
.project_Label{ width:220px; padding:10px; background:#fff; margin-top:0px; padding-top:5px;}
a.yellowBtn{ display:inline-block;color:#0d90c3; height:22px;}
.submit{height:21px;border:0; cursor:pointer; background:url(../images/btn.png) no-repeat 0 0;width:42px; margin-top:2px; margin-left:3px; }
.isTxt{background:#fbfbfb url(../images/inputBg.png) repeat-x left top;height:22px;line-height:22px;border:1px solid #c1c1c1;padding:0 5px;color:#666666;}
.re_tag{ width: auto; padding:0 5px; height:22px; border:1px solid #f8df8c; background:#fffce6; margin-right:10px; }
.re_tag a{ color:#0d90c3;}
.tag_h span,.tag_h a{ margin-bottom:0px;}
/*企业版样式*/
.content_syqy{ width:940px; height:400px; border:1px;}
.content_syqy .list{ font-size:14px; font-weight:normal; margin-left:10px; font-weight:bold; padding-top:10px}
@ -1414,8 +1496,8 @@ input#openid_url { background: url(../images/openid-bg.gif) no-repeat; backgroun
.clear:after{ content: "."; display: block; height: 0; clear: both; visibility: hidden; }
/***** Links *****/
a, a:link, a:visited{ color: #169 ; text-decoration: none; }
a:hover, a:active{ color: #c61a1a; text-decoration: underline;}
a, a:link, a:visited{ color: #0781B4 ; text-decoration: none; }
a:hover, a:active{ color: #09658c;}
a img{ border: 0; }
a.issue.closed, a.issue.closed:link, a.issue.closed:visited { color: #999; text-decoration: line-through; }
@ -3086,3 +3168,4 @@ input[class~='m3p10'], .m3p10 {
}
*/