Commit a10f6872 authored by Robert Lyon's avatar Robert Lyon Committed by Gerrit Code Review
Browse files

Merge "Bug 1551027: Corrected messages showed in a Journal entries block filtered by tags"

parents 5e0b0883 67147848
......@@ -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.';
......
......@@ -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>"';
}
}
$blockheading = get_string('blockheadingtags', 'blocktype.blog/taggedposts', count($tagsin), $tagstr);
$blockheading .= (!empty($tagomitstr)) ? get_string('blockheadingtagsomit', 'blocktype.blog/taggedposts', count($tagsout), $tagomitstr) : '';
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('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);
......
......@@ -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}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment