Feature #43969 » 0001-Add-icons-to-add-links-in-the-issue-view-s-Subtasks-.patch
| app/assets/images/icons.svg | ||
|---|---|---|
|
<path d="M11 6l.463 -.536a5 5 0 0 1 7.071 7.072l-.534 .464"/>
|
||
|
<path d="M13 18l-.397 .534a5.068 5.068 0 0 1 -7.127 0a4.972 4.972 0 0 1 0 -7.071l.524 -.463"/>
|
||
|
</symbol>
|
||
|
<symbol viewBox="0 0 24 24" stroke-linecap="round" stroke-linejoin="round" id="icon--link-add">
|
||
|
<path d="M9 15l6 -6"/>
|
||
|
<path d="M11 6l.463 -.536a5 5 0 0 1 7.072 0a4.993 4.993 0 0 1 -.001 7.072"/>
|
||
|
<path d="M12.603 18.534a5.07 5.07 0 0 1 -7.127 0a4.972 4.972 0 0 1 0 -7.071l.524 -.463"/>
|
||
|
<path d="M16 19h6"/>
|
||
|
<path d="M19 16v6"/>
|
||
|
</symbol>
|
||
|
<symbol viewBox="0 0 24 24" stroke-linecap="round" stroke-linejoin="round" id="icon--link-break">
|
||
|
<path d="M9 15l3 -3m2 -2l1 -1"/>
|
||
|
<path d="M11 6l.463 -.536a5 5 0 0 1 7.071 7.072l-.534 .464"/>
|
||
| app/helpers/application_helper.rb | ||
|---|---|---|
|
end
|
||
|
def toggle_link(name, id, options={})
|
||
|
html_options = options.slice(:class)
|
||
|
onclick = "$('##{id}').toggle(); "
|
||
|
onclick << (options[:focus] ? "$('##{options[:focus]}:visible').focus(); " : "this.blur(); ")
|
||
|
onclick << "$(window).scrollTop($('##{options[:focus]}').position().top); " if options[:scroll]
|
||
|
onclick << "return false;"
|
||
|
link_to(name, "#", :onclick => onclick)
|
||
|
link_to(name, "#", html_options.merge(:onclick => onclick))
|
||
|
end
|
||
|
def link_to_previous_month(year, month, options={})
|
||
| app/helpers/issues_helper.rb | ||
|---|---|---|
|
# Returns a link for adding a new subtask to the given issue
|
||
|
def link_to_new_subtask(issue)
|
||
|
link_to(l(:button_add), url_for_new_subtask(issue))
|
||
|
link_to(sprite_icon('add', l(:button_add)), url_for_new_subtask(issue), :class => 'icon icon-add')
|
||
|
end
|
||
|
def url_for_new_subtask(issue)
|
||
| app/views/issues/_relations.html.erb | ||
|---|---|---|
|
<div class="contextual">
|
||
|
<% if User.current.allowed_to?(:manage_issue_relations, @project) %>
|
||
|
<%= toggle_link l(:button_add), 'new-relation-form', {:focus => 'relation_issue_to_id'} %>
|
||
|
<%= toggle_link sprite_icon('link-add', l(:button_add)), 'new-relation-form', {:focus => 'relation_issue_to_id', :class => 'icon icon-link-add'} %>
|
||
|
<% end %>
|
||
|
</div>
|
||
| config/icon_source.yml | ||
|---|---|---|
|
svg: movie
|
||
|
- name: file-music
|
||
|
svg: file-music
|
||
|
- name: link-add
|
||
|
svg: link-plus
|
||
| test/functional/issues_controller_test.rb | ||
|---|---|---|
|
assert_select 'textarea[name=?]', 'issue[notes]'
|
||
|
end
|
||
|
end
|
||
|
# Add links for subtasks and related issues
|
||
|
assert_select 'div#issue_tree div.contextual a.icon.icon-add', :text => /Add/
|
||
|
assert_select 'div#relations div.contextual a.icon.icon-link-add', :text => /Add/
|
||
|
end
|
||
|
def test_show_should_display_attachment_icons_by_mime_type
|
||
- « Previous
- 1
- 2
- Next »