Commit 360566d2 authored by Liam's avatar Liam Committed by Cecilia Vela Gurovic
Browse files

Bug #1826048: "Remove from watchlist" icon is missing

behatnotneeded

Change-Id: I0d2291035d3f8873f30e0adfe769ecd54b3f874e
(cherry picked from commit cfeac822)
parent 9c7f25de
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -1843,7 +1843,8 @@ function add_feedback_form_submit(Pieform $form, $values) {
                                                           'view' => $view->get('id'),
                                                           'ctime' => db_format_timestamp(time()),
                                                           'unsubscribetoken' => get_random_key(24)));
        $updatelink = ($artefact) ? get_string('removefromwatchlistartefact', 'view', $view->get('title')) : get_string('removefromwatchlist', 'view');
        $updatelink = '<span class="icon icon-lg icon-eye-slash left" role="presentation" aria-hidden="true"></span>';
        $updatelink .= ($artefact) ? get_string('removefromwatchlistartefact', 'view', hsc($view->get('title'))) : get_string('removefromwatchlist', 'view');
    }

    activity_occurred('feedback', $data, 'artefact', 'comment');
+2 −1
Original line number Diff line number Diff line
@@ -50,7 +50,8 @@ function addFeedbackSuccess(form, data) {

    // need to change the watchlist link
    if (data.data.updatelink) {
        jQuery('#toggle_watchlist_link').text(data.data.updatelink);
        // we must make safe the update link on php side
        jQuery('#toggle_watchlist_link').html(data.data.updatelink);
    }
    resetFeedbackReplyto();
    formSuccess(form, data);
+8 −3
Original line number Diff line number Diff line
@@ -55,12 +55,12 @@
            </button>
            <ul class="dropdown-menu dropdown-menu-right" role="menu">
                <li class="dropdown-item">
                    {strip}
                    <a id="toggle_watchlist_link" class="watchlist" href="">

                        {if $viewbeingwatched}
                            <span class="icon icon-eye-slash left" role="presentation" aria-hidden="true"></span>
                            <span class="icon icon-lg icon-eye-slash left" role="presentation" aria-hidden="true"></span>
                        {else}
                            <span class="icon icon-eye left" role="presentation" aria-hidden="true"></span>
                            <span class="icon icon-lg icon-eye left" role="presentation" aria-hidden="true"></span>
                        {/if}

                        {if $artefact}
@@ -77,8 +77,10 @@
                            {/if}
                        {/if}
                    </a>
                    {/strip}
                </li>
                <li class="dropdown-item">
                    {strip}
                    {if $objector}
                    <span class="nolink">
                        <span class="icon icon-lg icon-flag text-danger left" role="presentation" aria-hidden="true"></span>
@@ -90,13 +92,16 @@
                        {str tag=reportobjectionablematerial}
                    </a>
                    {/if}
                    {/strip}
                </li>
                {if $userisowner && $objectedpage}
                    <li>
                    {strip}
                    <span class="nolink">
                        <span class="icon icon-lg icon-flag text-danger left" role="presentation" aria-hidden="true"></span>
                        {str tag=objectionreviewonview}
                    </span>
                    {/strip}
                    </li>
                {/if}
            </ul>
+2 −2
Original line number Diff line number Diff line
@@ -40,7 +40,7 @@ if (get_record('usr_watchlist_view', 'usr', $data->usr, 'view', $viewid)) {
        json_reply('local', $result);
    }
    $result->message = get_string('removedfromwatchlist', 'view');
    $result->newtext = '<span class="icon icon-eye left" role="presentation" aria-hidden="true"></span>';
    $result->newtext = '<span class="icon icon-lg icon-eye left" role="presentation" aria-hidden="true"></span>';
    if ($artefact) {
        $result->newtext .= get_string('addtowatchlistartefact', 'view', $title);
    }
@@ -57,7 +57,7 @@ if (!insert_record('usr_watchlist_view', $data)) {
}

$result->message = get_string('addedtowatchlist', 'view');
$result->newtext = '<span class="icon icon-eye-slash left" role="presentation" aria-hidden="true"></span>';
$result->newtext = '<span class="icon icon-lg icon-eye-slash left" role="presentation" aria-hidden="true"></span>';
if ($artefact) {
    $result->newtext .= get_string('removefromwatchlistartefact', 'view', $title);
}