不选择新闻时,取消"添加新闻"按钮的显示。不选择问题跟踪时,取消“新建问题”和“自定义查询”按钮的显示,不选择讨论区时,取消“发布新帖”按钮的显示

This commit is contained in:
sw 2014-07-18 10:54:22 +08:00
parent 6f858795ef
commit 5838b3e47d
4 changed files with 141 additions and 118 deletions

View File

@ -1,12 +1,12 @@
<!-- <%= course_board_breadcrumb(@board) %> -->
<!-- <%#= course_board_breadcrumb(@board) %> -->
<!--new and follow-->
<!-- <div class="content-title-top">
<%= link_to l(:label_message_new),
<%#= 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? %> -->
<!-- <%= watcher_link(@board, User.current) %> -->
<!-- <%#= watcher_link(@board, User.current) %> -->
<!-- </div> -->
<div id="add-message" class="add_frame" style="display:none;">
<% if User.current.logged? %>

View File

@ -1,23 +1,25 @@
<!-- <%= board_breadcrumb(@board) %> -->
<!-- <%#= board_breadcrumb(@board) %> -->
<!--new and follow-->
<!-- <div class="content-title-top">
<%= link_to l(:label_message_new),
<%#= 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? %> -->
<!-- <%= watcher_link(@board, User.current) %> -->
<!-- <%#= watcher_link(@board, User.current) %> -->
<!-- </div> -->
<div id="add-message" class="add_frame" style="display:none;">
<% if User.current.logged? %>
<h3><%= link_to h(@board.name), project_board_path(@project, @board) %> &#187; <%= l(:label_message_new) %></h3>
<div class="add_frame_header">
<%= l(:label_message_new) %>
</div>
<%= form_for @message, :url => new_board_message_path(@board), :html => {:multipart => true, :id => 'message-form'} do |f| %>
<%= render :partial => 'messages/form', :locals => {:f => f} %>
<p><%= submit_tag l(:button_create), :class => "whiteButton m3p10 h30" %>
<%= preview_link(preview_board_message_path(@board), 'message-form' ,target='preview',{:class => 'whiteButton m3p10'} )%> |
<%= preview_link(preview_board_message_path(@board), 'message-form', target='preview', {:class => 'whiteButton m3p10'}) %>
|
<%= link_to l(:button_cancel), "#", :onclick => '$("#add-message").hide(); return false;', :class => 'whiteButton m3p10' %></p>
<% end %>
<div id="preview" class="wiki"></div>
@ -42,12 +44,14 @@
<!-- <div class="borad-description"><%= h @board.description %></div> -->
<div class="borad-setitle">
<span class="borad-topic-count">共有 <%= link_to @topics.count %> 个贴子</span>
<% if @project.enabled_modules.where("name = 'boards'").count > 0 %>
<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="padding-top: 10px">
<% if @topics.any? %>
@ -68,13 +72,24 @@
<table width="640px" border="0">
<tr>
<td valign="top" width="500px" class=" <%= topic.sticky? ? 'sticky' : '' %> <%= topic.locked? ? 'locked' : '' %>"><%= link_to h(topic.subject), board_message_path(@board, topic) %></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>
<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 colspan="2" ><span class="font_description">标签</span></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>
<td align="left" colspan="2">
<span class="font_lighter"><%= authoring topic.created_on, topic.author %><br/></span></td>
</tr>
</table>
</td>
</tr>
</table>

View File

@ -1,4 +1,5 @@
<div class="content-title-top">
<% if @project.enabled_modules.where("name = 'issue_tracking'").count > 0 %>
<div>
<%= link_to l(:label_issue_new), {:controller => 'issues', :action => 'new', :copy_from => nil}, :param => :project_id, :caption => :label_issue_new,
:html => {:accesskey => Redmine::AccessKeys.key_for(:new_issue)}, :class => 'icon icon-add' %>
@ -6,6 +7,7 @@
<%= link_to l(:label_query), '#', :class => 'icon icon-help',
:onclick => '$("#custom_query").slideToggle(400); ' if true || User.current.logged? %>
</div>
<% end %>
</div>
<div class="contextual">
@ -22,6 +24,7 @@
<div id="custom_query" class="custom_query" style="display: <%= !params[:utf8].blank? ? 'block' : 'none' %>;">
<span>---<%= l :label_query_new %>---</span>
<div id="query_form_content" class="hide-when-print">
<fieldset id="filters" class="collapsible <%= @query.new_record? ? "" : "collapsed" %>">
<legend onclick="toggleFieldset(this);">
@ -70,7 +73,9 @@
</p>
<% else %>
<%= render :partial => 'issues/list', :locals => {:issues => @issues, :query => @query} %>
<div class="pagination"><ul><%= pagination_links_full @issue_pages, @issue_count %></ul></div>
<div class="pagination">
<ul><%= pagination_links_full @issue_pages, @issue_count %></ul>
</div>
<% end %>
<div style="float: right; padding-top: 30px">
<% other_formats_links do |f| %>
@ -87,9 +92,11 @@
<p>
<label><%= radio_button_tag 'columns', 'all' %> <%= l(:description_all_columns) %></label>
</p>
<p>
<label><%= check_box_tag 'description', '1', @query.has_column?(:description) %> <%= l(:field_description) %></label>
</p>
<p class="buttons">
<%= submit_tag l(:button_export), :name => nil, :onclick => "hideModal(this);" %>
<%= submit_tag l(:button_cancel), :name => nil, :onclick => "hideModal(this);", :type => 'button' %>

View File

@ -11,11 +11,12 @@
<span style="font-size: 16px; border-bottom:1px solid #f0f0f0; margin-right: 15px;">
<%= label_tips %>
</span>
<% if @project.enabled_modules.where("name = 'news'").count > 0 %>
<%= link_to(btn_tips,
new_project_news_path(@project),
:class => 'icon icon-add',
:onclick => 'showAndScrollTo("add-news", "news_title"); return false;') %>
<% end %>
<% if @project && User.current.allowed_to?(:manage_news, @project) %>
<div id="add-news" class="add_frame" style="display:none;">
<%= labelled_form_for @news, :url => project_news_index_path(@project),