parent
412052dd0d
commit
135c3d9b19
|
@ -1,12 +1,3 @@
|
|||
<script type="text/javascript" xmlns="http://www.w3.org/1999/html">
|
||||
function submitProjectBoard()
|
||||
{
|
||||
if(regexSubject()&®exContent())
|
||||
{
|
||||
$("#message-form").submit();
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<div class="project_r_h">
|
||||
<h2 class="project_h2">
|
||||
<% if User.current.language == "zh"%>
|
||||
|
@ -16,20 +7,6 @@
|
|||
<% end %>
|
||||
</h2>
|
||||
</div>
|
||||
<div id="add-message" class="talk_new ml15" style="display:<%= !@flag.nil?&&@flag=='true' ? '' : 'none' %>;">
|
||||
<% if User.current.logged? %>
|
||||
<%= form_for @message, :url => new_board_message_path(@board), :html => {:multipart => true, :id => 'message-form'} do |f| %>
|
||||
<p class="talk_top"><%= l(:project_module_boards_post) %></p>
|
||||
<%= render :partial => 'messages/form_project', :locals => {:f => f} %>
|
||||
<p>
|
||||
<a href="javascript:void(0)" onclick="submitProjectBoard();" class="blue_btn fl ml55" style="margin-left: 55px"><%= l(:button_submit)%></a>
|
||||
<%= link_to l(:button_cancel), "#", :onclick => '$("#add-message").hide(); return false;', :class => 'grey_btn ml10 fl' %>
|
||||
</p>
|
||||
<% end %>
|
||||
<div id="preview" class="wiki"></div>
|
||||
<br/><br/>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<!--display the board-->
|
||||
<% if !User.current.logged? %>
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
<a class="subnav_num">(<%= @project.boards.first.topics.count %>)</a>
|
||||
<% end %>
|
||||
<% if User.current.member_of?(@project) %>
|
||||
<%= link_to "+"+l(:project_module_boards_post), project_boards_path(@project, :flag => true), :layout => 'base_projects', :class => "subnav_green ml105" %>
|
||||
<%= link_to "+"+l(:project_module_boards_post), new_board_message_path(@project.boards.first), :layout => 'base_projects', :class => "subnav_green ml105" %>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end%>
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
<a class="subnav_num">(<%= @project.boards.first.topics.count %>)</a>
|
||||
<% end %>
|
||||
<% if User.current.member_of?(@project) %>
|
||||
<%= link_to "+"+l(:project_module_boards_post), project_boards_path(@project, :flag => true), :layout => 'base_projects', :class => "subnav_green ml105" %>
|
||||
<%= link_to "+"+l(:project_module_boards_post), new_board_message_path(@project.boards.first), :layout => 'base_projects', :class => "subnav_green ml105" %>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end%>
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
<a class="subnav_num">(<%= @project.boards.first.topics.count %>)</a>
|
||||
<% end %>
|
||||
<% if User.current.member_of?(@project) %>
|
||||
<%= link_to "+"+l(:project_module_boards_post), project_boards_path(@project, :flag => true), :layout => 'base_projects', :class => "subnav_green ml105" %>
|
||||
<%= link_to "+"+l(:project_module_boards_post), new_board_message_path(@project.boards.first), :layout => 'base_projects', :class => "subnav_green ml105" %>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end%>
|
||||
|
|
|
@ -0,0 +1,28 @@
|
|||
<div class="project_r_h">
|
||||
<h2 class="project_h2">
|
||||
<% if User.current.language == "zh"%>
|
||||
<%= h @board.name %>
|
||||
<% else %>
|
||||
<%= l(:project_module_boards) %>
|
||||
<% end %>
|
||||
</h2>
|
||||
</div>
|
||||
<div id="cancel-message" class="talk_new ml15">
|
||||
<% if User.current.logged? %>
|
||||
<%= form_for @message, :url => new_board_message_path(@board), :html => {:multipart => true, :id => 'message-form'} do |f| %>
|
||||
<p class="talk_top"><%= l(:project_module_boards_post) %></p>
|
||||
<%= render :partial => 'messages/form_project', :locals => {:f => f} %>
|
||||
<p>
|
||||
<a href="javascript:void(0)" onclick="submitProjectBoard();" class="blue_btn fl ml55" style="margin-left: 55px"><%= l(:button_submit)%></a>
|
||||
<%= link_to l(:button_cancel), project_boards_path(@project), :class => 'grey_btn ml10 fl' %>
|
||||
</p>
|
||||
<% end %>
|
||||
<div id="preview" class="wiki"></div>
|
||||
<br/><br/>
|
||||
<% else %>
|
||||
<div class="c_grey f14">
|
||||
<%= l(:label_user_login_project_board) %>
|
||||
<%= link_to l(:label_user_login_new), signin_path, :class => "c_blue ml5" %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
|
@ -1,16 +1,5 @@
|
|||
<% if @project %>
|
||||
<h3>
|
||||
<%= link_to h(@board.name), :controller => 'boards', :action => 'show', :project_id => @project, :id => @board %>
|
||||
»
|
||||
<%= l(:label_message_new) %>
|
||||
</h3>
|
||||
<%= form_for @message, :url => {:action => 'new'}, :html => {:multipart => true, :id => 'message-form'} do |f| %>
|
||||
<%= render :partial => 'form', :locals => {:f => f,:is_new => true} %>
|
||||
<%= submit_tag l(:button_create), :class => "whiteButton m3p10 h30" %>
|
||||
<%= preview_link({:controller => 'messages', :action => 'preview', :board_id => @board}, 'message-form' ,target='preview',{:class => 'whiteButton m3p10'} )%>
|
||||
<% end %>
|
||||
|
||||
<div id="preview" class="wiki"></div>
|
||||
<%= render :partial => 'project_new_topic' %>
|
||||
<% elsif @course %>
|
||||
<%= render :partial => 'course_new' %>
|
||||
<% end %>
|
|
@ -306,4 +306,13 @@ $(document).ready(function () {
|
|||
$("pre").addClass("break_word");
|
||||
}
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
//论坛提交
|
||||
function submitProjectBoard()
|
||||
{
|
||||
if(regexSubject()&®exContent())
|
||||
{
|
||||
$("#message-form").submit();
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue