We are no longer offering accounts on this server. Consider https://gitlab.freedesktop.org/ as a place to host projects.

Commit 454d216a authored by tobyink's avatar tobyink

group joining/leaving

parent 6f6943d9
...@@ -33,9 +33,14 @@ if (! $_GET['group']) ...@@ -33,9 +33,14 @@ if (! $_GET['group'])
$group = new Group($_GET['group']); $group = new Group($_GET['group']);
if ($_GET['action']) if ($_GET['action'] && $_SESSION['user']->name)
{ {
print "Need to perform action " . htmlentities($_GET['action']); if ($_GET['action'] == 'join')
$group->memberJoin($_SESSION['user']);
elseif ($_GET['action'] == 'leave')
$group->memberLeave($_SESSION['user']);
header("Location: " . $group->getURL());
exit; exit;
} }
......
...@@ -9,21 +9,26 @@ ...@@ -9,21 +9,26 @@
<img src="{$avatar|escape:'html':'UTF-8'}" alt="avatar" class="photo" width="64" height="64" /> <img src="{$avatar|escape:'html':'UTF-8'}" alt="avatar" class="photo" width="64" height="64" />
</div> </div>
{if $ismember} {if $logged_in}
{if $isowner} {if $ismember}
<a class="edit" href="{$link_edit}">[edit]</a> {if $isowner}
<a class="edit" href="{$link_edit}">[edit]</a>
{else}
<a class="edit" href="{$link_leave}">[leave]</a>
{/if}
{else} {else}
<a class="edit" href="{$link_leave}">[leave]</a> <a class="edit" href="{$link_join}">[join]</a>
{/if} {/if}
{else}
<a class="edit" href="{$link_join}">[join]</a>
{/if} {/if}
<span class="fn" property="foaf:name">{$fullname|escape:'html':'UTF-8'}</span> <dl>
(<span class="nickname" property="foaf:nick">{$group|escape:'html':'UTF-8'}</span>) <dt>
<br /> <span class="fn" property="foaf:name">{$fullname|escape:'html':'UTF-8'}</span>
{if $homepage}<a class="url" rel="foaf:page" href="{$homepage|escape:'html':'UTF-8'}">{$homepage|escape:'html':'UTF-8'}</a>{/if} (<span class="nickname" property="foaf:nick">{$group|escape:'html':'UTF-8'}</span>)
<p class="note" property="dc:abstract">{$bio|escape:'html':'UTF-8'}</p> </dt>
<dd>{if $homepage}<a class="url" rel="foaf:page" href="{$homepage|escape:'html':'UTF-8'}">{$homepage|escape:'html':'UTF-8'}</a>{/if}</dd>
<dd class="note" property="dc:abstract">{$bio|escape:'html':'UTF-8'}</dd>
</dl>
<hr style="border: 1px solid transparent; clear: both;" rel="foaf:page" rev="foaf:primaryTopic" resource="" /> <hr style="border: 1px solid transparent; clear: both;" rel="foaf:page" rev="foaf:primaryTopic" resource="" />
</div> </div>
......
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