Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
R
re2o
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Nounous
re2o
Commits
024d7a07
Commit
024d7a07
authored
Jun 30, 2018
by
grisel-davy
Committed by
Maël Kervella
Jul 30, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
frontend sur l'affichage des options mail
parent
ec947139
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
47 additions
and
22 deletions
+47
-22
preferences/templates/preferences/display_preferences.html
preferences/templates/preferences/display_preferences.html
+6
-2
users/templates/users/profil.html
users/templates/users/profil.html
+37
-17
users/views.py
users/views.py
+4
-3
No files found.
preferences/templates/preferences/display_preferences.html
View file @
024d7a07
...
...
@@ -56,9 +56,13 @@ with this program; if not, write to the Free Software Foundation, Inc.,
<th>
Creations de clubs par tous
</th>
<td>
{{ useroptions.all_can_create_club|tick }}
</td>
</tr>
<h5>
{% if useroptions.mail_accounts %}
<span
class=
"label label-success"
>
Comptes mails{% else %}
<span
class=
"label label-danger"
>
Comptes mails{% endif%}
</span></h5>
<table
class=
"table table-striped"
>
<tr>
<th>
Extension mail interne
</th>
<td>
{{ useroptions.mail_extension }}
</td>
<th>
Gestion des comptes mails
</th>
<td>
{{ useroptions.mail_accounts }}
</td>
<th>
Extension mail interne
</th>
<td>
{{ useroptions.mail_extension }}
</td>
</tr>
</table>
...
...
users/templates/users/profil.html
View file @
024d7a07
...
...
@@ -408,10 +408,10 @@ with this program; if not, write to the Free Software Foundation, Inc.,
</div>
<div
class=
"panel panel-default"
>
<div
class=
"panel-heading clearfix"
data-parent=
"#accordion"
data-toggle=
"collapse"
data-target=
"#collapse7"
>
<h3
class=
"panel-title pull-left"
>
<h3
class=
"panel-title pull-left"
>
<i
class=
"fa fa-envelope"
></i>
Gestion des mails
</h3>
Paramètres mail
</h3>
</div>
<div
id=
"collapse7"
class=
"panel-collapse collapse"
>
<div
class=
"panel-body"
>
...
...
@@ -421,19 +421,26 @@ with this program; if not, write to the Free Software Foundation, Inc.,
Modifier les options mail
</a>
{% acl_end %}
<div
class=
"table-responsive"
>
<table
class=
"table"
>
<tr>
<th>
Adresse mail externe
</th>
<th>
Compte mail {{ asso_name }}
</th>
<th>
Adresse mail de contact
</th>
</tr>
<tr>
<td>
{{ user.mail.external_mail }}
</td>
<td>
{{ user.mail.internal_address|yesno:"Activé,Désactivé" }}
</td>
<td>
{{ user.mail.external_mail }}
</td>
</table>
</div>
{% if mail_accounts %}
<div
class=
"table-responsive"
>
<table
class=
"table"
>
<tr>
<th>
Adresse mail externe
</th>
<th>
Compte mail {{ asso_name }}
</th>
<th>
Adresse mail de contact
</th>
</tr>
<tr>
<td>
{{ user.external_mail }}
</td>
<td>
{{ user.internal_address|yesno:"Activé,Désactivé" }}
</td>
<td>
{{ user.get_mail }}
</td>
</table>
<div
class=
"alert alert-info"
role=
"alert"
>
Vous pouvez bénéficier d'une adresse mail {{ asso_name }}.
Vous pouvez également la rediriger vers une adresse externe en modifiant les options mail.
</div>
</div>
{% if user.internal_address %}
{% can_create MailAlias %}
<a
class=
"btn btn-primary btn-sm"
role=
"button"
href=
"{% url 'users:add-mailalias' users.id %}"
>
<i
class=
"fa fa-plus-square"
></i>
...
...
@@ -443,7 +450,20 @@ with this program; if not, write to the Free Software Foundation, Inc.,
{% if alias_list %}
{% include "users/aff_alias.html" with alias_list=alias_list %}
{% endif %}
</div>
{% endif %}
{% else %}
<div
class=
"table-responsive"
>
<table
class=
"table"
>
<tr>
<th>
Adresse mail
</th>
</tr>
<tr>
<td>
{{ user.external_mail }}
</td>
</tr>
</table>
</div>
{% endif %}
</div>
</div>
</div>
</div>
...
...
users/views.py
View file @
024d7a07
...
...
@@ -570,13 +570,13 @@ def edit_mail(request, mail_instance, **_kwargs):
if
mail
.
is_valid
():
if
mail
.
changed_data
:
mail
.
save
()
messages
.
success
(
request
,
"
Compte
mail modifiée"
)
messages
.
success
(
request
,
"
Option
mail modifiée"
)
return
redirect
(
reverse
(
'users:profil'
,
kwargs
=
{
'userid'
:
str
(
user_instance
.
id
)}
))
return
form
(
{
'userform'
:
mail
,
'action_name'
:
'Editer
un compte
mail'
},
{
'userform'
:
mail
,
'action_name'
:
'Editer
les options
mail'
},
'users/user.html'
,
request
)
...
...
@@ -1006,7 +1006,8 @@ def profil(request, users, **_kwargs):
'asso_name'
:
AssoOption
.
objects
.
first
().
name
'allow_online_payment'
:
allow_online_payment
,
'asso_name'
:
AssoOption
.
objects
.
first
().
name
,
'alias_list'
:
users
.
mail
.
mailalias_set
.
all
()
'alias_list'
:
users
.
mailalias_set
.
all
(),
'mail_accounts'
:
OptionalUser
.
objects
.
first
().
mail_accounts
}
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment