Merge branch 'dev_hjq' of http://repository.trustie.net/xianbo/trustie2 into dev_hjq

This commit is contained in:
whimlex 2015-04-16 14:25:19 +08:00
commit 19cbc34b2b
7 changed files with 29 additions and 5 deletions

View File

@ -46,6 +46,26 @@ module JournalsHelper
content.html_safe
end
def render_links_easy(issue, journal, options={})
content = ''
editable = User.current.logged? && (User.current.allowed_to?(:edit_issue_notes, issue.project) || (journal.user == User.current && User.current.allowed_to?(:edit_own_issue_notes, issue.project)))
destroyable = User.current.logged? && ((journal.user == User.current) || (issue.author_id == User.current.id) || (User.current.admin == 1))
links = []
if !journal.notes.blank?
links << link_to(l(:button_quote),
{:controller => 'journals', :action => 'new', :id => issue.id, :journal_id => journal},
:remote => true,
:method => 'post',
:title => l(:button_quote)) if options[:reply_links]
if destroyable
links << link_to(l(:button_delete), { :controller => 'journals', :action => 'destroy', :id => journal, :format => 'js' },
:title => l(:button_delete))
end
end
content << content_tag('div', links.join(' ').html_safe, :class => 'contextual') unless links.empty?
content.html_safe
end
def render_notes (issue, journal, options={})
content = ''
editable = User.current.logged? && (User.current.allowed_to?(:edit_issue_notes, issue.project) || (journal.user == User.current && User.current.allowed_to?(:edit_own_issue_notes, issue.project)))

View File

@ -47,7 +47,8 @@
:method => 'get',
:title => l(:label_version_new),
:tabindex => 200) if User.current.allowed_to?(:manage_versions, @issue.project) %>
<a href="javascript:viod(0)" class="pic_add mt5 ml5"></a>
<%= link_to "", new_project_version_path(@issue.project), :class => "pic_add mt5 ml5 " %>
<!--<a href="javascript:viod(0)" class="pic_add mt5 ml5"></a>-->
<% end %>
</li>
<div class="cl"></div>

View File

@ -5,6 +5,9 @@
<% if @edit_allowed || !@allowed_statuses.empty? %>
<div id="all_attributes" style="display:none;">
<%= render :partial => 'form', :locals => {:f => f} %>
<a remote="true" href="javascript:void(0)" class="blue_btn fl" style="margin-left: 80px;margin-bottom: 10px;margin-top: -10px;" onclick="$('#issue-form').submit();">
<%= l(:button_submit) %>
</a>
</div>
<% end %><!--end-->
<div class="ping_C mb10"></div>

View File

@ -97,7 +97,7 @@
<div class="cl"></div>
<div class="newpro_box02 ">
<label class="label"> <%= l(:label_issue_watchers) %></label>
<input id="" name="" size="22" class="fl mb10 h26" type="text" placeholder="搜索添加跟踪者">
<!--<input id="" name="" size="22" class="fl mb10 h26" type="text" placeholder="搜索添加跟踪者">-->
<span class="search_for_watchers">
<%= link_to "",
{:controller => 'watchers', :action => 'new', :project_id => @issue.project},

View File

@ -18,7 +18,7 @@
</p>
</div>
<!--编辑、引用、回复按钮-->
<div class="ping_disfoot"><%= render_links(issue, journal, :reply_links => reply_links) unless journal.notes.blank? %></div>
<div class="ping_disfoot"><%= render_links_easy(issue, journal, :reply_links => reply_links) unless journal.notes.blank? %></div>
<!--回复内容、引用内容-->
<p><%= render_notes_issue(issue, journal, :reply_links => reply_links) unless journal.notes.blank? %></p>
<div class="cl"></div>

View File

@ -14,7 +14,7 @@
<a href="#" class="blue_btn fl ml80" onclick="$('#issue-form').submit();">
<%= l(:button_create) %>
</a>
<%= preview_link preview_new_issue_path(:project_id => @project), 'issue-form', 'preview', {:class => "blue_btn fl ml10"} %>
<%#= preview_link preview_new_issue_path(:project_id => @project), 'issue-form', 'preview', {:class => "blue_btn fl ml10"} %>
<% end %>
<div id="preview" class="wiki"></div>

View File

@ -120,7 +120,7 @@
<%= l(:button_submit) %>
</a>
<%#= submit_tag l(:button_submit) %>
<%= preview_link preview_edit_issue_path(:project_id => @project, :id => @issue), 'issue-form' ,'preview',{:class => "blue_btn fr mr10"}%>
<%#= preview_link preview_edit_issue_path(:project_id => @project, :id => @issue), 'issue-form' ,'preview',{:class => "blue_btn fr mr10"}%>
</div>
<% if @changesets.present? %>