Commit 87ed7435 authored by Kevin Dibble's avatar Kevin Dibble Committed by Robert Lyon

Bug 1529730: show user introduction

This change allows the user introduction to be fully seen
by clicking on a new link called "show introduction".

This is displayed in
- Engage -> People
- Engage -> Groups

behatnotneeded

Change-Id: I5cc533571977a978982ca6aa39f0de022abe699e
parent 4a5ce96d
......@@ -413,3 +413,4 @@ $string['groupparticipationreports'] = "Participation report";
$string['groupparticipationreportsdesc1'] = "Group administrators can access a report displaying all group and shared pages and who has commented on them.";
$string['returntogroupportfolios'] = "Return to group pages and collections";
$string['showintroduction'] = "Introduction";
\ No newline at end of file
......@@ -2052,7 +2052,7 @@ function get_users_data($userids, $getviews=true) {
WHERE ap.usr = u.id AND ap.field = \'friendscontrol\'), \'auth\') AS friendscontrol,
(SELECT 1 FROM {usr_friend} WHERE ((usr1 = ? AND usr2 = u.id) OR (usr2 = ? AND usr1 = u.id))) AS friend,
(SELECT 1 FROM {usr_friend_request} fr WHERE fr.requester = ? AND fr.owner = u.id) AS requestedfriendship,
(SELECT title FROM {artefact} WHERE artefacttype = \'introduction\' AND owner = u.id) AS introduction,
(SELECT description FROM {artefact} WHERE artefacttype = \'introduction\' AND owner = u.id) AS introduction,
fp.message
FROM {usr} u
LEFT JOIN {usr_account_preference} ap ON (u.id = ap.usr AND ap.field = \'hiderealname\')
......
......@@ -57,6 +57,14 @@
}
}
.list-group-item,
.usericon-heading {
.inner-link.with-introduction {
span {
margin-right: 5px;
}
}
}
.list-group-item-heading {
font-family: $font-family-serif;
......
......@@ -23,11 +23,25 @@
{/if}
</h4>
</div>
{if $r.role}
{if $r.introduction}
<div class="text-midtone">
<a class="inner-link text-link collapsed with-introduction" data-toggle="collapse" data-target="#userintro{$r.id}"
href="#userintro{$r.id}" role="button" aria-expanded="false"
aria-controls="userintro{$r.id}">
<span class="icon icon-chevron-down collapse-indicator float-left" role="presentation" aria-hidden="true"></span>
{str tag=showintroduction section=group}
</a>
</div>
{/if}
{/if}
{if $r.role}
<div class="introduction detail text-small">
<span>{$r.introduction|str_shorten_html:80:true:true:false|safe}
</span>
<div class="collapse" id="userintro{$r.id}">{$r.introduction|safe}
</div>
<div class="jointime">
<strong>
{str tag="Joined" section="group"}:
......
......@@ -38,6 +38,21 @@
{$user->institutions|safe}
</div>
{/if}
{if $user->introduction}
<div class="text-small text-midtone">
<a class="inner-link text-link collapsed with-introduction" data-toggle="collapse" data-target="#userintro{$user->id}"
href="#userintro{$user->id}" role="button" aria-expanded="false"
aria-controls="userintro{$user->id}">
<span class="icon icon-chevron-down collapse-indicator float-left" role="presentation" aria-hidden="true"></span>
{str tag=showintroduction section=group}
</a>
</div>
<div class="introduction detail text-small">
<div class="collapse" id="userintro{$user->id}">
{$user->introduction|safe}
</div>
</div>
{/if}
</div>
</div>
<div class="col-md-4">
......
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