Commit 1a7c2a20 authored by Robert Lyon's avatar Robert Lyon
Browse files

Bug 1721866: Don't show "multiple journals" blurb in group journal posts page



Also show correct 'No journals' message depending if we are looking at
group, site, or institution journal list page

behatnotneeded

Change-Id: I237b1ab417ac6c5b7fa26081d0ebfdf0f9b93e08
Signed-off-by: Robert Lyon's avatarRobert Lyon <robertl@catalyst.net.nz>
parent 3bf14023
...@@ -158,6 +158,9 @@ $string['viewposts'] = 'Copied entries (%s)'; ...@@ -158,6 +158,9 @@ $string['viewposts'] = 'Copied entries (%s)';
$string['postscopiedfromview'] = 'Entries copied from %s'; $string['postscopiedfromview'] = 'Entries copied from %s';
$string['youhavenoblogs'] = 'You have no journals.'; $string['youhavenoblogs'] = 'You have no journals.';
$string['youhavenogroupblogs'] = 'There are no journals in this group.';
$string['youhavenoinstitutionblogs'] = 'There are no journals in this institution.';
$string['youhavenositeblogs'] = 'There are no site journals.';
$string['youhaveoneblog'] = 'You have 1 journal.'; $string['youhaveoneblog'] = 'You have 1 journal.';
$string['youhaveblogs'] = 'You have %s journals.'; $string['youhaveblogs'] = 'You have %s journals.';
......
...@@ -202,7 +202,7 @@ if ($institutionname) { ...@@ -202,7 +202,7 @@ if ($institutionname) {
$institution = new Institution($institutionname); $institution = new Institution($institutionname);
$smarty->assign('institutiondisplayname', $institution->displayname); $smarty->assign('institutiondisplayname', $institution->displayname);
} }
else if (!$USER->get_account_preference('multipleblogs')) { else if (!$groupid && !$USER->get_account_preference('multipleblogs')) {
$blogcount = count_records('artefact', 'artefacttype', 'blog', 'owner', $USER->get('id')); $blogcount = count_records('artefact', 'artefacttype', 'blog', 'owner', $USER->get('id'));
if ($blogcount == 1) { if ($blogcount == 1) {
$smarty->assign('enablemultipleblogstext', 1); $smarty->assign('enablemultipleblogstext', 1);
......
...@@ -8,7 +8,17 @@ ...@@ -8,7 +8,17 @@
</div> </div>
{/if} {/if}
{if !$blogs->data} {if !$blogs->data}
<p class="no-results">{str tag=youhavenoblogs section=artefact.blog}</p> <p class="no-results">
{if $group}
{str tag=youhavenogroupblogs section=artefact.blog}
{elseif $institutionname == 'mahara'}
{str tag=youhavenositeblogs section=artefact.blog}
{elseif $institutionname}
{str tag=youhavenoinstitutionblogs section=artefact.blog}
{else}
{str tag=youhavenoblogs section=artefact.blog}
{/if}
</p>
{else} {else}
<div class="rel view-container"> <div class="rel view-container">
<div class="panel-items"> <div class="panel-items">
......
Supports Markdown
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