Merge branch 'forum' of 10.0.47.245:/home/trustie2 into forum
This commit is contained in:
commit
cb494f460a
|
@ -1,5 +1,5 @@
|
||||||
class MemosController < ApplicationController
|
class MemosController < ApplicationController
|
||||||
layout "base_memos"
|
layout 'base_memos'
|
||||||
def new
|
def new
|
||||||
@memo = Memo.new
|
@memo = Memo.new
|
||||||
|
|
||||||
|
@ -11,6 +11,7 @@ class MemosController < ApplicationController
|
||||||
|
|
||||||
def show
|
def show
|
||||||
@memo = Memo.find_by_id(params[:id])
|
@memo = Memo.find_by_id(params[:id])
|
||||||
|
@forum = Forum.find(params[:forum_id])
|
||||||
@replies = @memo.replies
|
@replies = @memo.replies
|
||||||
@mome_new = Memo.new
|
@mome_new = Memo.new
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8" />
|
<meta charset="utf-8" />
|
||||||
<title><%= h html_title %></title>
|
<title><%= h html_title %></title>
|
||||||
|
@ -7,7 +7,7 @@
|
||||||
<meta name="keywords" content="issue,bug,tracker" />
|
<meta name="keywords" content="issue,bug,tracker" />
|
||||||
<%= csrf_meta_tag %>
|
<%= csrf_meta_tag %>
|
||||||
<%= favicon %>
|
<%= favicon %>
|
||||||
<%= stylesheet_link_tag 'jquery/jquery-ui-1.9.2', 'application', :media => 'all' %>
|
<%= stylesheet_link_tag 'jquery/jquery-ui-1.9.2', 'application', 'nyan', :media => 'all' %>
|
||||||
<%= stylesheet_link_tag 'rtl', :media => 'all' if l(:direction) == 'rtl' %>
|
<%= stylesheet_link_tag 'rtl', :media => 'all' if l(:direction) == 'rtl' %>
|
||||||
<%= javascript_heads %>
|
<%= javascript_heads %>
|
||||||
<%= heads_for_theme %>
|
<%= heads_for_theme %>
|
||||||
|
@ -15,45 +15,155 @@
|
||||||
<!-- page specific tags -->
|
<!-- page specific tags -->
|
||||||
<%= yield :header_tags -%>
|
<%= yield :header_tags -%>
|
||||||
</head>
|
</head>
|
||||||
|
<!--add by huang-->
|
||||||
<body class="<%= h body_css_classes %>">
|
<body class="<%= h body_css_classes %>">
|
||||||
<div id="wrapper">
|
<div id="wrapper">
|
||||||
<div id="wrapper2">
|
<div id="wrapper2">
|
||||||
<div id="wrapper3">
|
<div id="wrapper3">
|
||||||
<%= render :partial => 'layouts/base_header'%>
|
<%=render :partial => 'layouts/base_header'%>
|
||||||
<div style="margin-top: 10px;">
|
<div id="main">
|
||||||
<div id="main">
|
<!-- added by bai -->
|
||||||
<div id="sidebar">
|
|
||||||
<%= yield :sidebar %>
|
<div class="top-content">
|
||||||
<%= view_layouts_base_sidebar_hook_response %>
|
<table>
|
||||||
</div>
|
<tr>
|
||||||
<div id="content" style="padding-top: 0px;">
|
<td class="info_font" style="width: 240px; color: #15bccf">软件项目托管社区</td>
|
||||||
<%= render_flash_messages %>
|
<td style="width: 430px; color: #15bccf"><strong><%= l(:label_user_location) %> : </strong></td>
|
||||||
<%= yield %>
|
<td rowspan="2" width="250px">
|
||||||
<%= call_hook :view_layouts_base_content %>
|
<div class="top-content-search">
|
||||||
<div style="clear:both;"></div>
|
<%= form_tag(:controller => 'projects', :action => "search", :method => :get) do %>
|
||||||
<%= render_flash_messages %>
|
<%= text_field_tag 'name', params[:name], :size => 20 %>
|
||||||
|
<%= hidden_field_tag 'project_type', params[:project_type] %>
|
||||||
|
<%= submit_tag l(:label_search), :class => "enterprise", :name => nil %>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="padding-left: 8px"><a><%= link_to "forge.trustie.net/projects", :controller => 'projects', :action => 'index', :project_type => 0 %></a></td>
|
||||||
|
<td><p class="top-content-list"><%=link_to l(:label_home),home_path %> > <%=link_to '讨论区', :controller => 'forums', :action => 'index' %> > <%=link_to @forum.name, forum_path(@forum) %> > <%=link_to @memo.subject, forum_memo_path(@forum, @memo) %></p></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="sidebar">
|
||||||
|
<div class="spaceleft">
|
||||||
|
|
||||||
|
<!--informations-->
|
||||||
|
<div class="inf_user_image">
|
||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<div class="info-course">
|
||||||
|
<%= @forum.name %>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<% unless User.current.member_of? @forum %>
|
||||||
|
<%= watcher_link(@fourm, User.current) %>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!--parameter -->
|
||||||
|
<div class="user_fans">
|
||||||
|
|
||||||
|
<table width="240" border="0">
|
||||||
|
<tr align="center" width="80px">
|
||||||
|
|
||||||
|
<td class="font_index"><%=link_to 1, forum_path(@forum) %></td>
|
||||||
|
<td class="font_index"><%=link_to 2, forum_path(@forum) %></td>
|
||||||
|
<td class="font_index"><%=link_to 3, forum_path(@forum) %></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr class="font_aram">
|
||||||
|
<td align="center" width="70px"> <%= l(:label_member) %></td>
|
||||||
|
<td align="center" width="100px"><%= l(:label_user_watchered) %></td>
|
||||||
|
<td align="center" width="70px"> <%= l(:label_project_issues) %></td>
|
||||||
|
<!-- <td align="center" width="58px"><%= l(:label_attachment) %></td> -->
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<div class="user_underline"></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!--informations-->
|
||||||
|
<div class="inf_user">
|
||||||
|
|
||||||
|
<div class="font_title_left">
|
||||||
|
创建人信息
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
<td><%= image_tag(url_to_avatar(@forum.creator), :class => 'avatar2') %></td>
|
||||||
|
<td>
|
||||||
|
<div class="info-course">
|
||||||
|
<%= @forum.name %>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<!-- 此处原来是关注 -->
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<div class="user_underline"></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<!--description-->
|
||||||
|
<div class="inf_user_context">
|
||||||
|
<div class="font_title_left">
|
||||||
|
<%= l(:label_project_overview) %>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div style="padding-bottom: 8px">
|
||||||
|
<div class="font_lighter_sidebar">
|
||||||
|
|
||||||
|
<%= textilizable @forum.description %>
|
||||||
|
</div>
|
||||||
|
<div class="created_on_project">
|
||||||
|
<strong style="color: #15bccf"><%= l(:label_create_time) %>:</strong><%= format_time(@forum.created_at) %>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="user_underline"></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!--tags-->
|
||||||
|
<div class="user_fans">
|
||||||
|
<!-- added by william -for tag -->
|
||||||
|
<div class="user_tags">
|
||||||
|
<div id="tags"> <!-- 此处为tag --> 标签 </div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<!--tool-->
|
||||||
|
<div class="user_underline"></div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<%= render :partial => 'layouts/base_footer'%>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div id="ajax-indicator" style="display:none;">
|
|
||||||
<span><%= l(:label_loading) %></span>
|
|
||||||
</div>
|
|
||||||
<div id="ajax-modal" style="display:none;"></div>
|
|
||||||
|
|
||||||
<div id="footer">
|
|
||||||
<div class="bgl">
|
|
||||||
<div class="bgr">
|
|
||||||
Powered by <%= link_to Redmine::Info.app_name, Redmine::Info.url %> © 2006-2013 Jean-Philippe Lang
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div id="content">
|
||||||
|
<%= render_flash_messages %>
|
||||||
|
<%= yield %>
|
||||||
|
<%= call_hook :view_layouts_base_content %>
|
||||||
|
<div style="clear:both;"></div>
|
||||||
|
</div>
|
||||||
|
<%= render :partial => 'layouts/base_footer'%>
|
||||||
|
<%= debug(params) if Rails.env.development? %>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div id="ajax-indicator" style="display:none;">
|
||||||
|
<span><%= l(:label_loading) %></span>
|
||||||
|
</div>
|
||||||
|
<div id="ajax-modal" style="display:none;"></div>
|
||||||
</div>
|
</div>
|
||||||
<%= debug(params) if Rails.env.development? %>
|
|
||||||
</div>
|
</div>
|
||||||
|
<%= call_hook :view_layouts_base_body_bottom %>
|
||||||
</div>
|
</div>
|
||||||
<%= call_hook :view_layouts_base_body_bottom %>
|
|
||||||
</body>
|
</body>
|
||||||
|
</html>
|
||||||
|
|
||||||
</html>
|
|
|
@ -1,90 +1,121 @@
|
||||||
<!-- <p id="notice">
|
<style type="text/css">
|
||||||
< %= notice %>
|
/** {
|
||||||
</p> -->
|
-webkit-box-sizing: border-box;
|
||||||
<ul class="lz" style="background:grey" >
|
-moz-box-sizing: border-box;
|
||||||
<!-- <li class="title">title ==> <%= link_to @memo.subject, forum_memo_path(@memo) %></li>
|
-box-sizing: border-box;
|
||||||
<li class="content">content ==> <%= @memo.content %></li>
|
}*/
|
||||||
<li class="author">author ==> <%= @memo.author %></li>
|
.lz {
|
||||||
<li class="timestamp">
|
position:relative;
|
||||||
Posted <%= time_ago_in_words(@memo.created_at) if @memo.created_at %> ago.
|
min-height: 200px;
|
||||||
</li> -->
|
margin: 10px 2px;
|
||||||
|
border-radius: 5px;
|
||||||
<div class="aborad-title">
|
box-shadow: 1px 1px 6px #97EBF4;
|
||||||
<!-- < %= avatar(@memo.author, :size => "24") %> -->
|
}
|
||||||
<%= link_to image_tag(url_to_avatar(@memo.author), :class => "avatar", :style => "width: 24px; height: 24px"), user_path(@memo.author) %></td>
|
.lz-left{
|
||||||
<%=h @memo.subject %></div>
|
float: left;
|
||||||
<div class="borad-topic-count-memo">
|
margin: 2%;
|
||||||
<%= textilizable(@memo, :content) %>
|
padding: 0;
|
||||||
<%= authoring @memo.created_at, @memo.author %>
|
}
|
||||||
|
.memo-section{
|
||||||
|
width: auto;
|
||||||
|
margin-left: 15%;
|
||||||
|
padding-top: 1%;
|
||||||
|
border-left: 2px dotted #EEE;/*#8BE9F3;*/
|
||||||
|
}
|
||||||
|
.memo-title{
|
||||||
|
margin: 1em 0;
|
||||||
|
padding-left: 1%;
|
||||||
|
border-bottom: 1px dashed
|
||||||
|
}
|
||||||
|
.memo-content{
|
||||||
|
padding: 1%;
|
||||||
|
margin: 1%;
|
||||||
|
margin-bottom: 40px;
|
||||||
|
background-color: #F6F6F6;
|
||||||
|
}
|
||||||
|
.memo-timestamp{
|
||||||
|
position: absolute;
|
||||||
|
bottom: 0px;
|
||||||
|
right: 0;
|
||||||
|
margin: 20px;
|
||||||
|
}
|
||||||
|
.replies{
|
||||||
|
float: right;
|
||||||
|
/*max-width: 90%;*/
|
||||||
|
}
|
||||||
|
.reply-box{
|
||||||
|
float: right;
|
||||||
|
width: 640px;
|
||||||
|
padding: 3%;
|
||||||
|
/*border: 2px solid #C6F3F9;*/
|
||||||
|
border-top: 2px double #C6F3F9;
|
||||||
|
/*border-radius: 10px;*/
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<div class="lz">
|
||||||
|
<div class="lz-left">
|
||||||
|
<div class=""><%= link_to image_tag(url_to_avatar(@memo.author), :class => "avatar"), user_path(@memo.author) %></div>
|
||||||
|
<p class=""><%=h @memo.author %></p>
|
||||||
|
</div>
|
||||||
|
<div class="memo-section">
|
||||||
|
<div class="memo-title"><%= label_tag l(:field_subject) %>: <%=h @memo.subject %></div>
|
||||||
|
<div class="memo-content"><%= textilizable(@memo, :content) %></div>
|
||||||
|
<div class="memo-timestamp"> <%= authoring @memo.created_at, @memo.author %></div>
|
||||||
</div>
|
</div>
|
||||||
<br />
|
<br />
|
||||||
|
</div>
|
||||||
</ul>
|
|
||||||
|
|
||||||
<h3 class="comments"><%= l(:label_reply_plural) %> (<%= @replies.nil? ? 0 : @replies.size %>)</h3>
|
|
||||||
|
|
||||||
<div class="replies">
|
<div class="replies">
|
||||||
|
<h3 class="comments"><%= l(:label_reply_plural) %> (<%= @replies.nil? ? 0 : @replies.size %>)</h3>
|
||||||
|
<% reply_count = 0%>
|
||||||
<% @replies.each do |reply| %>
|
<% @replies.each do |reply| %>
|
||||||
|
<p class="font_lighter"><%= reply_count += 1 %>L :</p>
|
||||||
<div class="reply" id="<%= "reply-#{reply.id}" %>">
|
<div class="reply" id="<%= "reply-#{reply.id}" %>">
|
||||||
<div class="contextual-borad">
|
<div class="contextual-borad">
|
||||||
<%= link_to(
|
<%= link_to(
|
||||||
image_tag('comment.png'),
|
image_tag('comment.png'),
|
||||||
{:action => 'quote', :id => reply},
|
{:action => 'quote', :id => reply},
|
||||||
:remote => true,
|
:remote => true,
|
||||||
:method => 'get',
|
:method => 'get',
|
||||||
:title => l(:button_quote)) if !@memo.locked? && authorize_for('messages', 'reply') %>
|
:title => l(:button_quote)) if !@memo.locked? && authorize_for('messages', 'reply') %>
|
||||||
<%= link_to(
|
<%= link_to(
|
||||||
image_tag('edit.png'),
|
image_tag('edit.png'),
|
||||||
{:action => 'edit', :id => reply},
|
{:action => 'edit', :id => reply},
|
||||||
:title => l(:button_edit)
|
:title => l(:button_edit)
|
||||||
) if reply.destroyable_by?(User.current) %>
|
) if reply.destroyable_by?(User.current) %>
|
||||||
<%= link_to(
|
<%= link_to(
|
||||||
image_tag('delete.png'),
|
image_tag('delete.png'),
|
||||||
{:action => 'destroy', :id => reply},
|
{:action => 'destroy', :id => reply},
|
||||||
:method => :post,
|
:method => :post,
|
||||||
:data => {:confirm => l(:text_are_you_sure)},
|
:data => {:confirm => l(:text_are_you_sure)},
|
||||||
:title => l(:button_delete)
|
:title => l(:button_delete)
|
||||||
) if reply.destroyable_by?(User.current) %>
|
) if reply.destroyable_by?(User.current) %>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<table class="borad-text-list">
|
|
||||||
<tr>
|
|
||||||
<td rowspan="3" valign="top" width="60px">
|
|
||||||
<%= link_to image_tag(url_to_avatar(reply.author), :class => "avatar"), user_path(reply.author) %></td>
|
|
||||||
<td class="comments">
|
|
||||||
<div class="wiki"><%= textilizable reply, :content %></div>
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<!-- <tr>
|
|
||||||
<td>
|
|
||||||
< %= link_to h(reply.subject), { :controller => 'memos', :action => 'show', :board_id => @board, :id => @topic, :r => reply, :anchor => "reply-#{reply.id}" } %>
|
|
||||||
</td>
|
|
||||||
</tr> -->
|
|
||||||
<tr>
|
|
||||||
<td class="font_lighter" style="float:right"><%= authoring reply.created_at, reply.author %></td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
<!-- <ul>
|
<table class="borad-text-list">
|
||||||
<li><div class="memo_content">content ===> <%= reply.content %></div></li>
|
<tr>
|
||||||
<li>author ===> <%= link_to reply.author, user_path(reply.author) %></li>
|
<td rowspan="3" valign="top" width="60px">
|
||||||
<li class="timestamp">
|
<%= link_to image_tag(url_to_avatar(reply.author), :class => "avatar"), user_path(reply.author) %>
|
||||||
Posted <%= time_ago_in_words(reply.created_at) if reply.created_at %> ago.
|
</td>
|
||||||
</li>
|
<td class="comments">
|
||||||
</ul> -->
|
<div class="wiki"><%= textilizable reply, :content %></div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="font_lighter" style="float:right"><%= authoring reply.created_at, reply.author %></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="" style="background:grey">
|
<div class="reply-box" style="">
|
||||||
<%= labelled_form_for(@mome_new, url: forum_memos_path) do |f| %>
|
<%= form_for(@mome_new, url: forum_memos_path) do |f| %>
|
||||||
reply
|
<%= f.hidden_field :subject, :required => true, value: @memo.subject %>
|
||||||
<ul>
|
<%= f.hidden_field :forum_id, :required => true, value: @memo.forum_id %>
|
||||||
<%= f.hidden_field :subject, :required => true, value: @memo.subject %>
|
<%= f.hidden_field :parent_id, :required => true, value: @memo.id %>
|
||||||
<%= f.hidden_field :forum_id, :required => true, value: @memo.forum_id %>
|
<%= label_tag(l(:label_reply_plural)) %>:
|
||||||
<%= f.hidden_field :parent_id, :required => true, value: @memo.id %>
|
<p> <%= f.text_area :content, :required => true, :size => "75%", :resize => "none" %> </p>
|
||||||
<li> <%= f.text_field :content, :required => true, :size => 80 %> </li>
|
<%= f.submit value: l(:label_reply_plural), class: "replies" %>
|
||||||
</ul>
|
|
||||||
<%= f.submit %>
|
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1565,6 +1565,7 @@ en:
|
||||||
field_hidden_repo: code protected
|
field_hidden_repo: code protected
|
||||||
label_newbie_faq: newbie FAQ
|
label_newbie_faq: newbie FAQ
|
||||||
label_hot_project: 'HOT Projects'
|
label_hot_project: 'HOT Projects'
|
||||||
|
label_memo_create_succ: Memo was successfully created.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1726,3 +1726,4 @@ zh:
|
||||||
|
|
||||||
label_newbie_faq: '新手指引 & 问答'
|
label_newbie_faq: '新手指引 & 问答'
|
||||||
label_hot_project: '热门项目'
|
label_hot_project: '热门项目'
|
||||||
|
label_memo_create_succ: 回复成功
|
||||||
|
|
Loading…
Reference in New Issue