Overview
Comment:Add parent user and children in "my infos"
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | dev
Files: files | file ages | folders
SHA3-256: ca2e238e54ed8ecc9dc86c104143130b132f358bdb371b86cbedaca065a21de4
User & Date: bohwaz on 2023-05-30 12:51:54
Other Links: branch diff | manifest | tags
Context
2023-05-30
13:50
Add parent/children in users list, when there's at least one check-in: faf3f943ab user: bohwaz tags: dev
12:51
Add parent user and children in "my infos" check-in: ca2e238e54 user: bohwaz tags: dev
12:29
Fix user search export check-in: 63a947622b user: bohwaz tags: dev
Changes

Modified src/templates/me/index.tpl from [78eaa6c657] to [be51edf18c].

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15

















16
17
18
19
20
21
22
23
24
{include file="_head.tpl" title="Mes informations personnelles" current="me"}

{include file="./_nav.tpl" current="me"}

{if $ok !== null}
<p class="confirm block">
	Les modifications ont bien été enregistrées.
</p>
{/if}


<dl class="describe">
	<dd>{linkbutton href="!me/edit.php" label="Modifier mes informations" shape="edit"}</dd>
</dl>


















{include file="users/_details.tpl" data=$user show_message_button=false mode="user"}

<dl class="describe">
	<dd>{linkbutton href="!me/export.php" label="Télécharger toutes les données détenues sur moi" shape="download"}</dd>
</dl>

{$snippets|raw}

{include file="_foot.tpl"}










<




>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>









1
2
3
4
5
6
7
8
9
10

11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
{include file="_head.tpl" title="Mes informations personnelles" current="me"}

{include file="./_nav.tpl" current="me"}

{if $ok !== null}
<p class="confirm block">
	Les modifications ont bien été enregistrées.
</p>
{/if}


<dl class="describe">
	<dd>{linkbutton href="!me/edit.php" label="Modifier mes informations" shape="edit"}</dd>
</dl>


{if $user->isChild() || count($children)}
<aside class="describe">
	<dl class="describe">
		{if $user->isChild()}
			<dt>Membre responsable</dt>
			<dd>{$parent_name}</dd>
		{elseif count($children)}
			<dt>Membres rattachés</dt>
			{foreach from=$children item="child"}
				<dd>{$child.name}</dd>
			{/foreach}
		{/if}
	</dl>
</aside>
{/if}

{include file="users/_details.tpl" data=$user show_message_button=false mode="user"}

<dl class="describe">
	<dd>{linkbutton href="!me/export.php" label="Télécharger toutes les données détenues sur moi" shape="download"}</dd>
</dl>

{$snippets|raw}

{include file="_foot.tpl"}

Modified src/www/admin/me/index.php from [59b3150bbd] to [ff2ba2a323].

1
2
3
4
5
6
7
8
9
10

11
12
13
14


15
<?php
namespace Garradin;

use Garradin\UserTemplate\Modules;

require_once __DIR__ . '/_inc.php';

$ok = qg('ok');

$tpl->assign(compact('user', 'ok'));


$variables = compact('user');
$tpl->assign('snippets', Modules::snippetsAsString(Modules::SNIPPET_USER, $variables));



$tpl->display('me/index.tpl');









|
>

|


>
>

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<?php
namespace Garradin;

use Garradin\UserTemplate\Modules;

require_once __DIR__ . '/_inc.php';

$ok = qg('ok');

$parent_name = $user->getParentName();
$children = $user->listChildren();

$variables = compact('user', 'parent_name', 'children', 'ok');
$tpl->assign('snippets', Modules::snippetsAsString(Modules::SNIPPET_USER, $variables));

$tpl->assign($variables);

$tpl->display('me/index.tpl');