Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
GeoInt_SIDT
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Mario Chirinos Colunga
GeoInt_SIDT
Commits
0fcf10a9
Commit
0fcf10a9
authored
Mar 07, 2019
by
Ulises Morales Ramírez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mapa en modal
parent
e7ec368f
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
79 additions
and
172 deletions
+79
-172
dashboard.html
administration/templates/dashboard.html
+0
-49
users_table.html
administration/templates/users_table.html
+2
-2
User_profile.html
users/templates/User_profile.html
+5
-56
profile.html
users/templates/profile.html
+55
-54
users_aside.html
users/templates/users_aside.html
+8
-8
views.py
users/views.py
+9
-3
No files found.
administration/templates/dashboard.html
View file @
0fcf10a9
...
...
@@ -518,55 +518,6 @@
});
/*$(document).ready(function () {
var table = $('#example').DataTable
({
"ajax": data,
language:
{
"sProcessing": "Procesando...",
"sLengthMenu": "Mostrar _MENU_ registros",
"sZeroRecords": "No se encontraron resultados",
"sEmptyTable": "Ningún dato disponible en esta tabla",
"sInfo": "Mostrando registros del _START_ al _END_ de un total de _TOTAL_ registros",
"sInfoEmpty": "Mostrando registros del 0 al 0 de un total de 0 registros",
"sInfoFiltered": "(filtrado de un total de _MAX_ registros)",
"sInfoPostFix": "",
"sSearch": "Buscar:",
"sUrl": "",
"sInfoThousands": ",",
"sLoadingRecords": "Cargando...",
"oPaginate":
{
"sFirst": "Primero",
"sLast": "Último",
"sNext": "Siguiente",
"sPrevious": "Anterior"
},
"oAria":
{
"sSortAscending": ": Activar para ordenar la columna de manera ascendente",
"sSortDescending": ": Activar para ordenar la columna de manera descendente"
}
},
responsive:
{
details:
{
type: 'column',
target: 'tr'
}
},
columnDefs:
[{
className: 'control',
orderable: false,
targets: 0
}],
order: [1, 'asc']
});
});*/
// mostrar imagen al dar click en los puntos
document
.
getElementById
(
"salesChart"
).
onclick
=
function
(
evt
)
{
...
...
administration/templates/users_table.html
View file @
0fcf10a9
...
...
@@ -165,13 +165,13 @@
<td>
<button
title=
"save"
type=
"submit"
class=
"btn btn-success"
><i
class=
"fa fa-save"
></i></button>
<a
href=
"
#
"
class=
"btn btn-info"
title=
"View profile"
><i
<a
href=
"
{{ BASE_URL }}/users/{{ user.user_id }}
"
class=
"btn btn-info"
title=
"View profile"
><i
class=
"fa fa-user-circle"
></i></a>
</td>
</form>
</tr>
{% endfor %}
{% endfor %}
</tbody>
</table>
</div>
...
...
users/templates/User_profile.html
View file @
0fcf10a9
...
...
@@ -137,15 +137,16 @@
<div
class=
"nav-tabs-custom"
>
<ul
class=
"nav nav-tabs"
>
<li
class=
"active"
><a
href=
"#activity"
data-toggle=
"tab"
>
Activity
</a></li>
<li><a
href=
"#timeline"
data-toggle=
"tab"
>
Timeline
</a></li>
<li><a
href=
"#settings"
data-toggle=
"tab"
>
Settings
</a></li>
<
!--
li><a href="#timeline" data-toggle="tab">Timeline</a></li>
<li><a href="#settings" data-toggle="tab">Settings</a></li
--
>
</ul>
<div
class=
"tab-content"
>
<div
class=
"active tab-pane"
id=
"activity"
>
<!-- Post -->
<div
class=
"post"
>
<div
class=
"user-block"
>
<img
class=
"img-circle img-bordered-sm"
src=
"../../dist/img/user1-128x128.jpg"
<img
class=
"img-circle img-bordered-sm"
src=
"{% static 'users/images/user_default.png' %}"
alt=
"user image"
>
<span
class=
"username"
>
<a
href=
"#"
>
Jonathan Burke Jr.
</a>
...
...
@@ -165,59 +166,7 @@
</div>
<!-- /.post -->
<!-- Post -->
<div
class=
"post"
>
<div
class=
"user-block"
>
<img
class=
"img-circle img-bordered-sm"
src=
"../../dist/img/user6-128x128.jpg"
alt=
"User Image"
>
<span
class=
"username"
>
<a
href=
"#"
>
Adam Jones
</a>
<a
href=
"#"
class=
"pull-right btn-box-tool"
><i
class=
"fa fa-times"
></i></a>
</span>
<span
class=
"description"
>
Posted 5 photos - 5 days ago
</span>
</div>
<!-- /.user-block -->
<div
class=
"row margin-bottom"
>
<div
class=
"col-sm-6"
>
<img
class=
"img-responsive"
src=
"../../dist/img/photo1.png"
alt=
"Photo"
>
</div>
<!-- /.col -->
<div
class=
"col-sm-6"
>
<div
class=
"row"
>
<div
class=
"col-sm-6"
>
<img
class=
"img-responsive"
src=
"../../dist/img/photo2.png"
alt=
"Photo"
>
<br>
<img
class=
"img-responsive"
src=
"../../dist/img/photo3.jpg"
alt=
"Photo"
>
</div>
<!-- /.col -->
<div
class=
"col-sm-6"
>
<img
class=
"img-responsive"
src=
"../../dist/img/photo4.jpg"
alt=
"Photo"
>
<br>
<img
class=
"img-responsive"
src=
"../../dist/img/photo1.png"
alt=
"Photo"
>
</div>
<!-- /.col -->
</div>
<!-- /.row -->
</div>
<!-- /.col -->
</div>
<!-- /.row -->
<!--ul class="list-inline">
<li><a href="#" class="link-black text-sm"><i class="fa fa-share margin-r-5"></i>
Share</a></li>
<li><a href="#" class="link-black text-sm"><i
class="fa fa-thumbs-o-up margin-r-5"></i> Like</a>
</li>
<li class="pull-right">
<a href="#" class="link-black text-sm"><i
class="fa fa-comments-o margin-r-5"></i> Comments
(5)</a></li>
</ul-->
<!--input class="form-control input-sm" type="text" placeholder="Type a comment"-->
</div>
<!-- /.post -->
</div>
<!-- /.tab-pane -->
<div
class=
"tab-pane"
id=
"timeline"
>
...
...
users/templates/profile.html
View file @
0fcf10a9
{% load staticfiles %}
{% for data in user_data %}
<div
class=
"col-md-3"
>
<!-- Profile Image -->
<div
class=
"box box-primary"
>
<div
class=
"box-body box-profile"
>
<img
class=
"profile-user-img img-responsive img-circle"
src=
"{% static 'users/images/user_default.png' %}"
alt=
"User profile picture"
>
<h3
class=
"profile-username text-center"
>
{{ data.user_fullname }}
</h3>
<div
class=
"col-md-3"
>
<!-- Profile Image -->
<div
class=
"box box-primary"
>
<div
class=
"box-body box-profile"
>
<img
class=
"profile-user-img img-responsive img-circle"
src=
"{% static 'users/images/user_default.png' %}"
alt=
"User profile picture"
>
<h3
class=
"profile-username text-center"
>
{{ data.user_fullname }}
</h3>
<p
class=
"text-muted text-center"
>
Software Engineer
</p>
<p
class=
"text-muted text-center"
>
Software Engineer
</p>
<ul
class=
"list-group list-group-unbordered"
>
<li
class=
"list-group-item"
>
<b>
Searches
</b>
<a
class=
"pull-right"
>
{{ data.searches }}
</a>
</li>
<li
class=
"list-group-item"
>
<b>
Purchases
</b>
<a
class=
"pull-right"
>
{{ data.purchases }}
</a>
</li>
<li
class=
"list-group-item"
>
<b>
In Process
</b>
<a
class=
"pull-right"
>
{{ data.in_process }}
</a>
</li>
</ul>
<ul
class=
"list-group list-group-unbordered"
>
<li
class=
"list-group-item"
>
<b>
Searches
</b>
<a
class=
"pull-right"
>
{{ data.searches }}
</a>
</li>
<li
class=
"list-group-item"
>
<b>
Purchases
</b>
<a
class=
"pull-right"
>
{{ data.purchases }}
</a>
</li>
<li
class=
"list-group-item"
>
<b>
In Process
</b>
<a
class=
"pull-right"
>
{{ data.in_process }}
</a>
</li>
</ul>
<!--a href="#" class="btn btn-primary btn-block"><b>Follow</b></a-->
<!--a href="#" class="btn btn-primary btn-block"><b>Follow</b></a-->
</div>
<!-- /.box-body -->
</div>
<!-- /.box-body -->
</div>
<!-- /.box -->
<div>
<br>
</div>
<!-- About Me Box -->
<div
class=
"box box-primary"
>
<div
class=
"box-header with-border"
>
<h3
class=
"box-title"
>
About Me
</h3>
<!-- /.box -->
<div>
<br>
</div>
<!-- /.box-header -->
<div
class=
"box-body"
>
<strong><i
class=
"fa fa-book margin-r-5"
></i>
Education
</strong>
<!-- About Me Box -->
<div
class=
"box box-primary"
>
<div
class=
"box-header with-border"
>
<h3
class=
"box-title"
>
About Me
</h3>
</div>
<!-- /.box-header -->
<div
class=
"box-body"
>
<strong><i
class=
"fa fa-book margin-r-5"
></i>
Education
</strong>
<p
class=
"text-muted"
>
B.S. in Computer Science from the University of Tennessee at Knoxville
</p>
<p
class=
"text-muted"
>
B.S. in Computer Science from the University of Tennessee at Knoxville
</p>
<hr>
<hr>
<strong><i
class=
"fa fa-map-marker margin-r-5"
></i>
Location
</strong>
<strong><i
class=
"fa fa-map-marker margin-r-5"
></i>
Location
</strong>
<p
class=
"text-muted"
>
Malibu, California
</p>
<p
class=
"text-muted"
>
Malibu, California
</p>
<hr>
<hr>
<strong><i
class=
"fa fa-pencil margin-r-5"
></i>
Skills
</strong>
<strong><i
class=
"fa fa-pencil margin-r-5"
></i>
Skills
</strong>
<p>
<span
class=
"label label-danger"
>
UI Design
</span>
<span
class=
"label label-success"
>
Coding
</span>
<span
class=
"label label-info"
>
Javascript
</span>
<span
class=
"label label-warning"
>
PHP
</span>
<span
class=
"label label-primary"
>
Node.js
</span>
</p>
<p>
<span
class=
"label label-danger"
>
UI Design
</span>
<span
class=
"label label-success"
>
Coding
</span>
<span
class=
"label label-info"
>
Javascript
</span>
<span
class=
"label label-warning"
>
PHP
</span>
<span
class=
"label label-primary"
>
Node.js
</span>
</p>
<hr>
<hr>
<strong><i
class=
"fa fa-file-text-o margin-r-5"
></i>
Notes
</strong>
<strong><i
class=
"fa fa-file-text-o margin-r-5"
></i>
Notes
</strong>
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam fermentum enim neque.
</p>
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam fermentum enim neque.
</p>
</div>
<!-- /.box-body -->
</div>
<!-- /.box
-body
-->
<!-- /.box -->
</div>
<!-- /.box -->
</div>
{% endfor %}
\ No newline at end of file
users/templates/users_aside.html
View file @
0fcf10a9
<div
class=
"form-group"
>
<br>
<
!--
ul class="sidebar-menu" data-widget="tree">
<ul
class=
"sidebar-menu"
data-widget=
"tree"
>
<li>
<a class="treeview " href="{{ BASE_URL }}/
administration
">
<i class="fa fa-
home
"></i>
<span>
Dashboard
</span>
<a
class=
"treeview "
href=
"{{ BASE_URL }}/
reports
"
>
<i
class=
"fa fa-
files-o
"
></i>
<span>
Reports
</span>
<span
class=
"pull-right-container"
>
<span
class=
"label label-primary pull-right"
></span>
</span>
</a>
</li>
<li>
<a class="treeview " href="
../..
/administration/request">
<
!--
li>
<a class="treeview " href="
{{ BASE_URL }}
/administration/request">
<i class="fa fa-user-plus"></i>
<span>Request</span>
<span class="pull-right-container">
...
...
@@ -27,6 +27,6 @@
<span class="label label-primary pull-right"></span>
</span>
</a>
</li>
</ul
--
>
</li
--
>
</ul>
</div>
\ No newline at end of file
users/views.py
View file @
0fcf10a9
...
...
@@ -7,6 +7,7 @@ from catalog.models import Search, Purchase
def
Users
(
request
):
user_data
=
[]
user_statics
=
[]
user
=
User
.
objects
.
get
(
pk
=
request
.
user
.
id
)
searches
=
Search
.
objects
.
filter
(
user_id
=
user
.
id
)
...
...
@@ -14,7 +15,7 @@ def Users(request):
purchases
=
Purchase
.
objects
.
filter
(
user_id
=
user
.
id
)
in_process
=
Purchase
.
objects
.
filter
(
user_id
=
user
.
id
)
.
exclude
(
progress
=
100
)
print
(
searches
.
count
())
user_data
.
append
({
"user_fullname"
:
user
.
first_name
+
" "
+
user
.
last_name
,
"searches"
:
searches
.
count
(),
...
...
@@ -22,6 +23,12 @@ def Users(request):
"in_process"
:
in_process
.
count
(),
})
user_statics
.
append
({
"user_fullname"
:
user
.
first_name
+
" "
+
user
.
last_name
,
"searches"
:
searches
.
count
(),
"purchases"
:
purchases
.
count
(),
"in_process"
:
in_process
.
count
(),
})
return
render
(
request
,
'User_profile.html'
,{
"user_data"
:
user_data
}
)
...
...
@@ -32,10 +39,9 @@ def User_id(request,user_id):
searches
=
Search
.
objects
.
filter
(
user_id
=
user
.
id
)
purchases
=
Purchase
.
objects
.
filter
(
user_id
=
user
.
id
)
purchases
=
Purchase
.
objects
.
filter
(
user_id
=
user
.
id
)
.
order_by
(
'aggreg_date'
)
in_process
=
Purchase
.
objects
.
filter
(
user_id
=
user
.
id
)
.
exclude
(
progress
=
100
)
print
(
searches
.
count
())
user_data
.
append
({
"user_fullname"
:
user
.
first_name
+
" "
+
user
.
last_name
,
"searches"
:
searches
.
count
(),
...
...
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