%# BEGIN BPS TAGGED BLOCK {{{
%#
%# COPYRIGHT:
%#
%# This software is Copyright (c) 1996-2026 Best Practical Solutions, LLC
%#                                          <sales@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
%#
%#
%# LICENSE:
%#
%# This work is made available to you under the terms of Version 2 of
%# the GNU General Public License. A copy of that license should have
%# been provided with this software, but in any event can be snarfed
%# from www.gnu.org.
%#
%# This work is distributed in the hope that it will be useful, but
%# WITHOUT ANY WARRANTY; without even the implied warranty of
%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
%# General Public License for more details.
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
%# 02110-1301 or visit their web page on the internet at
%# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
%#
%# (The following paragraph is not intended to limit the rights granted
%# to you to modify and distribute this software under the terms of
%# the GNU General Public License and is only of importance to you if
%# you choose to contribute your changes and enhancements to the
%# community by submitting them to Best Practical Solutions, LLC.)
%#
%# By intentionally submitting any modifications, corrections or
%# derivatives to this work, or any other work intended for use with
%# Request Tracker, to Best Practical Solutions, LLC, you confirm that
%# you are the copyright holder for those contributions and you grant
%# Best Practical Solutions,  LLC a nonexclusive, worldwide, irrevocable,
%# royalty-free, perpetual, license to use, copy, create derivative
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
<div class="modal fade" id="links-info-modal" tabindex="-1" aria-labelledby="links-info-modal-title" aria-hidden="true">
  <div class="modal-dialog modal-dialog-centered modal-dialog-scrollable" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <h5 class="modal-title" id="links-info-modal-title"><&|/l&>About links</&></h5>
        <a href="javascript:void(0)" class="close" data-bs-dismiss="modal" aria-label="Close">
          <span aria-hidden="true">&times;</span>
        </a>
      </div>
      <div class="modal-body">
        <h6><&|/l&>Link types</&></h6>
        <dl class="row small">
          <dt class="col-4"><&|/l&>Depends on</&></dt>
% if ($is_ticket) {
          <dd class="col-8"><&|/l, $noun &>This [_1] can't be resolved until the linked items are completed.</&></dd>
% } else {
          <dd class="col-8"><&|/l, $noun &>This [_1] depends on the linked items.</&></dd>
% }
          <dt class="col-4"><&|/l&>Depended on by</&></dt>
          <dd class="col-8"><&|/l, $noun &>The linked items depend on this [_1].</&></dd>
          <dt class="col-4"><&|/l&>Parents</&></dt>
% if ($is_ticket) {
          <dd class="col-8"><&|/l, $noun &>The linked items are parents of this [_1]. Parent/child links are used for project and task management: this [_1]'s time worked is included in its parents' Total Time Worked.</&></dd>
% } else {
          <dd class="col-8"><&|/l, $noun &>The linked items are parents of this [_1].</&></dd>
% }
          <dt class="col-4"><&|/l&>Children</&></dt>
% if ($is_ticket) {
          <dd class="col-8"><&|/l, $noun &>The linked items are children of this [_1], e.g. the tasks of a project. Their time worked is included in this [_1]'s Total Time Worked.</&></dd>
% } else {
          <dd class="col-8"><&|/l, $noun &>The linked items are children of this [_1].</&></dd>
% }
          <dt class="col-4"><&|/l&>Refers to</&></dt>
          <dd class="col-8"><&|/l&>Applies no extra behavior to links. Use to track associated tickets, assets, web URLs, and more.</&></dd>
          <dt class="col-4"><&|/l&>Referred to by</&></dt>
          <dd class="col-8"><&|/l&>Same as Refers to, but in the opposite direction.</&></dd>
        </dl>
        <h6 class="mt-3"><&|/l&>Shortcuts for the value field</&></h6>
        <dl class="row small">
          <dt class="col-4"><code>123</code> <&|/l&>or</&> <code>#123</code></dt>
          <dd class="col-8"><&|/l&>Ticket</&></dd>
          <dt class="col-4"><code>a:123</code></dt>
          <dd class="col-8"><&|/l&>Article</&></dd>
          <dt class="col-4"><code>asset:123</code></dt>
          <dd class="col-8"><&|/l&>Asset</&></dd>
          <dt class="col-4"><code>txn:123</code></dt>
          <dd class="col-8"><&|/l&>Transaction (or paste a transaction URL)</&></dd>
          <dt class="col-4"><code>user:123</code></dt>
          <dd class="col-8"><&|/l&>User</&></dd>
          <dt class="col-4"><code>group:123</code></dt>
          <dd class="col-8"><&|/l&>Group</&></dd>
          <dt class="col-4"><code>https://&hellip;</code></dt>
          <dd class="col-8"><&|/l&>Web Link</&></dd>
        </dl>
% $m->callback( CallbackName => 'ExtraLinkInstructions', Object => $Object );
      </div>
    </div>
  </div>
</div>
<%init>
# $noun comes from the dynamic loc(lc($Object->RecordType)) below, which the string extractor
# can't see, so register the values it can produce here ('item' is covered by the literal loc):
# loc('ticket')
# loc('asset')
my $noun = ( $Object && $Object->can('RecordType') ) ? loc( lc( $Object->RecordType ) ) : loc('item');
my $is_ticket = $Object && $Object->isa('RT::Ticket') ? 1 : 0;
</%init>
<%args>
$Object => undef
</%args>
