diff --git a/determine/__init__.py b/determine/__init__.py deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/determine/__pycache__/__init__.cpython-37.pyc b/determine/__pycache__/__init__.cpython-37.pyc deleted file mode 100644 index f45041c54442544bfb5066727d02c9b178709f8d..0000000000000000000000000000000000000000 Binary files a/determine/__pycache__/__init__.cpython-37.pyc and /dev/null differ diff --git a/determine/__pycache__/__init__.cpython-38.pyc b/determine/__pycache__/__init__.cpython-38.pyc deleted file mode 100644 index 0b13950255e52c97cb94b840914f4876dfec3f2a..0000000000000000000000000000000000000000 Binary files a/determine/__pycache__/__init__.cpython-38.pyc and /dev/null differ diff --git a/determine/__pycache__/admin.cpython-37.pyc b/determine/__pycache__/admin.cpython-37.pyc deleted file mode 100644 index 58aa92640ff9cc6b16171309e2c4bdedd68cbbb4..0000000000000000000000000000000000000000 Binary files a/determine/__pycache__/admin.cpython-37.pyc and /dev/null differ diff --git a/determine/__pycache__/admin.cpython-38.pyc b/determine/__pycache__/admin.cpython-38.pyc deleted file mode 100644 index b09dfb959499df212d454803edab29a92f7d6623..0000000000000000000000000000000000000000 Binary files a/determine/__pycache__/admin.cpython-38.pyc and /dev/null differ diff --git a/determine/__pycache__/models.cpython-37.pyc b/determine/__pycache__/models.cpython-37.pyc deleted file mode 100644 index 0c2300a7589554ef48906b9a5401cfdd2a406cb4..0000000000000000000000000000000000000000 Binary files a/determine/__pycache__/models.cpython-37.pyc and /dev/null differ diff --git a/determine/__pycache__/models.cpython-38.pyc b/determine/__pycache__/models.cpython-38.pyc deleted file mode 100644 index d62f0105096edc37562c5e0934c137367eaa906a..0000000000000000000000000000000000000000 Binary files a/determine/__pycache__/models.cpython-38.pyc and /dev/null differ diff --git a/determine/__pycache__/urls.cpython-37.pyc b/determine/__pycache__/urls.cpython-37.pyc deleted file mode 100644 index b0620f5573f170ac6380bee520f49142cd26153c..0000000000000000000000000000000000000000 Binary files a/determine/__pycache__/urls.cpython-37.pyc and /dev/null differ diff --git a/determine/__pycache__/urls.cpython-38.pyc b/determine/__pycache__/urls.cpython-38.pyc deleted file mode 100644 index 4a3124f94b0a95e64af12f8798384f1d27be005b..0000000000000000000000000000000000000000 Binary files a/determine/__pycache__/urls.cpython-38.pyc and /dev/null differ diff --git a/determine/__pycache__/views.cpython-37.pyc b/determine/__pycache__/views.cpython-37.pyc deleted file mode 100644 index 3db758e31d3b62dfc9a052bd1c0e3e55515d6c22..0000000000000000000000000000000000000000 Binary files a/determine/__pycache__/views.cpython-37.pyc and /dev/null differ diff --git a/determine/__pycache__/views.cpython-38.pyc b/determine/__pycache__/views.cpython-38.pyc deleted file mode 100644 index d195a37b197838fa4d7ea474d4977718f4c4155f..0000000000000000000000000000000000000000 Binary files a/determine/__pycache__/views.cpython-38.pyc and /dev/null differ diff --git a/determine/admin.py b/determine/admin.py deleted file mode 100644 index 8c38f3f3dad51e4585f3984282c2a4bec5349c1e..0000000000000000000000000000000000000000 --- a/determine/admin.py +++ /dev/null @@ -1,3 +0,0 @@ -from django.contrib import admin - -# Register your models here. diff --git a/determine/apps.py b/determine/apps.py deleted file mode 100644 index 4648e0cf6015f05efcf3253e739b00038606975a..0000000000000000000000000000000000000000 --- a/determine/apps.py +++ /dev/null @@ -1,5 +0,0 @@ -from django.apps import AppConfig - - -class DetermineConfig(AppConfig): - name = 'determine' diff --git a/determine/determine.html b/determine/determine.html deleted file mode 100644 index 344336d751c816cd1a867f8d3991f5e297970584..0000000000000000000000000000000000000000 --- a/determine/determine.html +++ /dev/null @@ -1,107 +0,0 @@ -{% extends "ammini/base.html" %} -{% load staticfiles %} -<html> - -<head> - <meta charset="utf-8"> - <meta http-equiv="X-UA-Compatible" content="IE=edge"> - <title>AdminLTE 2 | Blank Page</title> - <!-- Tell the browser to be responsive to screen width --> - <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport"> - <!-- Bootstrap 3.3.7 --> - <link rel="stylesheet" href="/static/js/Bootstrap-3.3.7/css/bootstrap.min.css"> - <!-- Font Awesome --> - <link rel="stylesheet" href="/static/fonts/font-awesome-4.7.0/css/font-awesome.min.css"> - <!-- Ionicons - <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/ionicons/2.0.1/css/ionicons.min.css"> - --> - <!-- Theme style --> - <link rel="stylesheet" href="/static/themedist/css/AdminLTE.min.css"> - <!-- iCheck --> - <link rel="stylesheet" href="/static/js/iCheck/square/blue.css"> - - <!-- AdminLTE Skins. Choose a skin from the css/skins - folder instead of downloading all of them to reduce the load. --> - <link rel="stylesheet" href="/static/themedist/css/skins/_all-skins.min.css"> - - <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries --> - <!-- WARNING: Respond.js doesn't work if you view the page via file:// --> - <!--[if lt IE 9]> - <script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script> - <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> - <![endif]--> -</head> -<body class="hold-transition skin-blue sidebar-mini"> -<!-- Site wrapper --> -<div class="wrapper"> - - {% block header %} - {% include "ammini/header.html" %} - {% endblock header%} - - <!-- =============================================== --> - - <!-- Left side column. contains the sidebar --> - {% block leftside %} - {% include "ammini/leftside.html" %} - {% endblock leftside%} - - <!-- =============================================== --> - - <!-- Content Wrapper. Contains page content --> - <div class="content-wrapper"> - <!-- Content Header (Page header) --> - <section class="content-header"> - <h1> - Blank page - <small>it all starts here</small> - </h1> - <ol class="breadcrumb"> - <li><a href="#"><i class="fa fa-dashboard"></i> Home</a></li> - <li><a href="#">Examples</a></li> - <li class="active">Blank POLLO page</li> - </ol> - </section> - - <!-- Main content --> - <section class="content"> - - - - {% block table %} - {% include "ammini/table.html" %} - {% endblock table %} - - - - - </section> - <!-- /.content --> - </div> - <!-- /.content-wrapper --> - - - -</div> -<!-- ./wrapper --> - -<!-- jQuery 2.2.3 --> -<script src="/static/js/DataTables/jQuery-2.2.4/jquery-2.2.4.min.js"></script> -<!-- Bootstrap 3.3.6 --> -<script src="/static/js/Bootstrap-3.3.7/js/bootstrap.min.js"></script> -<!-- iCheck -<script src="/static/js/iCheck/icheck.min.js"></script> ---> -<!-- SlimScroll -<script src="/static/js/slimScroll/jquery.slimscroll.min.js"></script> ---> -<!-- FastClick -<script src="/static/js/fastclick/fastclick.js"></script> ---> -<!-- AdminLTE App --> -<script src="/static/js/js/app.min.js"></script> -<!-- AdminLTE for demo purposes --> -<script src="/static/js/js/demo.js"></script> - -</body> -</html> diff --git a/determine/migrations/0001_initial.py b/determine/migrations/0001_initial.py deleted file mode 100644 index c0e3f9a86bbea280aab695811314d61225742af2..0000000000000000000000000000000000000000 --- a/determine/migrations/0001_initial.py +++ /dev/null @@ -1,75 +0,0 @@ -# Generated by Django 3.1.5 on 2020-12-19 00:10 - -from django.conf import settings -from django.db import migrations, models -import django.db.models.deletion - - -class Migration(migrations.Migration): - - initial = True - - dependencies = [ - migrations.swappable_dependency(settings.AUTH_USER_MODEL), - ] - - operations = [ - migrations.CreateModel( - name='Dipendenti', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('email', models.CharField(max_length=48)), - ('cognome', models.CharField(max_length=48)), - ('ufficio', models.CharField(blank=True, max_length=48, null=True)), - ('nome', models.CharField(max_length=48)), - ('data', models.DateField()), - ('rule', models.CharField(blank=True, max_length=45, null=True)), - ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), - ], - options={ - 'db_table': 'dipendenti', - 'managed': True, - }, - ), - migrations.CreateModel( - name='Determinepersonale', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('determina', models.IntegerField(blank=True, null=True)), - ('oggetto', models.CharField(blank=True, max_length=255, null=True)), - ('data', models.DateField(blank=True, null=True)), - ('ufficio', models.CharField(blank=True, max_length=128, null=True)), - ('datacreato', models.DateField(blank=True, null=True)), - ('dachi', models.CharField(blank=True, max_length=255, null=True)), - ('pdf', models.CharField(blank=True, max_length=200, null=True)), - ('anno', models.IntegerField(blank=True, null=True)), - ('privacy', models.IntegerField()), - ('dipendente_id', models.ForeignKey(blank=True, db_column='dipendente_id', null=True, on_delete=django.db.models.deletion.DO_NOTHING, to='determine.dipendenti')), - ], - options={ - 'db_table': 'determinepersonale', - 'managed': True, - }, - ), - migrations.CreateModel( - name='Determine', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('determina', models.IntegerField(blank=True, null=True)), - ('oggetto', models.CharField(blank=True, max_length=255, null=True)), - ('data', models.DateField(blank=True, null=True)), - ('ufficio', models.CharField(blank=True, max_length=128, null=True)), - ('datacreato', models.DateField(blank=True, null=True)), - ('dachi', models.CharField(blank=True, max_length=255, null=True)), - ('pdf', models.CharField(blank=True, max_length=255, null=True)), - ('anno', models.IntegerField()), - ('note', models.TextField(blank=True, null=True)), - ('privacy', models.IntegerField()), - ('dipendente_id', models.ForeignKey(blank=True, db_column='dipendente_id', null=True, on_delete=django.db.models.deletion.DO_NOTHING, to='determine.dipendenti')), - ], - options={ - 'db_table': 'determine', - 'managed': True, - }, - ), - ] diff --git a/determine/migrations/0002_auto_20201219_0426.py b/determine/migrations/0002_auto_20201219_0426.py deleted file mode 100644 index c7af7971e69752d371c619823cf4b32f83a06dc9..0000000000000000000000000000000000000000 --- a/determine/migrations/0002_auto_20201219_0426.py +++ /dev/null @@ -1,22 +0,0 @@ -# Generated by Django 3.1.5 on 2020-12-19 04:26 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('determine', '0001_initial'), - ] - - operations = [ - migrations.RemoveField( - model_name='dipendenti', - name='rule', - ), - migrations.AlterField( - model_name='dipendenti', - name='email', - field=models.CharField(blank=True, max_length=100, null=True), - ), - ] diff --git a/determine/migrations/0003_auto_20201219_0623.py b/determine/migrations/0003_auto_20201219_0623.py deleted file mode 100644 index c297c4dbe06580f5f0802ca2fe2d93e67a6b17d6..0000000000000000000000000000000000000000 --- a/determine/migrations/0003_auto_20201219_0623.py +++ /dev/null @@ -1,17 +0,0 @@ -# Generated by Django 3.1.5 on 2020-12-19 06:23 - -from django.db import migrations - - -class Migration(migrations.Migration): - - dependencies = [ - ('determine', '0002_auto_20201219_0426'), - ] - - operations = [ - migrations.AlterModelOptions( - name='determine', - options={'managed': True, 'permissions': [('upload_pdf', 'Can upload pdf file '), ('forza_nuova_determina', 'Puo creare nuova determina anno precedente ')]}, - ), - ] diff --git a/determine/migrations/0004_auto_20201219_0636.py b/determine/migrations/0004_auto_20201219_0636.py deleted file mode 100644 index 082228abefb2c7b5c68bd49a26ab9b0b838b737a..0000000000000000000000000000000000000000 --- a/determine/migrations/0004_auto_20201219_0636.py +++ /dev/null @@ -1,21 +0,0 @@ -# Generated by Django 3.1.5 on 2020-12-19 06:36 - -from django.db import migrations - - -class Migration(migrations.Migration): - - dependencies = [ - ('determine', '0003_auto_20201219_0623'), - ] - - operations = [ - migrations.AlterModelOptions( - name='determine', - options={'managed': True, 'permissions': [('upload_pdf', 'Puo caricare pdf '), ('forza_nuova_determina', 'Puo forzare nuova determina '), ('modifica_determina_non_sua', 'puo modificare determina non sua')]}, - ), - migrations.AlterModelOptions( - name='determinepersonale', - options={'managed': True, 'permissions': [('upload_pdf', 'DP Puo caricare pdf '), ('forza_nuova_determina', 'Puo forzare nuova determina P '), ('modifica_determina_non_sua', 'puo modificare determina non sua')]}, - ), - ] diff --git a/determine/migrations/0005_auto_20201219_0659.py b/determine/migrations/0005_auto_20201219_0659.py deleted file mode 100644 index 802108a8d2ef2c903e33f9bbe4331954f0920912..0000000000000000000000000000000000000000 --- a/determine/migrations/0005_auto_20201219_0659.py +++ /dev/null @@ -1,21 +0,0 @@ -# Generated by Django 3.1.5 on 2020-12-19 06:59 - -from django.db import migrations - - -class Migration(migrations.Migration): - - dependencies = [ - ('determine', '0004_auto_20201219_0636'), - ] - - operations = [ - migrations.AlterModelOptions( - name='determine', - options={'managed': True, 'permissions': [('upload_pdf', 'Puo caricare pdf '), ('forza_nuova_determina', 'Puo forzare nuova determina '), ('modifica_determina_non_sua', 'Puo modificare determina non sua')]}, - ), - migrations.AlterModelOptions( - name='determinepersonale', - options={'managed': True, 'permissions': [('upload_pdf', 'DP Puo caricare pdf '), ('forza_nuova_determina', 'Puo forzare nuova determina P '), ('modifica_determina_non_sua', 'Puo modificare determina non sua')]}, - ), - ] diff --git a/determine/migrations/__init__.py b/determine/migrations/__init__.py deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/determine/migrations/__pycache__/0001_initial.cpython-37.pyc b/determine/migrations/__pycache__/0001_initial.cpython-37.pyc deleted file mode 100644 index 103b2d60bd8ec5d5fde6f826118af320a2aaaee1..0000000000000000000000000000000000000000 Binary files a/determine/migrations/__pycache__/0001_initial.cpython-37.pyc and /dev/null differ diff --git a/determine/migrations/__pycache__/0001_initial.cpython-38.pyc b/determine/migrations/__pycache__/0001_initial.cpython-38.pyc deleted file mode 100644 index 4a38afeeefed1d9f9c81b92cde9dc834102af0ff..0000000000000000000000000000000000000000 Binary files a/determine/migrations/__pycache__/0001_initial.cpython-38.pyc and /dev/null differ diff --git a/determine/migrations/__pycache__/0002_auto_20201219_0426.cpython-37.pyc b/determine/migrations/__pycache__/0002_auto_20201219_0426.cpython-37.pyc deleted file mode 100644 index df5fea8931146e21290cdcd0026633438fac109c..0000000000000000000000000000000000000000 Binary files a/determine/migrations/__pycache__/0002_auto_20201219_0426.cpython-37.pyc and /dev/null differ diff --git a/determine/migrations/__pycache__/0002_auto_20201219_0426.cpython-38.pyc b/determine/migrations/__pycache__/0002_auto_20201219_0426.cpython-38.pyc deleted file mode 100644 index a9975684c31b7b6f16ed2e737f4f0134b163285e..0000000000000000000000000000000000000000 Binary files a/determine/migrations/__pycache__/0002_auto_20201219_0426.cpython-38.pyc and /dev/null differ diff --git a/determine/migrations/__pycache__/0003_auto_20201219_0623.cpython-37.pyc b/determine/migrations/__pycache__/0003_auto_20201219_0623.cpython-37.pyc deleted file mode 100644 index c65db0cf39371f8c7be85805a125fda6eff56c8b..0000000000000000000000000000000000000000 Binary files a/determine/migrations/__pycache__/0003_auto_20201219_0623.cpython-37.pyc and /dev/null differ diff --git a/determine/migrations/__pycache__/0003_auto_20201219_0623.cpython-38.pyc b/determine/migrations/__pycache__/0003_auto_20201219_0623.cpython-38.pyc deleted file mode 100644 index 7b5204707abdeeb3cae21cc2fa3e71068fed89d2..0000000000000000000000000000000000000000 Binary files a/determine/migrations/__pycache__/0003_auto_20201219_0623.cpython-38.pyc and /dev/null differ diff --git a/determine/migrations/__pycache__/0004_auto_20201219_0636.cpython-37.pyc b/determine/migrations/__pycache__/0004_auto_20201219_0636.cpython-37.pyc deleted file mode 100644 index 79828f8e673878bbf8464cdc773d5deb12a476e1..0000000000000000000000000000000000000000 Binary files a/determine/migrations/__pycache__/0004_auto_20201219_0636.cpython-37.pyc and /dev/null differ diff --git a/determine/migrations/__pycache__/0004_auto_20201219_0636.cpython-38.pyc b/determine/migrations/__pycache__/0004_auto_20201219_0636.cpython-38.pyc deleted file mode 100644 index 5fcb577452a2abe7f8ebcaded3b0c5d6808014e6..0000000000000000000000000000000000000000 Binary files a/determine/migrations/__pycache__/0004_auto_20201219_0636.cpython-38.pyc and /dev/null differ diff --git a/determine/migrations/__pycache__/0005_auto_20201219_0659.cpython-37.pyc b/determine/migrations/__pycache__/0005_auto_20201219_0659.cpython-37.pyc deleted file mode 100644 index ef7bb85f320f2656d0c08e95e06bbbb1a23bed7b..0000000000000000000000000000000000000000 Binary files a/determine/migrations/__pycache__/0005_auto_20201219_0659.cpython-37.pyc and /dev/null differ diff --git a/determine/migrations/__pycache__/0005_auto_20201219_0659.cpython-38.pyc b/determine/migrations/__pycache__/0005_auto_20201219_0659.cpython-38.pyc deleted file mode 100644 index ddb73fbc4634a80fa603f2b2ac847f793128d120..0000000000000000000000000000000000000000 Binary files a/determine/migrations/__pycache__/0005_auto_20201219_0659.cpython-38.pyc and /dev/null differ diff --git a/determine/migrations/__pycache__/__init__.cpython-37.pyc b/determine/migrations/__pycache__/__init__.cpython-37.pyc deleted file mode 100644 index d263e28cafa5de791714cd21313a13e6a3653244..0000000000000000000000000000000000000000 Binary files a/determine/migrations/__pycache__/__init__.cpython-37.pyc and /dev/null differ diff --git a/determine/migrations/__pycache__/__init__.cpython-38.pyc b/determine/migrations/__pycache__/__init__.cpython-38.pyc deleted file mode 100644 index 1debdfb75ad20f471924a28c77e67264f3af5593..0000000000000000000000000000000000000000 Binary files a/determine/migrations/__pycache__/__init__.cpython-38.pyc and /dev/null differ diff --git a/determine/models.py b/determine/models.py deleted file mode 100644 index f15fd1e0feddd0c3523debc35d21ea44cf908b80..0000000000000000000000000000000000000000 --- a/determine/models.py +++ /dev/null @@ -1,79 +0,0 @@ -from __future__ import unicode_literals - -from django.db import models -from django.contrib.auth.models import User - - -class Determine(models.Model): - dipendente_id = models.ForeignKey('Dipendenti', models.DO_NOTHING, db_column='dipendente_id',blank=True, null=True) - - #authuser_id = models.IntegerField(blank=True, null=True) - determina = models.IntegerField(blank=True, null=True) - oggetto = models.CharField(max_length=255, blank=True, null=True) - data = models.DateField(blank=True, null=True) - ufficio = models.CharField(max_length=128, blank=True, null=True) - datacreato = models.DateField(blank=True, null=True) - dachi = models.CharField(max_length=255, blank=True, null=True) - pdf = models.CharField(max_length=255, blank=True, null=True) - anno = models.IntegerField() - note = models.TextField(blank=True, null=True) - privacy = models.IntegerField() - class Meta: - permissions = [("upload_pdf", "Puo caricare pdf "), - ("forza_nuova_determina","Puo forzare nuova determina "), - ("modifica_determina_non_sua","Puo modificare determina non sua")] - - - managed = True - db_table = 'determine' - -class Determinepersonale(models.Model): - dipendente_id = models.ForeignKey('Dipendenti', models.DO_NOTHING, db_column='dipendente_id',blank=True, null=True) - - #authuser_id = models.IntegerField(blank=True, null=True) - determina = models.IntegerField(blank=True, null=True) - oggetto = models.CharField(max_length=255, blank=True, null=True) - data = models.DateField(blank=True, null=True) - ufficio = models.CharField(max_length=128, blank=True, null=True) - datacreato = models.DateField(blank=True, null=True) - dachi = models.CharField(max_length=255, blank=True, null=True) - pdf = models.CharField(max_length=200, blank=True, null=True) - anno = models.IntegerField(blank=True, null=True) - privacy = models.IntegerField() - - class Meta: - permissions = [("upload_pdf", "DP Puo caricare pdf "), - ("forza_nuova_determina","Puo forzare nuova determina P "), - ("modifica_determina_non_sua","Puo modificare determina non sua")] - - managed = True - db_table = 'determinepersonale' -""" -class Utenti(models.Model): - # id = models.IntegerField(primary_key=True) - #login = models.CharField(max_length=48) - #password = models.CharField(max_length=16) - cognome = models.CharField(max_length=48) - ufficio = models.CharField(max_length=48, blank=True, null=True) - nome = models.CharField(max_length=48) - data = models.DateField() - rule = models.CharField(max_length=45, blank=True, null=True) - - class Meta: - managed = True - db_table = 'users' -""" -class Dipendenti(models.Model): - user = models.OneToOneField(User,on_delete=models.CASCADE) - #id = models.IntegerField(primary_key=True) - email = models.CharField(max_length=48) - #password = models.CharField(max_length=16) - cognome = models.CharField(max_length=48) - ufficio = models.CharField(max_length=48, blank=True, null=True) - nome = models.CharField(max_length=48) - data = models.DateField() - email = models.CharField(max_length=100, blank=True, null=True) - - class Meta: - managed = True - db_table = 'dipendenti' diff --git a/determine/templates/determine/determine.html b/determine/templates/determine/determine.html deleted file mode 100644 index c55c75c1d923546c0277bad607b8bf97b46739f4..0000000000000000000000000000000000000000 --- a/determine/templates/determine/determine.html +++ /dev/null @@ -1,196 +0,0 @@ -{% extends "gbase.html" %} -{% load static %} - -{% block css %} -{{ block.super }} - - <link href="{% static '/DataTables/dataTables.bootstrap5.min.css' %}" rel="stylesheet"> - <link href="{% static '/datepicker/css/datepicker.css' %}" rel="stylesheet"> - -{% endblock css %} - - - - <!-- =============================================== --> - - - - <!-- Main content --> - - -{% block right_col %} - - {% include "determine/table.html" %} - {% endblock right_col %} - - - - -{% block javascripts %} -{{ block.super }} - - <script src="{% static '/DataTables/jquery.dataTables5.min.js' %}"></script> - - <script src="{% static '/DataTables/dataTables.bootstrap5.min.js' %}"></script> - <script src="{% static '/datepicker/js/bootstrap-datepicker.js' %}"></script> - <script> -var selected = []; -function chiudi(){ - $("#nuovadetermina").addClass("hide"); -} -function clickButton(btn){ - var id = $(btn).closest('tr').attr('id'); - - alert(id); - var index = $.inArray(id, selected); - - if ( index === -1 ) { - selected.push( id ); - } else { - selected.splice( index, 1 ); - } - - $(this).toggleClass('selected'); - } //); -var ddd; -$(".btnUpload").click(function(e){ - - // $('#popup').dialog({modal: true}).dialog('open').load(this.href) - iddetermina = $(this).closest('tr').attr('id'); - //e.preventDefault() - ddd='/work/uploadPdfDeterminaDialog/' +iddetermina; //'/amm/work/modificadeterminaDialog/'+iddetermina; - title = "Upload PDF"; - showModal(ddd,iddetermina,title); - }); -$(".btnModifica").click(function(e){ - - // $('#popup').dialog({modal: true}).dialog('open').load(this.href) - iddetermina = $(this).closest('tr').attr('id'); - //e.preventDefault() - ddd='/work/modificadeterminaDialog/' +iddetermina; //'/amm/work/modificadeterminaDialog/'+iddetermina; - title = " Modifica Determina"; - - showModal(ddd,iddetermina,title); - //window.location.reload(); - }); -function showModal(thishref,id,title){ - - var labelchiudi = 'Chiudi senza Salvare'; - if (title === "Upload PDF") labelchiudi= " Chiudi "; - - var data1 = id - var data2 = {'Orange': 'polo','BELLO': 'heheheheh'}; - var data3 = ['Banana', 'Pear']; - BootstrapDialog.DEFAULT_TEXTS['OK'] = 'OK'; - BootstrapDialog.DEFAULT_TEXTS['CANCEL'] = 'Cancel'; - checkDocumentiDialog = BootstrapDialog.show({ - title: title, // 'Modifica Determina ', - size: BootstrapDialog.SIZE_WIDE, - draggable: true, - message: function(dialog) { - var content = $('<div id="dialogmodifica"></div>'); - var pageToLoadVar = dialog.getData('pageToLoad'); - content.load(pageToLoadVar); - - return content; - }, - // onload: function(){ - // alert("CARICATA"); - // }, - //onshown: function(dialogRef){ - //alert("SONO DENTRO"+dialogRef.getData('data1')); - //alert( $("#moddatepicker").val()); - //$('#moddatepicker').datepicker({ - // autoclose: true, - // format: 'dd/mm/yyyy' - // }); - //console.log(dialogRef); - //}, - data: { - 'pageToLoad': thishref, // '/work/modificadeterminaDialog/'+id, //'/amm/work/modificadeterminaDialog/'+id, //'/tm/user/profile/volpicelli' , ///static/templates/profile.html?id='+data1, - 'data1': data1, - 'data2': data2, - 'data3': data3 - }, - buttons: [ - - { - label: labelchiudi, //'Chiudi senza Salvare', - action: function(dialogRef) { - dialogRef.close(); - } - - } - ] - }); - $(".modal-dialog").on('loaded.bs.modal', function(){ - alert("Modal window has been completely closed."); - }); - -} -function nuovaDetermina(){ - $("#nuovadetermina").removeClass("hide"); -} -function getCookie(name) { - var cookieValue = null; - if (document.cookie && document.cookie !== '') { - var cookies = document.cookie.split(';'); - for (var i = 0; i < cookies.length; i++) { - var cookie = jQuery.trim(cookies[i]); - // Does this cookie string begin with the name we want? - if (cookie.substring(0, name.length + 1) === (name + '=')) { - cookieValue = decodeURIComponent(cookie.substring(name.length + 1)); - break; - } - } - } - return cookieValue; -} -function csrfSafeMethod(method) { - // these HTTP methods do not require CSRF protection - return (/^(GET|HEAD|OPTIONS|TRACE)$/.test(method)); -} - $(function () { - $('#datepicker').datepicker({ - autoclose: true, - format: 'dd/mm/yyyy' - }); - - $("#example1").DataTable({ "language":{ - "url": "/static/js/DataTables/Italian.json"}, - "searching": true, - "order": [[ 0, 'desc' ]], - "ordering": true - - // } - }); - /* - $('#example2').DataTable({ - "paging": true, - "lengthChange": false, - "searching": false, - //"ordering": true, - "info": true, - "autoWidth": false - }); - - var selected = []; - //$('button').on('click', 'button', function () { - function clickButton(){ - var id = this.id; - alert(id); - var index = $.inArray(id, selected); - - if ( index === -1 ) { - selected.push( id ); - } else { - selected.splice( index, 1 ); - } - - $(this).toggleClass('selected'); - } //); - */ - }); -</script> -{% endblock javascripts %} - diff --git a/determine/templates/determine/table.html b/determine/templates/determine/table.html deleted file mode 100644 index c7b42055d788c6935f82eb0d5d196ba167d95070..0000000000000000000000000000000000000000 --- a/determine/templates/determine/table.html +++ /dev/null @@ -1,288 +0,0 @@ -{% load ammini_extra %} -{% load static %} - - -{% block content %} - <div class="right_col" role="main"> - <div class=""> - <div class="page-title"> - <div class="title_left"> - <div class="box {% if header.nuova == 0 and not request.user|has_group:"Amministratori" %} hide {% endif %}"> - <div class="box-header"> - <h3 class="box-title"><button onclick="nuovaDetermina()"> {% if request.user|has_group:"Amministratori" and anno < 2021 %} Forza Nuova Determina {% else %} Nuova Determina {% endif %} </button></h3> - </div> -</div> - <h3>Users <small>Some examples to get you started</small></h3> - <button onclick="nuovaDetermina()"> {% if request.user|has_group:"Amministratori" and anno < 2021 %} Forza Nuova Determina {% else %} Nuova Determina {% endif %} </button> - </div> - - <div class="title_right"> - <div class="col-md-5 col-sm-5 col-xs-12 form-group pull-right top_search"> - <div class="input-group"> - <input type="text" class="form-control" placeholder="Search for..."> - <span class="input-group-btn"> - <button class="btn btn-secondary" type="button">Go!</button> - </span> - </div> - </div> - </div> - </div> - - <div class="clearfix"></div> - - <div class="row"> - <div class="col-md-12 col-sm-12 "> - <div class="x_panel"> - <div class="x_title"> - <h2>Default Example <small>Users</small></h2> - <ul class="nav navbar-right panel_toolbox"> - <li><a class="collapse-link"><i class="fa fa-chevron-up"></i></a> - </li> - <li class="dropdown"> - <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false"><i class="fa fa-wrench"></i></a> - <div class="dropdown-menu" aria-labelledby="dropdownMenuButton"> - <a class="dropdown-item" href="#">Settings 1</a> - <a class="dropdown-item" href="#">Settings 2</a> - </div> - </li> - <li><a class="close-link"><i class="fa fa-close"></i></a> - </li> - </ul> - <div class="clearfix"></div> - </div> - <div class="x_content"> - <div class="row"> - <div class="col-sm-12"> - <div class="card-box table-responsive"> - <p class="text-muted font-13 m-b-30"> - DataTables has most features enabled by default, so all you need to do to use it with your own tables is to call the construction function: <code>$().DataTable();</code> - </p> - <table id="datatable" class="table table-striped table-bordered" style="width:100%"> - <thead> - <tr> - <th>Determina</th> - <th width="70%">Oggetto</th> - <th>Note</th> - <th>Data</th> - <th>Ufficio</th> - <th>Da chi</th> - <th>Azione Gruppo {{ groups }}</th> - </tr> - </thead> - <tbody> - {% for determina in determine %} - <tr id="{{determina.id}}"> - <td>{{determina.determina}}</td> - {% if determina.privacy == 1 %} - <td id="oggetto_{{determina.id}}"> <span title=" PDF non visibile per rispetto della privacy "> {{determina.oggetto}} </span> </td> - {% else %} - {% if determina.pdf == None %} - <td id="oggetto_{{determina.id}}"> <span title=" Nessun PDF associato "> {{determina.oggetto}} </span> </td> - {% else %} - <td id="oggetto_{{determina.id}}"><a target="_blank" href="/DETERMINE/{{determina.anno}}/{{determina.pdf}}">{{determina.oggetto}}</a></td> - {% endif %} - {% endif %} - <td>{% if determina.note == None %} {% else %} {{determina.note}} {% endif %}</td> - <td id="data_oggetto_{{determina.id}}">{{determina.data | date:'d/m/Y'}}</td> - <td>{{determina.ufficio}}</td> - <td>{{determina.dachi}}</td> - <td> - {% if determina.authuser_id == request.user.id or request.user|has_group:"Amministratori" %} - <button class="btnModifica btn btn-sm btn-primary " > Modifica </button> - {% endif %} - {% if request.user|has_group:"UPLOAD" %}<button class="btnUpload btn btn-sm btn-warning " > UPLOAD </button>{% endif %} - - </td> - </tr> - {% endfor %} - </tbody> - <tfoot> - <tr> - <th>Determina</th> - <th>Oggetto</th> - <th>Note</th> - <th>Data</th> - <th>Ufficio</th> - <th>Da chi</th> - <th>Azione</th> - </tr> - </tfoot> - - - - </table> - </div> - </div> - </div> - </div> - </div> - </div> - - - - </div> - </div> - </div> - - - </div> - </div> - </div> - - - - - </div> - </div> - </div> - </div> - </div> - </div> -<!-- -<div class="box {% if header.nuova == 0 and not request.user|has_group:"Amministratori" %} hide {% endif %}"> - <div class="box-header"> - <h3 class="box-title"><button onclick="nuovaDetermina()"> {% if request.user|has_group:"Amministratori" and anno < 2021 %} Forza Nuova Determina {% else %} Nuova Determina {% endif %} </button></h3> - </div> -</div> -<div id="nuovadetermina" class="box hide"> - <div class="box-header"> - <h3 class="box-title"></h3> - </div> - <form action="{{header.urlSave}}" role="form" method="post">{% csrf_token %} - <input type="hidden" name="authuser_id" class="form-control" value="{{header.auth_user_id}}" > - <input type="hidden" name="ufficio" class="form-control" value="{{header.ufficio}}" > - <input type="hidden" name="dachi" class="form-control" value="{{header.cognome}} {{header.nome}}" > - <div class="box-body"> - - - <div class="row"> - <div class="col-md-6"> - - <div class="form-group"> - <label>Ufficio</label> - <input type="text" class="form-control" value="{{header.ufficio}} " disabled> - </div> - </div> - <div class="col-md-6"> - <div class="form-group"> - <label>Richiesta da </label> - <input type="text" class="form-control" value="{{header.cognome}} {{header.nome}}" disabled> - </div> - </div> - </div> -<br> -<div class="row"> -<div class="col-md-5"> -<div class="form-check"> - <label>Privacy - Seleziona per rendere il PDF non visibile </label> - <input type="checkbox" class="form-check-input" name="privacy" value="" > - </div> -</div> -</div> -<br> - <div class="row"> - <div class="col-md-2"> - - <div class="form-group"> - <label>Date:</label> - - <div class="input-group date"> - <div class="input-group-addon"> - <i class="fa fa-calendar"></i> - </div> - <input type="text" name="data" class="form-control pull-right" id="datepicker" required> - </div> - - </div> - - </div> - <div class="col-md-6"> - <div class="form-group"> - <label>Textarea</label> - <textarea class="form-control" name="oggetto" rows="3" placeholder="Enter ..." required></textarea> - </div> - </div> - <div class="col-md-4"> - <div class="form-group"> - <label>Note</label> - <textarea class="form-control" name="note" rows="3" placeholder="Enter ..."></textarea> - </div> - </div> - </div> - - </div> - <div class="box-footer"> - - <button type="submit" class="btn btn-primary">Salva </button> - <button type="button" onclick="chiudi()" class="btn btn-warning">Chiudi </button> - </div> - </form> -</div> - <div class="box"> - <div class="box-header"> - <h3 class="box-title"></h3> - </div> - - <div class="box-body"> - <table id="example1" class="table table-bordered table-striped"> - <thead> - <tr> - <th>Determina</th> - <th width="70%">Oggetto</th> - <th>Note</th> - <th>Data</th> - <th>Ufficio</th> - <th>Da chi</th> - <th>Azione Gruppo {{ groups }}</th> - </tr> - </thead> - <tbody> - {% for determina in determine %} - <tr id="{{determina.id}}"> - <td>{{determina.determina}}</td> - {% if determina.privacy == 1 %} - <td id="oggetto_{{determina.id}}"> <span title=" PDF non visibile per rispetto della privacy "> {{determina.oggetto}} </span> </td> - {% else %} - {% if determina.pdf == None %} - <td id="oggetto_{{determina.id}}"> <span title=" Nessun PDF associato "> {{determina.oggetto}} </span> </td> - {% else %} - <td id="oggetto_{{determina.id}}"><a target="_blank" href="/DETERMINE/{{determina.anno}}/{{determina.pdf}}">{{determina.oggetto}}</a></td> - {% endif %} - {% endif %} - <td>{% if determina.note == None %} {% else %} {{determina.note}} {% endif %}</td> - <td id="data_oggetto_{{determina.id}}">{{determina.data | date:'d/m/Y'}}</td> - <td>{{determina.ufficio}}</td> - <td>{{determina.dachi}}</td> - <td> - {% if determina.authuser_id == request.user.id or request.user|has_group:"Amministratori" %} - <button class="btnModifica btn btn-sm btn-primary " > Modifica </button> - {% endif %} - {% if request.user|has_group:"UPLOAD" %}<button class="btnUpload btn btn-sm btn-warning " > UPLOAD </button>{% endif %} - - </td> - </tr> - {% endfor %} - </tbody> - <tfoot> - <tr> - <th>Determina</th> - <th>Oggetto</th> - <th>Note</th> - <th>Data</th> - <th>Ufficio</th> - <th>Da chi</th> - <th>Azione</th> - </tr> - </tfoot> - </table> - </div> - - </div> - - - --> - - -{% endblock %} - - diff --git a/determine/templatetags/__pycache__/ammini_extra.cpython-37.pyc b/determine/templatetags/__pycache__/ammini_extra.cpython-37.pyc deleted file mode 100644 index cb25500bbb1c68cfd911ba42b2103eb66931a7ed..0000000000000000000000000000000000000000 Binary files a/determine/templatetags/__pycache__/ammini_extra.cpython-37.pyc and /dev/null differ diff --git a/determine/templatetags/__pycache__/ammini_extra.cpython-38.pyc b/determine/templatetags/__pycache__/ammini_extra.cpython-38.pyc deleted file mode 100644 index 786a6ed2e297a4f641c3747bd50d3c6ac12c547b..0000000000000000000000000000000000000000 Binary files a/determine/templatetags/__pycache__/ammini_extra.cpython-38.pyc and /dev/null differ diff --git a/determine/templatetags/ammini_extra.py b/determine/templatetags/ammini_extra.py deleted file mode 100644 index 04a85d0ed0effe38e7ab1f3d3fb28f5202bc4fc1..0000000000000000000000000000000000000000 --- a/determine/templatetags/ammini_extra.py +++ /dev/null @@ -1,23 +0,0 @@ -# -*- coding:utf-8 -*- -from __future__ import unicode_literals - -# Stdlib imports - -# Core Django imports -from django import template - -# Third-party app imports - -# Realative imports of the 'app-name' package - - -register = template.Library() - - -@register.filter('has_group') -def has_group(user, group_name): - """ - Verifica se este usuário pertence a um grupo - """ - groups = user.groups.all().values_list('name', flat=True) - return True if group_name in groups else False \ No newline at end of file diff --git a/determine/tests.py b/determine/tests.py deleted file mode 100644 index 7ce503c2dd97ba78597f6ff6e4393132753573f6..0000000000000000000000000000000000000000 --- a/determine/tests.py +++ /dev/null @@ -1,3 +0,0 @@ -from django.test import TestCase - -# Create your tests here. diff --git a/determine/urls.py b/determine/urls.py deleted file mode 100644 index bc44338b6c57d6be9634789120aa3cd1ce4be306..0000000000000000000000000000000000000000 --- a/determine/urls.py +++ /dev/null @@ -1,7 +0,0 @@ -from django.contrib import admin -from django.urls import path,include -from common.views import IndexView -from determine.views import DetermineHome -urlpatterns = [ - path(r'<int:Anno>',DetermineHome.as_view(),name='determine'), -] \ No newline at end of file diff --git a/determine/views.py b/determine/views.py deleted file mode 100644 index d2f3c64d62d2e7343cc449afb733d708e220f865..0000000000000000000000000000000000000000 --- a/determine/views.py +++ /dev/null @@ -1,49 +0,0 @@ -from django.shortcuts import render -from django.http import HttpResponse,JsonResponse,HttpResponseRedirect -from django.template import loader -from django.forms.models import model_to_dict -#from django.shortcuts import render_to_response -from django.template import RequestContext -from determine.models import Determine, Determinepersonale,Dipendenti -from django.db.models import Max -from django.middleware import csrf -from django.conf import settings -from django.core.files.storage import FileSystemStorage - -from django.views.decorators.cache import cache_page -from django.views.decorators.csrf import csrf_protect -from django.views.decorators.csrf import csrf_exempt -from django.core.exceptions import ObjectDoesNotExist#,EmptyResultSet - -from django.views.generic.edit import CreateView, UpdateView, DeleteView -from determine.models import Determine -import datetime -import locale - -locale.setlocale(locale.LC_ALL, 'it_IT.utf8') - -# Create your views here. -class DetermineHome(CreateView): - template_name = 'determine.html' - - def get(self,request,Anno): - if request.user.is_authenticated: - - - anno = int(Anno) - oggi = datetime.date.today() - anno_oggi = oggi.year - nuova =1 - if anno_oggi != int(Anno) : - # no Nuova Determina - nuova = 0 - #grpDP = request.user.groups.get(name='DeterminePersonale')#.exists() - template = loader.get_template('determine/determine.html') - - #form = HomeForm(initial={'descrizione': 'POLLO'}) - #ob_fun = Obiettivofunzione.objects.all() - determine = Determine.objects.filter(anno=2020) - context = {'groups': {'dp': 'grpDP'},'determine': determine} - return HttpResponse(template.render(context,request)) - else: - return HttpResponseRedirect('/access/logina') \ No newline at end of file