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
46c89973
Commit
46c89973
authored
Nov 17, 2016
by
David Haynes
Browse files
Add comments to the index file
- fairly simple again, though there's some inline js that needs to be moved out
parent
32731a37
Pipeline
#477
passed with stage
in 7 minutes and 10 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
go/go/templates/core/index.html
View file @
46c89973
<!-- include the base html template -->
{% extends 'layouts/base.html' %}
{% extends 'layouts/base.html' %}
<!-- load django crispy forms' tags -->
{% load crispy_forms_tags %}
{% load crispy_forms_tags %}
<!-- define the page title block -->
{% block title %}
{% block title %}
SRCT Go
•
A University Branded URL Shortener
SRCT Go
•
A University Branded URL Shortener
{% endblock %}
{% endblock %}
<!-- define the content block for the page -->
{% block content %}
{% block content %}
<script
type=
"text/javascript"
>
$
(
function
()
{
$
(
"
div_id_expires_custom
"
).
hide
();
if
(
$
(
"
#id_expires_5
"
).
is
(
"
:checked
"
))
{
$
(
"
#div_id_expires_custom
"
).
slideDown
();
}
else
{
$
(
"
#div_id_expires_custom
"
).
slideUp
();
}
$
(
"
#div_id_expires
"
).
click
(
function
()
{
if
(
$
(
"
#id_expires_5
"
).
is
(
"
:checked
"
))
{
$
(
"
#div_id_expires_custom
"
).
slideDown
();
}
else
{
$
(
"
#div_id_expires_custom
"
).
slideUp
();
}
})
})
</script>
<!-- define the page header div -->
<div
class=
"page-header"
id=
"banner"
>
<div
class=
"page-header"
id=
"banner"
>
<div
class=
"row"
>
<div
class=
"row"
>
<div
class=
"col-md-12"
>
<div
class=
"col-md-12"
>
...
@@ -38,6 +27,36 @@ $(function() {
...
@@ -38,6 +27,36 @@ $(function() {
</div>
</div>
</div>
</div>
<!-- call django crispy forms to render the go link creation form here -->
{% crispy form %}
{% crispy form %}
<!-- load some JS to hide/show the custom date field -->
<script
type=
"text/javascript"
>
$
(
function
()
{
// hide by default
$
(
"
div_id_expires_custom
"
).
hide
();
// if the expires_custom checkbox is checked..
if
(
$
(
"
#id_expires_5
"
).
is
(
"
:checked
"
))
{
// display the field
$
(
"
#div_id_expires_custom
"
).
slideDown
();
}
else
{
// keep it up
$
(
"
#div_id_expires_custom
"
).
slideUp
();
}
// if the expires_custom checkbox is clicked..
$
(
"
#div_id_expires
"
).
click
(
function
()
{
// if the expires_custom checkbox is checked..
if
(
$
(
"
#id_expires_5
"
).
is
(
"
:checked
"
))
{
// display the field
$
(
"
#div_id_expires_custom
"
).
slideDown
();
}
else
{
// keep it hidden
$
(
"
#div_id_expires_custom
"
).
slideUp
();
}
})
})
</script>
{% endblock %}
{% endblock %}
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