<?php
$parent_group = groups_get_group($group->parent_id);
?>
<div id="buddypress" class="buddypress-wrap communityally-shortcode-element <?php echo esc_attr(get_template()); ?>">
<div id="communityally-wait-overlay">
	<div class="communityally-wait-animation">
		<div class="communityally-wait-circle"></div>
	</div>
</div>
<span id="communityally-back-button" style="display:none"><i class="bi bi-arrow-left"></i></span>
<div class="bp-wrap">
	<div class="communityally-discussion-topic-container">
		<div class="communityally-discussion-topic"><?php echo esc_html($group->name); ?></div>
		<div class="communityally-discussion-topic-info">
			<?php
			$group_creator_id = $group->creator_id;
			$date_created = $group->date_created;
			echo sprintf(esc_html__('Created by %1$s on %2$s in %3$s', 'communityally'), bp_core_get_user_displayname($group_creator_id), esc_html($date_created),
				'<a href="' . esc_attr(CommunityAlly_Groups_Setup::get_group_permalink($group->parent_id) . 'discussion') . '">' . esc_html($parent_group->name) . '</a>');
			?>
		</div>
		<div class="communityally-discussion-topic-description"><?php echo esc_html($group->description); ?></div>
	</div>
	<div id="item-body" class="item-body communityally-discussion-item-body">

		<?php bp_nouveau_group_get_template_part($group_id, 'activity', $args); ?>

	</div><!-- #item-body -->

</div><!-- // .bp-wrap -->
</div><!-- // #buddypress -->