Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
scheduling-system
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SMASCH
scheduling-system
Commits
b5fa274e
Commit
b5fa274e
authored
4 years ago
by
Carlos Vega
Browse files
Options
Downloads
Patches
Plain Diff
added table with the export log. fixes
#285
parent
3c765333
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!266
Resolve "Record who exports information and restrict who can export info."
Pipeline
#34003
failed
4 years ago
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
smash/web/templates/export/index.html
+75
-28
75 additions, 28 deletions
smash/web/templates/export/index.html
with
75 additions
and
28 deletions
smash/web/templates/export/index.html
+
75
−
28
View file @
b5fa274e
{% extends "_base.html" %}
{% load static %}
{% load filters %}
{% block styles %}
{{ block.super }}
<link
rel=
"stylesheet"
href=
"{% static 'css/export.css' %}"
>
<link
rel=
"stylesheet"
href=
"{% static 'AdminLTE/plugins/datatables/dataTables.bootstrap.css' %}"
>
<style
type=
"text/css"
>
ul
.list_of_fields
{
columns
:
3
;
...
...
@@ -92,37 +94,82 @@
<li><a
onclick=
"addFields(this, 'appointment_fields')"
href=
"{% url 'web.views.export_to_csv' 'appointments' %}"
><i
class=
"fa fa-file-text-o"
></i>
CSV -
Text based
</a></li>
</ul>
<h3>
Export Log
</h3>
<div
class=
"box-body"
>
<table
id=
"table"
class=
"table table-bordered table-striped"
>
<thead>
<tr>
<th>
Date
</th>
<th>
Author
</th>
<th>
Description
</th>
<th>
Request Path
</th>
</tr>
</thead>
<tbody>
{% for provenance in provenances %}
<tr>
<td
data-sort=
"{{ provenance.modification_date | timestamp }}"
>
{{ provenance.modification_date }}
</td>
<td>
{{ provenance.modification_author }}
</td>
<td>
{{ provenance.modification_description }}
</td>
<td>
{{ provenance.request_path }}
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
<div
class=
"box-body"
>
</div>
<script
type=
"text/javascript"
>
window
.
onload
=
function
()
{
$
(
'
.list_of_fields_header
'
).
tooltip
();
$
(
'
.list_of_fields_header
'
).
click
(
function
(
e
){
$
(
e
.
target
).
children
(
'
i.fa
'
).
toggleClass
(
'
fa-expand
'
);
$
(
e
.
target
).
children
(
'
i.fa
'
).
toggleClass
(
'
fa-compress
'
);
});
};
function
addFields
(
e
,
cls
){
var
fields
=
$
(
`.
${
cls
}
> li > input:checked`
).
map
(
function
(
i
,
e
){
return
e
.
value
;
}).
toArray
().
join
(
'
,
'
);
//remove parameters from previous calls if any
//attention: we are assuming the original url doesn't have any parameter
$
(
e
).
attr
(
'
href
'
,
function
()
{
return
this
.
href
.
split
(
'
?
'
)[
0
]
+
`?fields=
${
fields
}
`
;
});
}
function
toggleCheckboxes
(
e
){
if
(
$
(
e
).
text
().
toLowerCase
()
==
'
uncheck all
'
){
$
(
e
).
siblings
(
'
ul
'
).
find
(
'
input[type="checkbox"]
'
).
prop
(
'
checked
'
,
false
);
$
(
e
).
text
(
'
Check All
'
);
}
else
if
(
$
(
e
).
text
().
toLowerCase
()
==
'
check all
'
){
$
(
e
).
siblings
(
'
ul
'
).
find
(
'
input[type="checkbox"]
'
).
prop
(
'
checked
'
,
true
);
$
(
e
).
text
(
'
Uncheck All
'
);
}
}
</script>
{% endblock maincontent %}
{% block scripts %}
{{ block.super }}
<script
src=
"{% static 'AdminLTE/plugins/datatables/jquery.dataTables.min.js' %}"
></script>
<script
src=
"{% static 'AdminLTE/plugins/datatables/dataTables.bootstrap.min.js' %}"
></script>
<script>
window
.
onload
=
function
()
{
$
(
'
.list_of_fields_header
'
).
tooltip
();
$
(
'
.list_of_fields_header
'
).
click
(
function
(
e
){
$
(
e
.
target
).
children
(
'
i.fa
'
).
toggleClass
(
'
fa-expand
'
);
$
(
e
.
target
).
children
(
'
i.fa
'
).
toggleClass
(
'
fa-compress
'
);
});
};
function
addFields
(
e
,
cls
){
var
fields
=
$
(
`.
${
cls
}
> li > input:checked`
).
map
(
function
(
i
,
e
){
return
e
.
value
;
}).
toArray
().
join
(
'
,
'
);
//remove parameters from previous calls if any
//attention: we are assuming the original url doesn't have any parameter
$
(
e
).
attr
(
'
href
'
,
function
()
{
return
this
.
href
.
split
(
'
?
'
)[
0
]
+
`?fields=
${
fields
}
`
;
});
}
function
toggleCheckboxes
(
e
){
if
(
$
(
e
).
text
().
toLowerCase
()
==
'
uncheck all
'
){
$
(
e
).
siblings
(
'
ul
'
).
find
(
'
input[type="checkbox"]
'
).
prop
(
'
checked
'
,
false
);
$
(
e
).
text
(
'
Check All
'
);
}
else
if
(
$
(
e
).
text
().
toLowerCase
()
==
'
check all
'
){
$
(
e
).
siblings
(
'
ul
'
).
find
(
'
input[type="checkbox"]
'
).
prop
(
'
checked
'
,
true
);
$
(
e
).
text
(
'
Uncheck All
'
);
}
}
$
(
function
()
{
$
(
'
#table
'
).
DataTable
({
"
paging
"
:
true
,
"
lengthChange
"
:
false
,
"
searching
"
:
true
,
"
ordering
"
:
true
,
"
order
"
:
[[
0
,
"
desc
"
]],
"
info
"
:
true
,
"
autoWidth
"
:
false
});
});
</script>
{% endblock scripts %}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment