Skip to content

Issues-562: Show Archived label #80

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 16, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions views/group/helper_functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -246,17 +246,22 @@ function writeGroupHeader($group, $showDetails = false, $owner = null, $leaders
<?php echo writeGroupIcon($group, '', 'Group-Icon Group-Icon-Big');?>
</div>
<?php }?>
<?php if($showDetails) { ?>
<div class="Group-Info">
<?php if(!$group->Archived) { ?>
<div class="Group-Description"><?php
$isMarkdownFormatter = strcasecmp(Gdn_Format::defaultFormat(), MarkdownFormat::FORMAT_KEY) === 0;

$text = $isMarkdownFormatter? Gdn_Format::to($group->Description, MarkdownFormat::FORMAT_KEY):
$group->Description;
echo $text ;
?></div>
<?php } else {?>
<div class="Group-Archived"><?php
$challengeAnchor = $group->ChallengeUrl? anchor('challenge', $group->ChallengeUrl,'', ['target' => 'blank']):'challenge';
echo '<span class="Archived">Archived</span><span>This '.$challengeAnchor.' forum has been archived.</span> ';
?>
</div>
<?php } ?>
</div>
<?php }?>
</div>

<?php
Expand All @@ -265,7 +270,7 @@ function writeGroupHeader($group, $showDetails = false, $owner = null, $leaders
if (!function_exists('writeGroupMetaData')) {
function writeGroupMetaData($group, $owner = null, $copilots=null) {
?>
<div class="Group-Header">
<div class="Group-Footer">
<div class="Group-Info">
<div class="Meta Group-Meta Table">
<div class="MItem TableRow">
Expand Down