2014-04-03 14:41:04 +08:00
|
|
|
<!-- added by fq -->
|
|
|
|
<div id="add-memo" class='lz' style="display: none; padding: 20px;">
|
|
|
|
<h3><%=l(:label_memo_new)%></h3>
|
|
|
|
<% if User.current.logged? %>
|
2014-04-28 09:13:57 +08:00
|
|
|
<%= labelled_form_for(@memo, :url => open_source_project_relative_memos_path(@open_source_project), :html => {:multipart => true} ) do |f| %>
|
2014-04-03 14:41:04 +08:00
|
|
|
<% if @memo.errors.any? %>
|
|
|
|
<div id="error_explanation">
|
|
|
|
<h2><%= pluralize(@memo.errors.count, "error") %> prohibited this memo from being saved:</h2>
|
2014-03-29 10:57:36 +08:00
|
|
|
|
2014-04-03 14:41:04 +08:00
|
|
|
<ul>
|
|
|
|
<% @memo.errors.full_messages.each do |msg| %>
|
|
|
|
<li><%= msg %></li>
|
|
|
|
<% end %>
|
|
|
|
</ul>
|
|
|
|
</div>
|
2014-04-28 09:13:57 +08:00
|
|
|
<% end %>
|
2014-04-03 14:41:04 +08:00
|
|
|
<div class="actions" style="max-width:680px">
|
|
|
|
<p><%= f.text_field :subject, :required => true%></p>
|
|
|
|
<p style="max-width:680px"><%= f.text_area :content, :required => true, :id => 'editor02' %></p>
|
|
|
|
<script type="text/javascript">var ckeditor=CKEDITOR.replace('editor02');</script>
|
|
|
|
<br/>
|
|
|
|
<p>
|
2014-04-28 09:13:57 +08:00
|
|
|
<%#= l(:label_attachment_plural) %><br />
|
|
|
|
<%#= render :partial => 'attachments/form', :locals => {:container => @memo} %>
|
2014-04-03 14:41:04 +08:00
|
|
|
</p>
|
2014-04-28 09:13:57 +08:00
|
|
|
<%= f.submit :value => l(:label_memo_create) %>
|
2014-04-03 14:41:04 +08:00
|
|
|
<%= link_to l(:button_cancel), "#", :onclick => '$("#add-memo").hide(); return false;' %>
|
|
|
|
</div>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
</div>
|
|
|
|
<!--modified by huang-->
|
|
|
|
<% #= link_to '发布帖子', new_forum_memo_path(@forum), :class => 'icon icon-add' %>
|
|
|
|
<span>
|
2014-05-26 11:05:02 +08:00
|
|
|
<%#= link_to l(:label_memo_new_from_forum), new_open_source_project_relative_memo_path(@open_source_project), :class => 'icon icon-add',
|
2014-04-03 14:41:04 +08:00
|
|
|
:onclick => 'showAndScrollTo("add-memo", "memo_subject"); return false;' if User.current.logged? %>
|
|
|
|
</span>
|
2014-03-29 10:57:36 +08:00
|
|
|
|
2014-04-03 14:41:04 +08:00
|
|
|
<div class="contextual-borad">
|
|
|
|
<%#= link_to(
|
|
|
|
image_tag('edit.png')+l(:label_forum_edit),
|
|
|
|
{:action => 'edit', :id => @forum},
|
|
|
|
:method => 'get',
|
|
|
|
:title => l(:button_edit)
|
|
|
|
) if @forum.editable_by?(User.current) %>
|
|
|
|
<%#= link_to(
|
|
|
|
image_tag('delete.png')+'删除讨论区',
|
|
|
|
{:action => 'destroy', :id => @forum},
|
|
|
|
:method => :delete,
|
|
|
|
:data => {:confirm => l(:text_are_you_sure)},
|
|
|
|
:title => l(:button_delete)
|
|
|
|
) if @forum.destroyable_by?(User.current) %>
|
|
|
|
</div>
|
2014-05-20 16:10:05 +08:00
|
|
|
<%= render :partial => 'open_source_projects/show_topics', :locals => {:memos => @memos, :open_source_project => @open_source_project} %>
|