1
0
Fork 0
satnogs-db/db/templates/base/modals/transmitter_update.html

69 lines
2.8 KiB
HTML
Raw Normal View History

{% load static %}
New SatNOGS DB user interface Initial commit of new UI. There is still some work to be done before this goes into dev, but here is the work so far: * Updated dependencies to latest 2.x django * Updated to Bootstrap 4 * New home screen to display most recent satellite entries, most recent data, and contributors * Adopted django-bootstrap-modal-forms for handling satellite and transmitter creation and update, with more of an emphasis on django's model/view/form model - and a dynamic flow where the modals and details are only loaded when the proper icon is clicked, reducing the overall page size * Adopted AdminLTE 3.x framework atop Bootstrap 4 * Created reusable cards for satellite and transmitters * Cards and Modals are organized into subdirectories for template includes and base templates, respectively * New stats display widgets using BS4 and AdminLTE 3 * Satellite search is redesigned and now accessible from any page of the site * Introduced datatables for an "All Satellites" view and a modification of the new "All Transmitters" view * Focus on all UI scaling down to mobile devices * New model created for Operator (/ Owner): name, names, description, website * Added django-countries for support of CountryField * Satellite model expanded to include: Operator, (satellite) website, countries, launched datetime, deployed datetime * Transmitter suggestions can now be approved in the UI by superusers * Satellite entries can now be edited in the UI by users with the change satellite permission * Satellite page is now broken into 'tabbed' panels (Profile, Map, Transmitters, etc) - with the tab menu options appearing in the sidebar or at the top depending on screen size * Other cleanup and changes that I'm missing for sure. Signed-off-by: Corey Shields <cshields@gmail.com>
2020-07-25 16:08:44 -06:00
{% load widget_tweaks %}
{% if request.user.is_authenticated %}
<form action="" method="post" id="transmitter_update-form">
New SatNOGS DB user interface Initial commit of new UI. There is still some work to be done before this goes into dev, but here is the work so far: * Updated dependencies to latest 2.x django * Updated to Bootstrap 4 * New home screen to display most recent satellite entries, most recent data, and contributors * Adopted django-bootstrap-modal-forms for handling satellite and transmitter creation and update, with more of an emphasis on django's model/view/form model - and a dynamic flow where the modals and details are only loaded when the proper icon is clicked, reducing the overall page size * Adopted AdminLTE 3.x framework atop Bootstrap 4 * Created reusable cards for satellite and transmitters * Cards and Modals are organized into subdirectories for template includes and base templates, respectively * New stats display widgets using BS4 and AdminLTE 3 * Satellite search is redesigned and now accessible from any page of the site * Introduced datatables for an "All Satellites" view and a modification of the new "All Transmitters" view * Focus on all UI scaling down to mobile devices * New model created for Operator (/ Owner): name, names, description, website * Added django-countries for support of CountryField * Satellite model expanded to include: Operator, (satellite) website, countries, launched datetime, deployed datetime * Transmitter suggestions can now be approved in the UI by superusers * Satellite entries can now be edited in the UI by users with the change satellite permission * Satellite page is now broken into 'tabbed' panels (Profile, Map, Transmitters, etc) - with the tab menu options appearing in the sidebar or at the top depending on screen size * Other cleanup and changes that I'm missing for sure. Signed-off-by: Corey Shields <cshields@gmail.com>
2020-07-25 16:08:44 -06:00
{% csrf_token %}
<div class="modal-header">
<h3 class="modal-title">Update Transmitter</h3>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<div class="{% if form.non_field_errors %}invalid{% endif %} mb-2">
{% for error in form.non_field_errors %}
{{ error }}
{% endfor %}
</div>
{% for field in form %}
{% if 'drift' in field.id_for_label %}
<div class="input-group my-1"
{% if field.help_text %}
data-toggle="tooltip" data-placement="bottom" title="Drifted frequency, when different from the published frequency"
{% endif %}
>
<label class="input-group-prepend input-group-text" for="{{ field.id_for_label }}_hz">{{ field.label }} freq.</label>
<input type="number" name="{{ field.name }}_hz" min="-9223372036854775808" max="9223372036854775807"
placeholder="Drifted Frequency" class="form-control" id="{{ field.id_for_label }}_hz">
<label class="input-group-text input-group-append">Hz</label>
</div>
{% endif %}
<div class="input-group my-1"
{% if field.help_text %}
data-toggle="tooltip" data-placement="bottom" title="{{ field.help_text }}"
{% endif %}
>
New SatNOGS DB user interface Initial commit of new UI. There is still some work to be done before this goes into dev, but here is the work so far: * Updated dependencies to latest 2.x django * Updated to Bootstrap 4 * New home screen to display most recent satellite entries, most recent data, and contributors * Adopted django-bootstrap-modal-forms for handling satellite and transmitter creation and update, with more of an emphasis on django's model/view/form model - and a dynamic flow where the modals and details are only loaded when the proper icon is clicked, reducing the overall page size * Adopted AdminLTE 3.x framework atop Bootstrap 4 * Created reusable cards for satellite and transmitters * Cards and Modals are organized into subdirectories for template includes and base templates, respectively * New stats display widgets using BS4 and AdminLTE 3 * Satellite search is redesigned and now accessible from any page of the site * Introduced datatables for an "All Satellites" view and a modification of the new "All Transmitters" view * Focus on all UI scaling down to mobile devices * New model created for Operator (/ Owner): name, names, description, website * Added django-countries for support of CountryField * Satellite model expanded to include: Operator, (satellite) website, countries, launched datetime, deployed datetime * Transmitter suggestions can now be approved in the UI by superusers * Satellite entries can now be edited in the UI by users with the change satellite permission * Satellite page is now broken into 'tabbed' panels (Profile, Map, Transmitters, etc) - with the tab menu options appearing in the sidebar or at the top depending on screen size * Other cleanup and changes that I'm missing for sure. Signed-off-by: Corey Shields <cshields@gmail.com>
2020-07-25 16:08:44 -06:00
<label class="input-group-prepend input-group-text" for="{{ field.id_for_label }}">{{ field.label }}</label>
{% render_field field class="form-control" placeholder=field.label %}
{% if 'drift' in field.id_for_label %}
<label class="input-group-text input-group-append">PPB</label>
{% elif 'low' in field.id_for_label or 'high' in field.id_for_label %}
<label class="input-group-text input-group-append">Hz</label>
{% endif %}
New SatNOGS DB user interface Initial commit of new UI. There is still some work to be done before this goes into dev, but here is the work so far: * Updated dependencies to latest 2.x django * Updated to Bootstrap 4 * New home screen to display most recent satellite entries, most recent data, and contributors * Adopted django-bootstrap-modal-forms for handling satellite and transmitter creation and update, with more of an emphasis on django's model/view/form model - and a dynamic flow where the modals and details are only loaded when the proper icon is clicked, reducing the overall page size * Adopted AdminLTE 3.x framework atop Bootstrap 4 * Created reusable cards for satellite and transmitters * Cards and Modals are organized into subdirectories for template includes and base templates, respectively * New stats display widgets using BS4 and AdminLTE 3 * Satellite search is redesigned and now accessible from any page of the site * Introduced datatables for an "All Satellites" view and a modification of the new "All Transmitters" view * Focus on all UI scaling down to mobile devices * New model created for Operator (/ Owner): name, names, description, website * Added django-countries for support of CountryField * Satellite model expanded to include: Operator, (satellite) website, countries, launched datetime, deployed datetime * Transmitter suggestions can now be approved in the UI by superusers * Satellite entries can now be edited in the UI by users with the change satellite permission * Satellite page is now broken into 'tabbed' panels (Profile, Map, Transmitters, etc) - with the tab menu options appearing in the sidebar or at the top depending on screen size * Other cleanup and changes that I'm missing for sure. Signed-off-by: Corey Shields <cshields@gmail.com>
2020-07-25 16:08:44 -06:00
<div class="{% if field.errors %} invalid{% endif %}">
{% for error in field.errors %}
<p class="help-block">{{ error }}</p>
{% endfor %}
</div>
</div>
{% endfor %}
</div>
<div class="modal-footer">
<button type="submit" class="btn btn-satnogs-primary">Update</button>
New SatNOGS DB user interface Initial commit of new UI. There is still some work to be done before this goes into dev, but here is the work so far: * Updated dependencies to latest 2.x django * Updated to Bootstrap 4 * New home screen to display most recent satellite entries, most recent data, and contributors * Adopted django-bootstrap-modal-forms for handling satellite and transmitter creation and update, with more of an emphasis on django's model/view/form model - and a dynamic flow where the modals and details are only loaded when the proper icon is clicked, reducing the overall page size * Adopted AdminLTE 3.x framework atop Bootstrap 4 * Created reusable cards for satellite and transmitters * Cards and Modals are organized into subdirectories for template includes and base templates, respectively * New stats display widgets using BS4 and AdminLTE 3 * Satellite search is redesigned and now accessible from any page of the site * Introduced datatables for an "All Satellites" view and a modification of the new "All Transmitters" view * Focus on all UI scaling down to mobile devices * New model created for Operator (/ Owner): name, names, description, website * Added django-countries for support of CountryField * Satellite model expanded to include: Operator, (satellite) website, countries, launched datetime, deployed datetime * Transmitter suggestions can now be approved in the UI by superusers * Satellite entries can now be edited in the UI by users with the change satellite permission * Satellite page is now broken into 'tabbed' panels (Profile, Map, Transmitters, etc) - with the tab menu options appearing in the sidebar or at the top depending on screen size * Other cleanup and changes that I'm missing for sure. Signed-off-by: Corey Shields <cshields@gmail.com>
2020-07-25 16:08:44 -06:00
</div>
</form>
<script src="{% static 'js/transmitter_modal.js' %}"></script>
New SatNOGS DB user interface Initial commit of new UI. There is still some work to be done before this goes into dev, but here is the work so far: * Updated dependencies to latest 2.x django * Updated to Bootstrap 4 * New home screen to display most recent satellite entries, most recent data, and contributors * Adopted django-bootstrap-modal-forms for handling satellite and transmitter creation and update, with more of an emphasis on django's model/view/form model - and a dynamic flow where the modals and details are only loaded when the proper icon is clicked, reducing the overall page size * Adopted AdminLTE 3.x framework atop Bootstrap 4 * Created reusable cards for satellite and transmitters * Cards and Modals are organized into subdirectories for template includes and base templates, respectively * New stats display widgets using BS4 and AdminLTE 3 * Satellite search is redesigned and now accessible from any page of the site * Introduced datatables for an "All Satellites" view and a modification of the new "All Transmitters" view * Focus on all UI scaling down to mobile devices * New model created for Operator (/ Owner): name, names, description, website * Added django-countries for support of CountryField * Satellite model expanded to include: Operator, (satellite) website, countries, launched datetime, deployed datetime * Transmitter suggestions can now be approved in the UI by superusers * Satellite entries can now be edited in the UI by users with the change satellite permission * Satellite page is now broken into 'tabbed' panels (Profile, Map, Transmitters, etc) - with the tab menu options appearing in the sidebar or at the top depending on screen size * Other cleanup and changes that I'm missing for sure. Signed-off-by: Corey Shields <cshields@gmail.com>
2020-07-25 16:08:44 -06:00
{% else %}
<div class="modal-body">
<div class="text-danger">You need to login first to add a new transmitter suggestion.</div>
</div>
<div class="modal-footer">
<button class="btn btn-outline-secondary" data-dismiss="modal">Close</button>
<a href="{% url 'account_login' %}" class="btn btn-satnogs-primary">Log In</a>
</div>
{% endif %}