<commit_before>{{!
    Copyright (C) 2014 Google Inc., authors, and contributors <see AUTHORS file>
    Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
    Created By: <EMAIL>
    Maintained By: <EMAIL>
}}


<li class="tree-item governance item-list" {{addclass "t-" instance.status}} {{addclass "t-" instance.overdue}}
  data-object-id="{{instance.id}}" data-object-type="{{instance.class.table_singular}}"
  {{#instance}}{{data 'model'}}{{/instance}}
  >
  <div class="item-main">
    <div class="openclose">
      <a class="openclose-placeholder" href="javascript://"> </a>
      <div class="row-fluid">
        <div class="item-data span4" style="padding-left:0px;">
          <div class="tree-title-area">
            <span class="tier-trigger"></span>{{instance.title}}
          </div>
        </div>

        <div class="span8">
          <ul class="tree-action-list">
            <li>
              <span rel="tooltip" data-placement="top" data-original-title="Last edit">
                <i class="grcicon-updated"></i> {{localize_date instance.updated_at}}
              </span>
            </li>
            <li>
              <div class="date">
                <span rel="tooltip" data-placement="top" {{#is_overdue instance.end_date instance.status}}class="error"{{/is_overdue}} data-original-title="Due On">
                  <i class="grcicon-history-{{#is_overdue instance.end_date instance.status}}red{{else}}color{{/if overdue_warning}}"></i> {{localize_date instance.end_date}}
                </span>
              </div>
            </li>
            <li>
              {{#with_mapping_count instance 'cycle_task_entries'}}
              <span class="counter" rel="tooltip" data-placement="left" data-original-title="# of mapped objects">
                <i class="grcicon-object-black"></i>
                <strong class="error">{{count}}</strong>
              </span>
              {{/with_mapping_count}}
            </li>
            {{#using cycle=instance.cycle}}
              {{#if_equals cycle.is_current true}}
              <li>
                <div class="request-control" {{ (el) -> $(el).bind('inserted', function() { el.ggrc_controllers_quick_form({ instance : el.closest('.item-list').data('model')}); }); }}>
                  {{#if_equals instance.status 'Assigned'}}
                    <button class="btn btn-primary change-task-status {{instance._disabled}}" data-openclose="open" data-name="status" data-value="InProgress">Start</button>
                  {{/status}}
                  {{#if_equals instance.status 'InProgress'}}
                    <button class="btn change-task-status {{instance._disabled}}" data-name="status" data-value="Finished">Finish</button>
                  {{/if_equals}}
                  {{#if_equals instance.status 'Declined'}}
                    <button class="btn change-task-status {{instance._disabled}}" data-name="status" data-value="Finished">Finish</button>
                  {{/if_equals}}
                  {{#if_equals instance.status 'Finished'}}
                    <button class="btn btn-danger change-task-status {{instance._disabled}}" data-name="status" data-value="Declined">Decline</button>
                    <button class="btn btn-success change-task-status {{instance._disabled}}" data-openclose="close" data-name="status" data-value="Verified">Verify</button>
                  {{/status}}
                  {{#if_equals instance.status 'Verified'}}
                    <span class="task-done">
                      <em>Verified</em>
                    </span>
                  {{/if_equals}}
                  {{#instance._undo.0}}
                    <a href="javascript://" data-name="status" data-value="{{instance._undo.0}}" data-undo="true" class="undo {{instance._disabled}}">Undo</a>
                  {{/instance._undo.0}}
                </div>
              </li>
              {{/if_equals}}
            {{/using}}
          </ul>
        </div>
      </div>
    </div>
  </div>

  {{#if expanded}}
  <div class="tier-2-info item-content">
    <div class="tier-2-info-content">
      <div class="row-fluid">
        <div class="span9">
          {{#is_dashboard}}
            {{#defer 'workflow' instance.workflow}}
              <a href="{{workflow.viewLink}}" class="info-action">
                View Workflow
                <i class="grcicon-goto"></i>
              </a>
              &nbsp;&nbsp;&nbsp;
            {{/defer}}
            {{#defer 'object' instance.object}}
              <a href="{{object.viewLink}}" class="info-action">
                View task on {{object.class.table_singular}} page
                <i class="grcicon-goto"></i>
              </a>
            {{/defer}}
          {{/is_dashboard}}
        </div>
        <div class="span3">
        {{#is_allowed 'update' instance context='for'}}
          <a class="utility-link pull-right info-action" href="javascript://" data-toggle="modal-ajax-form" data-modal-reset="reset" data-modal-class="modal-wide" data-object-singular="{{instance.class.model_singular}}" data-object-plural="{{instance.class.table_plural}}" data-object-id="{{instance.id}}">
            <i class="grcicon-edit"></i>
            Edit Task
          </a>
        {{/is_allowed}}
        </div>
      </div>
      <div class="row-fluid" style="padding-top:6px">
        <div class="span7">
          {{#is_dashboard}}
            {{#defer 'object' instance.object}}
              <ul {{data 'instance'}} {{data 'object'}} {{ (el) -> el.cms_controllers_tree_view_node({model: el.data("object").object.type, draw_children: false, instance: el.data("object").object, result:''}) }}></ul>
            {{/defer}}
          {{/is_dashboard}}
        </div>
        <div class="span2 text-right">
          Assignee:
        </div>
        <div {{#instance}}{{data 'model'}}{{/instance}} class="span3" {{ (el) -> el.ggrc_controllers_quick_form({ instance : el.data('model')}); }}>
          <i class="grcicon-person-green pull-left icon-field"></i>
          {{#using contact=instance.contact}}
          <div class="objective-selector">
            <input type="text" name="contact.name" data-lookup="Person" class="span10 short-field search-icon" {{#if_equals instance.status 'Verified'}}disabled="disabled"{{/if}} placeholder="Choose Assignee" value="{{firstnonempty contact.name contact.email ''}}">
          </div>
          {{/using}}
        </div>
      </div>

      <div class="show-description">
        <div class="row-fluid">
          <div class="span12">
            <div class="tree-description">
              <h5>{{instance.title}}</h5>
              {{{instance.description}}}
            </div>
          </div>
        </div>
      </div>

      {{#if draw_children}}
        {{#prune_context}} {{! this line is just chopping the context stack down to one element}}
            {{#child_options}}
            <div class="row-fluid">
              <div class="span11">
                <div class="inner-row">
                  <strong>Comments ({{list.length}})</strong>
                  <ul class="entry-list" {{data 'options'}} {{ (el) -> el.cms_controllers_tree_view(el.data("options")) }}></ul>
                </div>
              </div>
            </div>
            {{/child_options}}
        {{/prune_context}}
      {{/if}}

    </div>
  </div>
  {{/if}}
</li>
<commit_msg>Remove inline object tree and just show title, description<commit_after>{{!
    Copyright (C) 2014 Google Inc., authors, and contributors <see AUTHORS file>
    Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
    Created By: <EMAIL>
    Maintained By: <EMAIL>
}}


<li class="tree-item governance item-list" {{addclass "t-" instance.status}} {{addclass "t-" instance.overdue}}
  data-object-id="{{instance.id}}" data-object-type="{{instance.class.table_singular}}"
  {{#instance}}{{data 'model'}}{{/instance}}
  >
  <div class="item-main">
    <div class="openclose">
      <a class="openclose-placeholder" href="javascript://"> </a>
      <div class="row-fluid">
        <div class="item-data span4" style="padding-left:0px;">
          <div class="tree-title-area">
            <span class="tier-trigger"></span>{{instance.title}}
          </div>
        </div>

        <div class="span8">
          <ul class="tree-action-list">
            <li>
              <span rel="tooltip" data-placement="top" data-original-title="Last edit">
                <i class="grcicon-updated"></i> {{localize_date instance.updated_at}}
              </span>
            </li>
            <li>
              <div class="date">
                <span rel="tooltip" data-placement="top" {{#is_overdue instance.end_date instance.status}}class="error"{{/is_overdue}} data-original-title="Due On">
                  <i class="grcicon-history-{{#is_overdue instance.end_date instance.status}}red{{else}}color{{/if overdue_warning}}"></i> {{localize_date instance.end_date}}
                </span>
              </div>
            </li>
            <li>
              {{#with_mapping_count instance 'cycle_task_entries'}}
              <span class="counter" rel="tooltip" data-placement="left" data-original-title="# of mapped objects">
                <i class="grcicon-object-black"></i>
                <strong class="error">{{count}}</strong>
              </span>
              {{/with_mapping_count}}
            </li>
            {{#using cycle=instance.cycle}}
              {{#if_equals cycle.is_current true}}
              <li>
                <div class="request-control" {{ (el) -> $(el).bind('inserted', function() { el.ggrc_controllers_quick_form({ instance : el.closest('.item-list').data('model')}); }); }}>
                  {{#if_equals instance.status 'Assigned'}}
                    <button class="btn btn-primary change-task-status {{instance._disabled}}" data-openclose="open" data-name="status" data-value="InProgress">Start</button>
                  {{/status}}
                  {{#if_equals instance.status 'InProgress'}}
                    <button class="btn change-task-status {{instance._disabled}}" data-name="status" data-value="Finished">Finish</button>
                  {{/if_equals}}
                  {{#if_equals instance.status 'Declined'}}
                    <button class="btn change-task-status {{instance._disabled}}" data-name="status" data-value="Finished">Finish</button>
                  {{/if_equals}}
                  {{#if_equals instance.status 'Finished'}}
                    <button class="btn btn-danger change-task-status {{instance._disabled}}" data-name="status" data-value="Declined">Decline</button>
                    <button class="btn btn-success change-task-status {{instance._disabled}}" data-openclose="close" data-name="status" data-value="Verified">Verify</button>
                  {{/status}}
                  {{#if_equals instance.status 'Verified'}}
                    <span class="task-done">
                      <em>Verified</em>
                    </span>
                  {{/if_equals}}
                  {{#instance._undo.0}}
                    <a href="javascript://" data-name="status" data-value="{{instance._undo.0}}" data-undo="true" class="undo {{instance._disabled}}">Undo</a>
                  {{/instance._undo.0}}
                </div>
              </li>
              {{/if_equals}}
            {{/using}}
          </ul>
        </div>
      </div>
    </div>
  </div>

  {{#if expanded}}
  <div class="tier-2-info item-content">
    <div class="tier-2-info-content">
      <div class="row-fluid">
        <div class="span9">
          {{#is_dashboard}}
            {{#using cycle=instance.cycle}}
            {{#using workflow=cycle.workflow}}
              <a href="{{workflow.viewLink}}" class="info-action">
                View Workflow
                <i class="grcicon-goto"></i>
              </a>
              &nbsp;&nbsp;&nbsp;
            {{/using}}
            {{/using}}
            {{#using instance=instance.cycle_task_group_object}}
            {{#using object=instance.object}}
              {{#if object.viewLink}}
                {{#is_allowed "view_object_page" object}}
                  <a href="{{object.viewLink}}" class="info-action">
                    View {{object.class.title_singular}}
                    <i class="grcicon-goto"></i>
                  </a>
                {{/is_allowed}}
              {{else}}
                Object deleted or inaccessible
              {{/if}}
            {{/using}}
            {{/using}}
          {{/is_dashboard}}
        </div>
        <div class="span3">
        {{#is_allowed 'update' instance context='for'}}
          <a class="utility-link pull-right info-action" href="javascript://" data-toggle="modal-ajax-form" data-modal-reset="reset" data-modal-class="modal-wide" data-object-singular="{{instance.class.model_singular}}" data-object-plural="{{instance.class.table_plural}}" data-object-id="{{instance.id}}">
            <i class="grcicon-edit"></i>
            Edit Task
          </a>
        {{/is_allowed}}
        </div>
      </div>
      <div class="row-fluid" style="padding-top:6px">
        <div class="span7">
          {{#is_dashboard}}
            {{#using instance=instance.cycle_task_group_object}}
            {{#using object=instance.object}}
              <div class="row-fluid">
                <div class="span12">
                  <div class="tree-title-area">
                    Task for:
                    <i class="grcicon-{{instance.object.reify.class.table_singular}}-color"></i>
                    {{firstnonempty object.title instance.title}}
                  </div>
                  <div class="tree-description">
                    {{{firstnonempty object.description instance.description}}}
                  </div>
                </div>
              </div>
            {{/using}}
            {{/using}}
          {{/is_dashboard}}
        </div>
        <div class="span2 text-right">
          Assignee:
        </div>
        <div {{#instance}}{{data 'model'}}{{/instance}} class="span3" {{ (el) -> el.ggrc_controllers_quick_form({ instance : el.data('model')}); }}>
          <i class="grcicon-person-green pull-left icon-field"></i>
          {{#using contact=instance.contact}}
          <div class="objective-selector">
            <input type="text" name="contact.name" data-lookup="Person" class="span10 short-field search-icon" {{#if_equals instance.status 'Verified'}}disabled="disabled"{{/if}} placeholder="Choose Assignee" value="{{firstnonempty contact.name contact.email ''}}">
          </div>
          {{/using}}
        </div>
      </div>

      <div class="show-description">
        <div class="row-fluid">
          <div class="span12">
            <div class="tree-description">
              <h5>Task: {{instance.title}}</h5>
              {{{instance.description}}}
            </div>
          </div>
        </div>
      </div>

      {{#if draw_children}}
        {{#prune_context}} {{! this line is just chopping the context stack down to one element}}
            {{#child_options}}
            <div class="row-fluid">
              <div class="span11">
                <div class="inner-row">
                  <strong>Comments ({{list.length}})</strong>
                  <ul class="entry-list" {{data 'options'}} {{ (el) -> el.cms_controllers_tree_view(el.data("options")) }}></ul>
                </div>
              </div>
            </div>
            {{/child_options}}
        {{/prune_context}}
      {{/if}}

    </div>
  </div>
  {{/if}}
</li>

{'fraction_non_alphanumeric': 0.17575175943698015, 'fraction_numerical': 0.0037108125399872042, 'mean_word_length': 1.9813084112149533, 'pattern_counts': {'":': 0, '<': 257, '<?xml version=': 0, '>': 264, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1119171', 'n_tokens_mistral': 4571, 'n_tokens_neox': 4406, 'n_words': 818}