Buttons will not show up for tasks_group_object_tasks in a cycle where i...

...s_current is false.
Brad's suggestion. Not sure what it does. But it was intended to resolve a
problem where refresh was being called on a null object.


On Tue, Jul 22, 2014 at 4:20 PM, Dan Ring <notifications@github.com> wrote:

> In
> src/ggrc_workflows/assets/mustache/cycle_task_group_object_tasks/tree.mustache:
>
> > -                  <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>
> > +            {{#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')}); }); }}>
>
> Is waiting for inserted necessary? If so, why is it needed here but not
> other uses of ggrc_controllers_quick_form?
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/reciprocity/ggrc-core/pull/1571/files#r15262607>.
>