drupalorg-1.0.x-dev/templates/forks/drupalorg-no-fork.html.twig

templates/forks/drupalorg-no-fork.html.twig
{#
Available variables:
- issue: Issue array with all the information returned from Gitlab.
- project: Project array that the issue belongs to.
- branches: Branches array.
- logged_in: User is logged in or not.
#}
<div class="new-fork-wrapper" id="new-fork-wrapper">
  {% if logged_in %}
    <div>
      <p>
        {{ '<b>No forks found</b>. Create a new fork if you want to start collaborating. The name of the fork will be: <em>@project-@id</em>'|t({
          '@id': issue.iid,
          '@project': project.path
        }) }}
      </p>
      <br>
      <hr>
      <form action="{{ path('drupalorg.issue_fork_create_fork') }}" method="get" class="create-fork-form global-text--form" id="create-fork-form">
        <input type="submit" class="button--primary button" value="{{ 'Create issue fork'|t }}">
        <input type="hidden" name="source_link" value="{{ issue.web_url }}">
        <div id="with-branch-wrapper">
          <div class="input-block">
            <input type="checkbox" id="with-branch" checked="checked" name="with_branch" />
            <label for="with-branch">{{ 'with new branch' }}</label>
          </div>
          <div class="input-block" id="source-branch-wrapper">
            <span>{{ 'from'|t }}</span>
            <select name="source_branch" id="source-branch" class="">
              {% for branch in branches %}
                <option {{ branch.default ? 'selected=selected' }} value="{{ branch.name }}">{{ branch.name }} {{ branch.default ? '(default)'|t }}</option>
              {% endfor %}
            </select>
          </div>
          <div class="input-block" id="branch-name-wrapper">
            <span>{{ 'named'|t }} <em>{{ issue.iid }}-</em></span>
            <input type="text" name="branch_name" value="{{ issue.title | clean_unique_id | truncate(20) | trim('-') }}" maxlength="20" />
          </div>
        </div>
      </form>
    </div>
  {% else %}
    <p>
      {{ '<b>No forks exist for this issue.</b>'|t }}
      {{ 'You need to <a href="@url">log in</a> first if you want to create forks.'|t({
        '@url': path('user.login')
      }) }}
    </p>
  {% endif %}
</div>

Главная | Обратная связь

drupal hosting | друпал хостинг | it patrol .inc