Fixed issue 5, add a way for user to manage their account.
Also added for each user a small public profile.
This commit is contained in:
@@ -34,7 +34,7 @@
|
||||
<div id="{block docid}doc3{/block}" class="{block docclass}yui-t3{/block}">
|
||||
<div id="hd">
|
||||
<p class="top">
|
||||
{if !$user.isAnonymous()}{blocktrans}Welcome, <strong>{$user.first_name} {$user.last_name}</strong>.{/blocktrans} <a href="{url 'IDF_Views::logout'}">{trans 'Sign Out'}</a>{else}<a href="{url 'IDF_Views::login'}">{trans 'Sign in or create your account'}</a>{/if}
|
||||
{if !$user.isAnonymous()}{aurl 'url', 'IDF_Views_User::myAccount'}{blocktrans}Welcome, <strong><a class="userw" href="{$url}">{$user}</a></strong>.{/blocktrans} <a href="{url 'IDF_Views::logout'}">{trans 'Sign Out'}</a>{else}<a href="{url 'IDF_Views::login'}">{trans 'Sign in or create your account'}</a>{/if}
|
||||
| <a href="{url 'IDF_Views::faq'}">{trans 'Help'}</a>
|
||||
</p>
|
||||
{* <div id="header">
|
||||
|
@@ -35,7 +35,7 @@
|
||||
<div id="hd">
|
||||
{if $project}<h1 class="project-title">{$project}</h1>{/if}
|
||||
<p class="top">
|
||||
{if !$user.isAnonymous()}{blocktrans}Welcome, <strong>{$user.first_name} {$user.last_name}</strong>.{/blocktrans} <a href="{url 'IDF_Views::logout'}">{trans 'Sign Out'}</a>{else}<a href="{url 'IDF_Views::login'}">{trans 'Sign in or create your account'}</a>{/if}
|
||||
{if !$user.isAnonymous()}{aurl 'url', 'IDF_Views_User::myAccount'}{blocktrans}Welcome, <strong><a class="userw" href="{$url}">{$user}</a></strong>.{/blocktrans} <a href="{url 'IDF_Views::logout'}">{trans 'Sign Out'}</a>{else}<a href="{url 'IDF_Views::login'}">{trans 'Sign in or create your account'}</a>{/if}
|
||||
| <a href="{url 'IDF_Views::faq'}">{trans 'Help'}</a>
|
||||
</p>
|
||||
<div id="header">
|
||||
|
@@ -4,14 +4,14 @@
|
||||
{assign $i = 0}
|
||||
{assign $nc = $comments.count()}
|
||||
{foreach $comments as $c}
|
||||
<div class="issue-comment{if $i == 0} issue-comment-first{/if}{if $i == ($nc-1)} issue-comment-last{/if}" id="ic{$c.id}">
|
||||
{if $i == 0}{assign $who = $issue.get_submitter()}
|
||||
<p>{blocktrans}Reported by {$who}, {$c.creation_dtime|date}{/blocktrans}</p>
|
||||
{else}{assign $who = $c.get_submitter()}
|
||||
<div class="issue-comment{if $i == 0} issue-comment-first{/if}{if $i == ($nc-1)} issue-comment-last{/if}" id="ic{$c.id}">{assign $who = $c.get_submitter()}{aurl 'whourl', 'IDF_Views_User::view', array($who.login)}
|
||||
{if $i == 0}
|
||||
<p>{blocktrans}Reported by <a href="{$whourl}">{$who}</a>, {$c.creation_dtime|date}{/blocktrans}</p>
|
||||
{else}
|
||||
{aurl 'url', 'IDF_Views_Issue::view', array($project.shortname, $issue.id)}
|
||||
{assign $id = $c.id}
|
||||
{assign $url = $url~'#ic'~$c.id}
|
||||
<p>{blocktrans}Comment <a href="{$url}">{$i}</a> by {$who}, {$c.creation_dtime|date}{/blocktrans}</p>
|
||||
<p>{blocktrans}Comment <a href="{$url}">{$i}</a> by <a href="{$whourl}">{$who}</a>, {$c.creation_dtime|date}{/blocktrans}</p>
|
||||
{/if}
|
||||
|
||||
<pre class="issue-comment-text">{if strlen($c.content) > 0}{issuetext $c.content, $request}{else}<i>{trans '(No comments were given for this change.)'}</i>{/if}</pre>
|
||||
@@ -91,15 +91,15 @@
|
||||
{/block}
|
||||
{block context}
|
||||
<div class="issue-info">
|
||||
{assign $submitter = $issue.get_submitter()}
|
||||
<p><strong>{trans 'Created:'}</strong> <span class="nobrk">{$issue.creation_dtime|dateago}</span> <span class="nobrk">{blocktrans}by {$submitter}{/blocktrans}</span></p>
|
||||
{assign $submitter = $issue.get_submitter()}{aurl 'url', 'IDF_Views_User::view', array($submitter.login)}
|
||||
<p><strong>{trans 'Created:'}</strong> <span class="nobrk">{$issue.creation_dtime|dateago}</span> <span class="nobrk">{blocktrans}by <a href="{$url}">{$submitter}</a>{/blocktrans}</span></p>
|
||||
{if $issue.modif_dtime != $issue.creation_dtime}<p>
|
||||
<strong>{trans 'Updated:'}</strong> <span class="nobrk">{$issue.modif_dtime|dateago}</span></p>{/if}
|
||||
<p>
|
||||
<strong>{trans 'Status:'}</strong> {$issue.get_status.name}</p>
|
||||
<p>
|
||||
<strong>{trans 'Owner:'}</strong> {if $issue.get_owner == null}{trans 'No owner'}{else}{$issue.get_owner}{/if}
|
||||
</p>{assign $tags = $issue.get_tags_list()}{if $tags.count()}
|
||||
{if $issue.get_owner != null}<p>{aurl 'url', 'IDF_Views_User::view', array($issue.get_owner().login)}
|
||||
<strong>{trans 'Owner:'}</strong> <a href="{$url}">{$issue.get_owner}</a>
|
||||
</p>{/if}{assign $tags = $issue.get_tags_list()}{if $tags.count()}
|
||||
<p>
|
||||
<strong>{trans 'Labels:'}</strong><br />
|
||||
{foreach $tags as $tag}{aurl 'url', 'IDF_Views_Issue::listLabel', array($project.shortname, $tag.id, 'open')}
|
||||
|
@@ -21,13 +21,13 @@
|
||||
{assign $km = 'members'}
|
||||
<p><strong>{trans 'Development Team'}</strong><br />
|
||||
{trans 'Admins'}<br />
|
||||
{foreach $team[$ko] as $owner}
|
||||
<span class="label">{$owner}</span><br />
|
||||
{foreach $team[$ko] as $owner}{aurl 'url', 'IDF_Views_User::view', array($owner.login)}
|
||||
<span class="label"><a class="label" href="{$url}">{$owner}</a></span><br />
|
||||
{/foreach}
|
||||
{if count($team[$km]) > 0}
|
||||
{trans 'Happy Crew'}<br />
|
||||
{foreach $team[$km] as $member}
|
||||
<span class="label">{$member}</span><br />
|
||||
{foreach $team[$km] as $member}{aurl 'url', 'IDF_Views_User::view', array($member.login)}
|
||||
<span class="label"><a class="label" href="{$url}">{$member}</a></span><br />
|
||||
{/foreach}
|
||||
{/if}
|
||||
</p>
|
||||
|
59
src/IDF/templates/user/myaccount.html
Normal file
59
src/IDF/templates/user/myaccount.html
Normal file
@@ -0,0 +1,59 @@
|
||||
{extends "base-simple.html"}
|
||||
{block body}
|
||||
{if $form.errors}
|
||||
<div class="px-message-error">
|
||||
<p>{trans 'Oups, please check the form for errors.'}</p>
|
||||
{if $form.get_top_errors}
|
||||
{$form.render_top_errors|unsafe}
|
||||
{/if}
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
<form method="post" action=".">
|
||||
<table class="form" summary="">
|
||||
<tr>
|
||||
<th>{trans 'Login:'}</th>{aurl 'url', 'IDF_Views_User::view', array($user.login)}
|
||||
<td><a href="{$url}">{$user.login}</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{$form.f.first_name.labelTag}:</th>
|
||||
<td>{if $form.f.first_name.errors}{$form.f.first_name.fieldErrors}{/if}
|
||||
{$form.f.first_name|unsafe}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><strong>{$form.f.last_name.labelTag}:</strong></th>
|
||||
<td>{if $form.f.last_name.errors}{$form.f.last_name.fieldErrors}{/if}
|
||||
{$form.f.last_name|unsafe}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{$form.f.password.labelTag}:</th>
|
||||
<td>{if $form.f.password.errors}{$form.f.password.fieldErrors}{/if}
|
||||
{$form.f.password|unsafe}<br />
|
||||
<span class="helptext">{$form.f.password.help_text}</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{$form.f.password2.labelTag}:</th>
|
||||
<td>{if $form.f.password2.errors}{$form.f.password2.fieldErrors}{/if}
|
||||
{$form.f.password2|unsafe}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td><input type="submit" value="{trans 'Update Your Account'}" name="submit" /> | <a href="{url 'IDF_Views::index'}">{trans 'Cancel'}</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
{/block}
|
||||
{block context}
|
||||
<div class="issue-submit-info">
|
||||
<p>{trans 'If possible, use your real name. By using your real name, people will have more trust in your comments and remarks.'}</p>
|
||||
</div>{/block}
|
||||
{block javascript}<script type="text/javascript">
|
||||
document.getElementById('id_first_name').focus()
|
||||
</script>
|
||||
{/block}
|
||||
|
28
src/IDF/templates/user/public.html
Normal file
28
src/IDF/templates/user/public.html
Normal file
@@ -0,0 +1,28 @@
|
||||
{extends "base-simple.html"}
|
||||
{block body}
|
||||
<table class="form" summary="">
|
||||
<tr>
|
||||
<th></th>
|
||||
<td>{$member}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{trans 'Last time seen:'}</th>
|
||||
<td>{$member.last_login|dateago}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{trans 'Member since:'}</th>
|
||||
<td>{$member.date_joined|date}</td>
|
||||
</tr>
|
||||
</table>
|
||||
{/block}
|
||||
{block context}
|
||||
<div class="issue-submit-info">
|
||||
<p>{blocktrans}You are looking at the public profile of {$member}.{/blocktrans}</p>
|
||||
</div>
|
||||
<h2>{trans 'Projects'}</h2>
|
||||
<ul>{foreach $projects as $p}
|
||||
<li><a href="{url 'IDF_Views_Project::home', array($p.shortname)}">{$p}</a></li>
|
||||
{/foreach}</ul>
|
||||
{/block}
|
||||
|
||||
|
Reference in New Issue
Block a user