Commit ad53199b authored by Cecilia Vela Gurovic's avatar Cecilia Vela Gurovic Committed by Robert Lyon
Browse files

Bug 1551027: Corrected messages showed in a

Journal entries block filtered by tags

behatnotneeded

Change-Id: Idfb823d4babff47b192a7c1b6f0588d2e2e5545b
(cherry picked from commit 67147848)
parent da3a1065
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -17,16 +17,21 @@ $string['blockheadingtags'] = array(
    0 => 'Journal entries with tag %2$s',
    1 => 'Journal entries with tags %2$s'
);
$string['blockheadingtagsomit'] = array(
$string['blockheadingtagsomitboth'] = array(
    0 => ' but not tag %2$s',
    1 => ' but not tags %2$s'
);
$string['blockheadingtagsomitonly'] = array(
    0 => 'Journal entries without tag %2$s',
    1 => 'Journal entries without tags %2$s'
);
$string['defaulttitledescription'] = 'If you leave this blank, the title of the journal will be used';
$string['postsperpage'] = 'Entries per page';
$string['taglist'] = 'Display entries tagged with';
$string['taglistdesc1'] = 'Type a minus sign before each tag that you want to exclude. These tags are shown with a red background.';
$string['excludetag'] = 'exclude tag: ';
$string['notags'] = 'There are no journal entries tagged "%s"';
$string['notagsomit'] = 'There are no journal entries without tags "%s"';
$string['notagsboth'] = 'There are no journal entries tagged "%s" and not "%s"';
$string['notagsavailable'] = 'You have not created any tags';
$string['notagsavailableerror'] = 'No tag selected. You need to add tags to your journal entries before being able to select them here.';
+7 −2
Original line number Diff line number Diff line
@@ -276,8 +276,13 @@ class PluginBlocktypeTaggedposts extends MaharaCoreBlocktype {
                $tagomitstr .= ($viewownerdisplay) ? '"' . $tag . '"' : '"<a href="' . get_config('wwwroot') . 'tags.php?tag=' . $tag . '&sort=name&type=text">' . $tag . '</a>"';
            }
        }
        if (empty($tagsin)) {
            $blockheading = get_string('blockheadingtagsomitonly', 'blocktype.blog/taggedposts', count($tagsout), $tagomitstr);
        }
        else {
            $blockheading = get_string('blockheadingtags', 'blocktype.blog/taggedposts', count($tagsin), $tagstr);
        $blockheading .= (!empty($tagomitstr)) ? get_string('blockheadingtagsomit', 'blocktype.blog/taggedposts', count($tagsout), $tagomitstr) : '';
            $blockheading .= (!empty($tagomitstr)) ? get_string('blockheadingtagsomitboth', 'blocktype.blog/taggedposts', count($tagsout), $tagomitstr) : '';
        }
        $blockheading .= ($viewownerdisplay) ? ' ' . get_string('by', 'artefact.blog') . ' <a href="' . profile_url($viewownerdisplay) . '">' . display_name($viewownerdisplay) . '</a>' : '';
        $smarty->assign('full', $full);
        $smarty->assign('results', $results);
+4 −0
Original line number Diff line number Diff line
@@ -34,6 +34,10 @@

{if $configerror}
    <span class="text-midtone">{str tag='configerror' section='blocktype.blog/taggedposts'}</span>
{elseif $badnotag && $badtag}
    <span class="text-midtone">{str tag='notagsboth' section='blocktype.blog/taggedposts' arg1=$badtag arg2=$badnotag}</span>
{elseif $badnotag}
    <span class="text-midtone">{str tag='notagsomit' section='blocktype.blog/taggedposts' arg1=$badnotag}</span>
{elseif $badtag}
    <span class="text-midtone">{str tag='notags' section='blocktype.blog/taggedposts' arg1=$badtag}</span>
{elseif $full}