Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SRCT
go
Commits
6881b662
Commit
6881b662
authored
Jan 02, 2017
by
David Haynes
Browse files
Merge remote-tracking branch 'origin/2.2-dev' into 40-python3port
parents
78becf69
744837fe
Changes
4
Hide whitespace changes
Inline
Side-by-side
go/go/templates/admin/useradmin.html
View file @
6881b662
...
...
@@ -25,7 +25,7 @@ SRCT Go • Administration Panel
</div>
<!-- T
ABLE
1 -->
<!-- T
able
1 -->
<!-- define the div where we can select users from a table to judge them -->
<div
class=
"row"
>
<div
class=
"col-md-12"
>
...
...
@@ -80,9 +80,8 @@ SRCT Go • Administration Panel
</div>
</div>
<!-- TABLE 2 -->
<!-- define the table that displays blocked users and allows us to unblock
them -->
<!-- Table 2 -->
<!-- define the table that displays blocked users and allows us to unblock them -->
<div
class=
"row"
>
<div
class=
"col-md-12"
>
<h3>
Blocked Users
</h3>
...
...
@@ -99,6 +98,7 @@ them -->
<th>
Username
</th>
<th>
Full Name
</th>
<th>
Description
</th>
<th>
Approved
</th>
</tr>
</thead>
...
...
@@ -111,6 +111,7 @@ them -->
<td>
{{ blockedUsers.user }}
</td>
<td>
{{ blockedUsers.full_name }}
</td>
<td>
{{ blockedUsers.description|default:"No description provided" }}
</td>
<td>
{{ blockedUsers.approved }}
</td>
</tr>
<!-- unless there are no blocked users -->
{% empty %}
...
...
@@ -119,6 +120,7 @@ them -->
<td>
none
</td>
<td>
none
</td>
<td>
none
</td>
<td>
none
</td>
</tr>
{% endfor %}
</tbody>
...
...
@@ -132,7 +134,7 @@ them -->
</div>
</div>
<!-- T
ABLE
3 -->
<!-- T
able
3 -->
<!-- define the table of current users -->
<div
class=
"row"
>
<div
class=
"col-md-12"
>
...
...
go/go/templates/core/about.html
View file @
6881b662
...
...
@@ -104,7 +104,7 @@ SRCT Go • About
Go 1.0:
<br
/>
<a
href=
"https://github.com/jrouly"
>
Michel Rouley
</a>
,
<a
href=
"https://github.com/creffett"
>
Chris Reffet
</a>
,
<a
href=
"https://github.com/creffett"
>
Chris Reffet
t
</a>
,
<a
href=
"https://github.com/nanderson94"
>
Nicholas Anderson
</a>
,
and
<a
href=
"https://github.com/akshaykarthik"
>
Akshay Karthik
</a>
.
<br></br>
...
...
go/go/templates/my_links.html
View file @
6881b662
...
...
@@ -22,6 +22,9 @@ SRCT Go • My Links
</strong></h1>
</div>
</div>
<div
class=
"newlink"
style=
"text-align: right;"
>
<a
href=
"{% url 'index' %}"
><i
class=
"fa fa-plus"
aria-hidden=
"true"
></i>
Add new link
</a>
</div>
</div>
<!-- show all of the links -->
...
...
go/go/views.py
View file @
6881b662
...
...
@@ -340,13 +340,13 @@ def useradmin(request):
settings
.
EMAIL_FROM
,
[
user_mail
]
)
# If we're denying users
elif
'_deny'
in
request
.
POST
:
for
name
in
userlist
:
toDeny
=
RegisteredUser
.
objects
.
get
(
user__username__exact
=
name
)
if
settings
.
EMAIL_HOST
and
settings
.
EMAIL_PORT
:
user_mail
=
toDeny
.
user
.
username
+
settings
.
EMAIL_DOMAIN
# Send an email letting them know they are denied
send_mail
(
'Your Account has been Denied!'
,
...
...
@@ -365,6 +365,7 @@ def useradmin(request):
# Delete their associated RegisteredUsers
toDeny
.
user
.
delete
()
return
HttpResponseRedirect
(
'useradmin'
)
# If we're blocking users
elif
'_block'
in
request
.
POST
:
for
name
in
userlist
:
...
...
@@ -387,9 +388,8 @@ def useradmin(request):
)
# toBlock.user.delete()
toBlock
.
blocked
=
True
toBlock
.
approved
=
False
toBlock
.
registered
=
False
toBlock
.
save
()
# If we're un-blocking users
elif
'_unblock'
in
request
.
POST
:
for
name
in
userlist
:
...
...
@@ -436,10 +436,12 @@ def useradmin(request):
)
toRemove
.
user
.
delete
()
return
HttpResponseRedirect
(
'useradmin'
)
# Get a list of all RegisteredUsers that need to be approved
need_approval
=
RegisteredUser
.
objects
.
filter
(
registered
=
True
).
filter
(
approved
=
False
)
# Get a list of all RegisteredUsers that need to be approved
need_approval
=
RegisteredUser
.
objects
.
filter
(
registered
=
True
).
filter
(
approved
=
False
).
filter
(
blocked
=
False
)
# Get a list of all RegisteredUsers that are currently users
current_users
=
RegisteredUser
.
objects
.
filter
(
approved
=
True
).
filter
(
registered
=
True
).
filter
(
blocked
=
False
)
# Get a list of all RegisteredUsers that are blocked
blocked_users
=
RegisteredUser
.
objects
.
filter
(
blocked
=
True
)
# Pass that list to the template
...
...
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