mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-01-27 18:32:16 +00:00
More refactoring of rigboard
This commit is contained in:
@@ -1,65 +1,34 @@
|
|||||||
<div class="table-responsive">
|
<div class="table-responsive">
|
||||||
<table class="table">
|
<table class="table">
|
||||||
<thead>
|
<thead class="thead-dark">
|
||||||
<td>#</td>
|
<tr>
|
||||||
<td>Event Date</td>
|
<td>#</td>
|
||||||
<td>Event Details</td>
|
<td>Event Date</td>
|
||||||
<td>Event Timings</td>
|
<td>Event Timings</td>
|
||||||
<td>MIC</td>
|
<td>Event Details</td>
|
||||||
|
<td>Status</td>
|
||||||
|
<td>Authorisation</td>
|
||||||
|
<td>MIC</td>
|
||||||
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
{% for event in events %}
|
{% for event in events %}
|
||||||
<tr class="
|
<tr class="
|
||||||
{% if event.cancelled %}
|
{% if event.cancelled %}
|
||||||
active text-muted
|
active text-muted
|
||||||
{% elif not event.is_rig %}
|
{% elif not event.is_rig %}
|
||||||
info
|
info
|
||||||
{% elif event.confirmed and event.mic %}
|
{% endif %}">
|
||||||
{# interpreated as (booked and mic) #}
|
<!---Number-->
|
||||||
success
|
|
||||||
{% elif event.mic %}
|
|
||||||
warning
|
|
||||||
{% else %}
|
|
||||||
danger
|
|
||||||
{% endif %}
|
|
||||||
">
|
|
||||||
<td>{{ event.pk }}</td>
|
<td>{{ event.pk }}</td>
|
||||||
|
<!--Dates-->
|
||||||
<td>
|
<td>
|
||||||
<div><strong>{{ event.start_date|date:"D d/m/Y" }}</strong></div>
|
<div><strong>{{ event.start_date|date:"D d/m/Y" }}</strong></div>
|
||||||
{% if event.end_date and event.end_date != event.start_date %}
|
{% if event.end_date and event.end_date != event.start_date %}
|
||||||
<div><strong>{{ event.end_date|date:"D d/m/Y" }}</strong></div>
|
<div><strong>{{ event.end_date|date:"D d/m/Y" }}</strong></div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<span class="text-muted">{{ event.get_status_display }}</span>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<h4>
|
|
||||||
<a href="{% url 'event_detail' event.pk %}">
|
|
||||||
{{ event.name }}
|
|
||||||
</a>
|
|
||||||
{% if event.venue %}
|
|
||||||
<small>at {{ event.venue }}</small>
|
|
||||||
{% endif %}
|
|
||||||
{% if event.dry_hire %}
|
|
||||||
<span class="label label-default">Dry Hire</span>
|
|
||||||
{% endif %}
|
|
||||||
{% if event.is_rig and perms.RIGS.view_event and event.authorised %}
|
|
||||||
<span class="fas fa-check"></span>
|
|
||||||
{% endif %}
|
|
||||||
</h4>
|
|
||||||
{% if event.is_rig and not event.cancelled %}
|
|
||||||
<h5>
|
|
||||||
{{ event.person.name }}
|
|
||||||
{% if event.organisation %}
|
|
||||||
for {{ event.organisation.name }}
|
|
||||||
{% endif %}
|
|
||||||
</h5>
|
|
||||||
{% endif %}
|
|
||||||
{% if not event.cancelled and event.description %}
|
|
||||||
<div>
|
|
||||||
{{ event.description|linebreaksbr }}
|
|
||||||
</div>
|
|
||||||
{% endif %}
|
|
||||||
</td>
|
</td>
|
||||||
|
<!---Times-->
|
||||||
<td>
|
<td>
|
||||||
{% if not event.cancelled %}
|
{% if not event.cancelled %}
|
||||||
<dl class="dl-horizontal">
|
<dl class="dl-horizontal">
|
||||||
@@ -84,9 +53,48 @@
|
|||||||
</dl>
|
</dl>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</td>
|
</td>
|
||||||
<td class="text-right">
|
<!---Details-->
|
||||||
|
<td>
|
||||||
|
<h4>
|
||||||
|
<a href="{% url 'event_detail' event.pk %}">
|
||||||
|
{{ event.name }}
|
||||||
|
</a>
|
||||||
|
{% if event.venue %}
|
||||||
|
<small>at {{ event.venue }}</small>
|
||||||
|
{% endif %}
|
||||||
|
{% if event.dry_hire %}
|
||||||
|
<span class="badge badge-secondary">Dry Hire</span>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
</h4>
|
||||||
|
{% if event.is_rig and not event.cancelled %}
|
||||||
|
<h5>
|
||||||
|
{{ event.person.name }}
|
||||||
|
{% if event.organisation %}
|
||||||
|
for {{ event.organisation.name }}
|
||||||
|
{% endif %}
|
||||||
|
</h5>
|
||||||
|
{% endif %}
|
||||||
|
{% if not event.cancelled and event.description %}
|
||||||
|
<div>
|
||||||
|
{{ event.description|linebreaksbr }}
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
</td>
|
||||||
|
<!---Status-->
|
||||||
|
<td class="bg-{% if event.confirmed %}success{%else%}warning{%endif%}">
|
||||||
|
<span>{{ event.get_status_display }}</span>
|
||||||
|
</td>
|
||||||
|
<!---Authorisation-->
|
||||||
|
<td>
|
||||||
|
{% if event.is_rig and perms.RIGS.view_event and event.authorised %}
|
||||||
|
<span class="fas fa-check"></span>
|
||||||
|
{% endif %}
|
||||||
|
</td>
|
||||||
|
<!---MIC-->
|
||||||
|
<td class="text-center">
|
||||||
{% if event.mic %}
|
{% if event.mic %}
|
||||||
{{ event.mic.initials }}
|
"{{ event.mic.initials }}"
|
||||||
<div>
|
<div>
|
||||||
{% if perms.RIGS.view_profile %}
|
{% if perms.RIGS.view_profile %}
|
||||||
<a href="{% url 'profile_detail' event.mic.pk %}" class="modal-href">
|
<a href="{% url 'profile_detail' event.mic.pk %}" class="modal-href">
|
||||||
@@ -97,11 +105,11 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
{% elif event.is_rig %}
|
{% elif event.is_rig %}
|
||||||
<span class="fas fa-exclamation-sign"></span>
|
<span class="fas fa-exclamation"></span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
10
gulpfile.js
10
gulpfile.js
@@ -7,20 +7,26 @@ var rename = require('gulp-rename');
|
|||||||
var terser = require('gulp-terser');
|
var terser = require('gulp-terser');
|
||||||
var sass = require('gulp-sass');
|
var sass = require('gulp-sass');
|
||||||
var flatten = require('gulp-flatten');
|
var flatten = require('gulp-flatten');
|
||||||
let cleanCSS = require('gulp-clean-css');
|
var cleanCSS = require('gulp-clean-css');
|
||||||
|
var autoprefixer = require('autoprefixer')
|
||||||
|
var postcss = require('gulp-postcss')
|
||||||
|
var sourcemaps = require('gulp-sourcemaps');
|
||||||
|
|
||||||
sass.compiler = require('node-sass');
|
sass.compiler = require('node-sass');
|
||||||
|
|
||||||
gulp.task('sass', function () {
|
gulp.task('sass', function () {
|
||||||
return gulp.src('web_assets/scss/**/*.scss')
|
return gulp.src('web_assets/scss/**/*.scss')
|
||||||
|
.pipe(sourcemaps.init())
|
||||||
.pipe(flatten())
|
.pipe(flatten())
|
||||||
.pipe(sass().on('error', sass.logError))
|
.pipe(sass().on('error', sass.logError))
|
||||||
.pipe(cleanCSS({compatibility: 'ie8'}))
|
.pipe(cleanCSS({compatibility: 'ie8'}))
|
||||||
|
.pipe(postcss([ autoprefixer() ]))
|
||||||
|
.pipe(sourcemaps.write())
|
||||||
.pipe(gulp.dest('RIGS/static/css'));
|
.pipe(gulp.dest('RIGS/static/css'));
|
||||||
});
|
});
|
||||||
|
|
||||||
gulp.task('scripts', function() {
|
gulp.task('scripts', function() {
|
||||||
return gulp.src(['web_assets/js/**/*.js', 'node_modules/bootstrap/**/bootstrap.min.js', 'node_modules/popper\.js/**/popper.js', 'node_modules/moment/**/moment.js', 'node_modules/@fortawesome/fontawesome-free/js/all.js'])
|
return gulp.src(['web_assets/js/**/*.js', 'node_modules/bootstrap/**/bootstrap.min.js', 'node_modules/popper\.js/**/popper.js', 'node_modules/moment/moment.js', 'node_modules/@fortawesome/fontawesome-free/js/all.js', 'node_modules/jquery/dist/jquery.js'])
|
||||||
.pipe(flatten())
|
.pipe(flatten())
|
||||||
.pipe(terser())
|
.pipe(terser())
|
||||||
.pipe(gulp.dest('RIGS/static/js'));
|
.pipe(gulp.dest('RIGS/static/js'));
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@fortawesome/fontawesome-free": "^5.12.1",
|
"@fortawesome/fontawesome-free": "^5.12.1",
|
||||||
"animation": "^0.1.3",
|
"autoprefixer": "^9.7.4",
|
||||||
"bootstrap": "^4.4.1",
|
"bootstrap": "^4.4.1",
|
||||||
"fullcalendar": "^3.10.1",
|
"fullcalendar": "^3.10.1",
|
||||||
"gulp-flatten": "^0.4.0",
|
"gulp-flatten": "^0.4.0",
|
||||||
@@ -16,11 +16,14 @@
|
|||||||
"transform": "^1.1.2"
|
"transform": "^1.1.2"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
"animate-sass": "^0.8.2",
|
||||||
"gulp": "^4.0.2",
|
"gulp": "^4.0.2",
|
||||||
"gulp-clean-css": "^4.2.0",
|
"gulp-clean-css": "^4.2.0",
|
||||||
"gulp-concat": "^2.6.1",
|
"gulp-concat": "^2.6.1",
|
||||||
|
"gulp-postcss": "^8.0.0",
|
||||||
"gulp-rename": "^2.0.0",
|
"gulp-rename": "^2.0.0",
|
||||||
"gulp-sass": "^4.0.2",
|
"gulp-sass": "^4.0.2",
|
||||||
|
"gulp-sourcemaps": "^2.6.5",
|
||||||
"gulp-terser": "^1.2.0",
|
"gulp-terser": "^1.2.0",
|
||||||
"node-sass": "^4.13.1"
|
"node-sass": "^4.13.1"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,8 +21,6 @@
|
|||||||
{% block css %}
|
{% block css %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
<script src="{% static 'js/moment.js' %}"></script>
|
|
||||||
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
|
|
||||||
<script src="https://cdn.ravenjs.com/1.3.0/jquery,native/raven.min.js"></script>
|
<script src="https://cdn.ravenjs.com/1.3.0/jquery,native/raven.min.js"></script>
|
||||||
<script>Raven.config('{% sentry_public_dsn %}').install()</script>
|
<script>Raven.config('{% sentry_public_dsn %}').install()</script>
|
||||||
{% block preload_js %}
|
{% block preload_js %}
|
||||||
@@ -87,9 +85,13 @@
|
|||||||
|
|
||||||
<div class="modal fade" id="modal" role="dialog" tabindex=-1></div>
|
<div class="modal fade" id="modal" role="dialog" tabindex=-1></div>
|
||||||
|
|
||||||
|
<script src="{% static 'js/jquery.js' %}"></script>
|
||||||
|
<script src="{% static 'js/interaction.js' %}"></script>
|
||||||
|
<script src="{% static 'js/konami.js' %}"></script>
|
||||||
|
<script src="{% static 'js/moment.js' %}"></script>
|
||||||
<script src="{% static 'js/popper.js' %}"></script>
|
<script src="{% static 'js/popper.js' %}"></script>
|
||||||
<script src="{% static 'js/bootstrap.min.js' %}"></script>
|
<script src="{% static 'js/bootstrap.min.js' %}"></script>
|
||||||
<script src="{% static 'js/fontawesome.min.js' %}"></script>
|
<script src="{% static 'js/all.js' %}"></script>
|
||||||
<script>
|
<script>
|
||||||
Date.prototype.getISOString = function () {
|
Date.prototype.getISOString = function () {
|
||||||
var yyyy = this.getFullYear().toString();
|
var yyyy = this.getFullYear().toString();
|
||||||
|
|||||||
@@ -51,19 +51,6 @@
|
|||||||
{% if perms.RIGS.view_venue %}
|
{% if perms.RIGS.view_venue %}
|
||||||
<li class="nav-item"><a class="nav-link" href="{% url 'venue_list' %}">Venues</a></li>
|
<li class="nav-item"><a class="nav-link" href="{% url 'venue_list' %}">Venues</a></li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<script>
|
|
||||||
$(document).ready(function(){
|
|
||||||
$('#search-options option').click(function(){
|
|
||||||
$('#searchForm').attr('action', $(this).data('action')).submit();
|
|
||||||
});
|
|
||||||
$('#id_search_input').keypress(function (e) {
|
|
||||||
if (e.which == 13) {
|
|
||||||
$('#searchForm').attr('action', $('#search-options option').first().data('action')).submit();
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
<form id="searchForm" class="form form-inline" role="form" method="GET">
|
<form id="searchForm" class="form form-inline" role="form" method="GET">
|
||||||
<input id="id_search_input" type="search" name="q" class="form-control" placeholder="Search..." />
|
<input id="id_search_input" type="search" name="q" class="form-control" placeholder="Search..." />
|
||||||
<div class="input-group-append">
|
<div class="input-group-append">
|
||||||
@@ -81,3 +68,18 @@
|
|||||||
</form>
|
</form>
|
||||||
<a href="{% url 'search_help' %}" class="nav-link modal-href"><span class="fas fa-question"></span></a></h4>
|
<a href="{% url 'search_help' %}" class="nav-link modal-href"><span class="fas fa-question"></span></a></h4>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
{% block js %}
|
||||||
|
<script>
|
||||||
|
$(document).ready(function(){
|
||||||
|
$('#search-options option').click(function(){
|
||||||
|
$('#searchForm').attr('action', $(this).data('action')).submit();
|
||||||
|
});
|
||||||
|
$('#id_search_input').keypress(function (e) {
|
||||||
|
if (e.which == 13) {
|
||||||
|
$('#searchForm').attr('action', $('#search-options option').first().data('action')).submit();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
{% endblock %}
|
||||||
|
|||||||
2
web_assets/scss/_vars.scss
Normal file
2
web_assets/scss/_vars.scss
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
$use-spinPulse: true;
|
||||||
|
$use-spinoffPulse: true;
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
@import "node_modules/bootstrap/scss/bootstrap";
|
@import "node_modules/bootstrap/scss/bootstrap";
|
||||||
//@import "node_modules/animation/animation";
|
@import "vars";
|
||||||
|
@import "node_modules/animate-sass/animate";
|
||||||
//@import "node_modules/transform/transform";
|
//@import "node_modules/transform/transform";
|
||||||
|
|
||||||
body, .pad-top {
|
body, .pad-top {
|
||||||
@@ -95,7 +96,7 @@ ins {
|
|||||||
width: 50px;
|
width: 50px;
|
||||||
height: 50px;
|
height: 50px;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
//@include animation(spinPulse 1s infinite ease-in-out);
|
//@include animated(spinPulse 1s infinite ease-in-out);
|
||||||
}
|
}
|
||||||
|
|
||||||
.circle1 {
|
.circle1 {
|
||||||
@@ -111,10 +112,10 @@ ins {
|
|||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
position: relative;
|
position: relative;
|
||||||
top: -40px;
|
top: -40px;
|
||||||
//@include animation(spinoffPulse 1s infinite linear);
|
//@include animated(spinoffPulse 1s infinite linear);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*@include keyframes(spinPulse) {
|
/*@include animate-keyframe(spinPulse) {
|
||||||
0% {
|
0% {
|
||||||
@include rotate(160deg);
|
@include rotate(160deg);
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
@@ -132,7 +133,7 @@ ins {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@include keyframes(spinoffPulse) {
|
@include animate-keyframe(spinoffPulse) {
|
||||||
0% {
|
0% {
|
||||||
@include rotate(0deg);
|
@include rotate(0deg);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user