diff options
author | ankitjavalkar | 2020-05-29 10:42:50 +0530 |
---|---|---|
committer | GitHub | 2020-05-29 10:42:50 +0530 |
commit | e51665e93a259232385bc9ad6c80e0df732df217 (patch) | |
tree | d485a2c2e855212ff9280aa306488ab3e4a00a94 /workshop_app/templates | |
parent | baef78cbc06c1f71e9ef20990b55da3c7a2a17b2 (diff) | |
parent | c08966d1ed55e6acbf25cdd1c7ba9d5d97bedfce (diff) | |
download | workshop_booking-e51665e93a259232385bc9ad6c80e0df732df217.tar.gz workshop_booking-e51665e93a259232385bc9ad6c80e0df732df217.tar.bz2 workshop_booking-e51665e93a259232385bc9ad6c80e0df732df217.zip |
Merge pull request #142 from pnshiralkar/replace-cdn
Replace CDN with static
Diffstat (limited to 'workshop_app/templates')
7 files changed, 30 insertions, 51 deletions
diff --git a/workshop_app/templates/workshop_app/base.html b/workshop_app/templates/workshop_app/base.html index 398c38b..bce43bb 100644 --- a/workshop_app/templates/workshop_app/base.html +++ b/workshop_app/templates/workshop_app/base.html @@ -1,5 +1,6 @@ <!DOCTYPE html> <html> +{% load static %} <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <title> @@ -7,27 +8,23 @@ HomePage {% endblock %} </title> - <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" - integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous"> - <script src="https://code.jquery.com/jquery-3.4.1.slim.min.js" - integrity="sha384-J6qa4849blE2+poT4WnyKhv5vZF5SrPo0iEjwBvKU7imGFAV0wwj1yYfoRSJoZ+n" - crossorigin="anonymous"></script> - <script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js" - integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo" - crossorigin="anonymous"></script> + <link rel="stylesheet" href="{% static 'workshop_app/css/bootstrap.min.css' %}"> + <script src="{% static 'workshop_app/js/jquery-3.4.1.slim.min.js' %}"></script> + <script src="{% static 'workshop_app/js/popper.min.js' %}"></script> + {% block extra-dependencies %} {% endblock %} - <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js" - integrity="sha384-wfSDF2E50Y2D1uUdj0O3uMBJnjuUD4Ih7YwaYd1iqfktj0Uod8GCExl3Og8ifwB6" - crossorigin="anonymous"></script> - <link href="https://fonts.googleapis.com/icon?family=Material+Icons" - rel="stylesheet"> - <link rel="stylesheet" href="{{ URL_ROOT }}/static/workshop_app/css/base.css" type="text/css"/> + + <script src="{% static 'workshop_app/js/bootstrap.min.js' %}"></script> + <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet"> + <link rel="stylesheet" href="{% static 'workshop_app/css/base.css' %}" type="text/css"/> <!-- favicon --> <link rel="shortcut icon" type="image/png" href="{{ URL_ROOT }}/static/workshop_app/img/fevicon_python.png"/> + {% block extra-custom-scripts %} {% endblock %} + </head> <body style="overflow: scroll;"> @@ -43,7 +40,7 @@ <ul class="navbar-nav mr-auto"> {% if request.user.profile.position == 'coordinator' %} <li class="nav-item"> - <a class="nav-link" href="{% url 'workshop_status_coordinator' %}">Workshop Status</a> + <a class="nav-link" href="{% url 'workshop_status_instructor' %}">Workshop Status</a> </li> <li class="nav-item"> <a class="nav-link" href="{% url 'propose_workshop' %}">Propose Workshop</a> @@ -91,11 +88,10 @@ </nav> {% endblock %} -<div class="container-fluid" style="margin-bottom: 44px"> - {% block content %} - <h1>Base Template Content. Please override me</h1> - {% endblock %} -</div> +{% block content %} + <h1>Base Template Content. Please override me</h1> +{% endblock %} + </body> <footer class="footer"> diff --git a/workshop_app/templates/workshop_app/edit_profile.html b/workshop_app/templates/workshop_app/edit_profile.html index 4c1ab45..6689619 100644 --- a/workshop_app/templates/workshop_app/edit_profile.html +++ b/workshop_app/templates/workshop_app/edit_profile.html @@ -4,11 +4,6 @@ Edit Profile {% endblock %} -{% block extra %} -<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script> -<script src="{{URL_ROOT}}/static/workshop_app/js/bootstrap-3.3.7.min.js"></script> -{% endblock %} - {% block content %} <div class="container"> <form action="{{URL_ROOT}}/edit_profile/" method="post" > diff --git a/workshop_app/templates/workshop_app/edit_workshop_type.html b/workshop_app/templates/workshop_app/edit_workshop_type.html index b756f39..90900e4 100644 --- a/workshop_app/templates/workshop_app/edit_workshop_type.html +++ b/workshop_app/templates/workshop_app/edit_workshop_type.html @@ -1,4 +1,5 @@ {% extends 'workshop_app/base.html' %} +{% load static %} {% block title %} Add new Workshop type @@ -9,7 +10,7 @@ {% block extra-custom-scripts %} - <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery.formset/1.2.2/jquery.formset.js"></script> + <script src="{% static 'workshop_app/js/jquery.formset.js' %}"></script> {% endblock %} {% block content %} diff --git a/workshop_app/templates/workshop_app/propose_workshop.html b/workshop_app/templates/workshop_app/propose_workshop.html index 8b704f1..ec2e8ca 100644 --- a/workshop_app/templates/workshop_app/propose_workshop.html +++ b/workshop_app/templates/workshop_app/propose_workshop.html @@ -1,13 +1,14 @@ {% extends "workshop_app/base.html" %} +{% load static %} {% block title %} Propose a workshop {% endblock %} {% block extra-dependencies %} - <link rel="stylesheet" href="https://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css"> - <script src="https://code.jquery.com/jquery-1.12.4.js"></script> - <script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js"></script> + <link rel="stylesheet" href="{% static 'workshop_app/css/jquery-ui.css' %}" type="text/css"/> + <script src="{% static 'workshop_app/js/jquery-1.12.4.js' %}"></script> + <script src="{% static 'workshop_app/js/jquery-ui.min.js' %}"></script> {% endblock %} {% block extra-custom-scripts %} diff --git a/workshop_app/templates/workshop_app/view_profile.html b/workshop_app/templates/workshop_app/view_profile.html index 9330cb0..f597e65 100644 --- a/workshop_app/templates/workshop_app/view_profile.html +++ b/workshop_app/templates/workshop_app/view_profile.html @@ -4,12 +4,6 @@ Coordinator Profile {% endblock %} - -{% block extra %} - <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script> - <script src="{{ URL_ROOT }}/static/workshop_app/js/bootstrap-3.3.7.min.js"></script> -{% endblock %} - {% csrf_token %} {% block content %} diff --git a/workshop_app/templates/workshop_app/workshop_status_instructor.html b/workshop_app/templates/workshop_app/workshop_status_instructor.html index 8657b8d..8818fb3 100644 --- a/workshop_app/templates/workshop_app/workshop_status_instructor.html +++ b/workshop_app/templates/workshop_app/workshop_status_instructor.html @@ -1,4 +1,5 @@ {% extends "workshop_app/base.html" %} +{% load static %} {% block title %} Workshop Status @@ -10,9 +11,9 @@ color: #04a9cf; } </style> - <link rel="stylesheet" href="https://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css"> - <script src="https://code.jquery.com/jquery-1.12.4.js"></script> - <script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js"></script> + <link rel="stylesheet" href="{% static 'workshop_app/css/jquery-ui.css' %}" type="text/css"/> + <script src="{% static 'workshop_app/js/jquery-1.12.4.js' %}"></script> + <script src="{% static 'workshop_app/js/jquery-ui.min.js' %}"></script> {% endblock %} {% block extra-custom-scripts %} {% load static %} @@ -42,9 +43,9 @@ <table class="table table-striped"> <thead> <tr> - <th>Workshop Name</th> <th>Coordinator Name</th> <th>Institute</th> + <th>Workshop Name</th> <th>Workshop Day</th> <th>Status</th> </tr> @@ -53,12 +54,12 @@ <tbody> <tr> {% if workshop.status %} - <td><a href="{% url 'workshop_details' workshop.id %}" >{{ workshop.workshop_type |capfirst }}</a></td> <td> <a href="{% url 'view_profile' workshop.coordinator.profile.user.id %}"> {{ workshop.coordinator.get_full_name }}</a> </td> <td>{{ workshop.coordinator.profile.institute }}</td> + <td>{{ workshop.workshop_type |capfirst }}</td> <td>{{ workshop.date | date }} {% if workshop.date > today %} @@ -97,9 +98,9 @@ <table class="table table-striped"> <thead> <tr> - <th>Workshop Name</th> <th>Coordinator Name</th> <th>Institute</th> + <th>Workshop Name</th> <th>Workshop Day</th> <th>Status</th> <th>Action</th> @@ -110,12 +111,12 @@ <tbody> <tr> {% if not workshop.status and workshop.tnc_accepted %} - <td><a href="{% url 'workshop_details' workshop.id %}" >{{ workshop.workshop_type |capfirst }}</a></td> <td> <a href="{% url 'view_profile' workshop.coordinator.profile.user.id %}"> {{ workshop.coordinator.get_full_name }}</a> </td> <td>{{ workshop.coordinator.profile.institute }}</td> + <td>{{ workshop.workshop_type }}</td> <td>{{ workshop.date | date }}</td> <td><span class="badge badge-warning">{{ workshop.get_status }}</span></td> <td> diff --git a/workshop_app/templates/workshop_app/workshop_type_details.html b/workshop_app/templates/workshop_app/workshop_type_details.html index 298d976..f27e6b3 100644 --- a/workshop_app/templates/workshop_app/workshop_type_details.html +++ b/workshop_app/templates/workshop_app/workshop_type_details.html @@ -4,15 +4,6 @@ View Workshop details {% endblock %} - -{% block extra %} - - <!-- <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"> --> - - <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script> - <script src="{{ URL_ROOT }}/static/workshop_app/js/bootstrap-3.3.7.min.js"></script> -{% endblock %} - {% block content %} <div class="container"> <h2 class="text-center m-3">Workshop Details</h2> |