From 4a0b5ae9241312d7fc2300003513baca5d6eb2d1 Mon Sep 17 00:00:00 2001 From: Mojo-03 Date: Thu, 25 Apr 2024 05:23:01 +0530 Subject: [PATCH] updated department information dynamically and changeed ui layout --- FusionIIIT/applications/department/views.py | 55 +++++++--- FusionIIIT/templates/department/admin_me.html | 2 +- FusionIIIT/templates/department/admin_sm.html | 2 +- FusionIIIT/templates/department/cse_dep.html | 45 ++------ FusionIIIT/templates/department/ece_dep.html | 30 ++---- FusionIIIT/templates/department/me_dep.html | 100 ++---------------- FusionIIIT/templates/department/sm_dep.html | 30 ++---- .../update_department_information.html | 4 +- 8 files changed, 77 insertions(+), 191 deletions(-) diff --git a/FusionIIIT/applications/department/views.py b/FusionIIIT/applications/department/views.py index 16c2aa4b7..6e5a0d936 100644 --- a/FusionIIIT/applications/department/views.py +++ b/FusionIIIT/applications/department/views.py @@ -22,6 +22,21 @@ from jsonschema.exceptions import ValidationError +def department_information(request): + + cse_info = Information.objects.filter(department_id=51).first() + ece_info = Information.objects.filter(department_id=30).first() + me_info = Information.objects.filter(department_id=37).first() + sm_info = Information.objects.filter(department_id=28).first() + department_context = { + "cse_info" : cse_info, + "ece_info" : ece_info, + "me_info" : me_info, + "sm_info" : sm_info + } + # print(department_context) + # print(me_info.phone_number,me_info.email,me_info.department_id) + return department_context def browse_announcements(): """ @@ -50,7 +65,7 @@ def browse_announcements(): "sm" : sm_ann, "all" : all_ann } - + # print(context) return context def get_make_request(user_id): @@ -107,7 +122,10 @@ def dep_main(request): context = browse_announcements() context_f = faculty() user_designation = "" - + + + department_context = department_information(request) + if fac_view: user_designation = "faculty" elif student: @@ -143,7 +161,9 @@ def dep_main(request): return render(request, template_name, { "announcements": context, "fac_list": context_f, - "requests_made": requests_made + "requests_made": requests_made, + "department_info": department_context + }) elif user_designation=="faculty": @@ -173,6 +193,7 @@ def faculty_view(request): ann_maker_id = user_info.id requests_received = get_to_request(usrnm) user_departmentid = ExtraInfo.objects.all().select_related('user','department').get(id=ann_maker_id).department_id + department_context = department_information(request) if request.method == 'POST': batch = request.POST.get('batch', '') @@ -211,7 +232,8 @@ def faculty_view(request): "user_designation": user_info.user_type, "announcements": context, "request_to": requests_received, - "fac_list": context_f + "fac_list": context_f, + "department_info": department_context }) @@ -235,6 +257,8 @@ def staff_view(request): num = 1 ann_maker_id = user_info.id user_departmentid = ExtraInfo.objects.all().select_related('user','department').get(id=ann_maker_id).department_id + + department_context = department_information(request) requests_received = get_to_request(usrnm) if request.method == 'POST': @@ -288,13 +312,9 @@ def staff_view(request): ) - - # update_department_info(request) - #find the name of designation in the table designation - # required_designation = Designation.objects.all(). - context = browse_announcements() + department_templates = { 51: 'department/csedep_request.html', 30: 'department/ecedep_request.html', @@ -312,7 +332,8 @@ def staff_view(request): "user_designation": user_info.user_type, "announcements": context, "request_to": requests_received, - "fac_list": context_f + "fac_list": context_f, + "department_info": department_context }) elif desig=='deptadmin_ece': template_name = 'department/admin_ece.html' @@ -320,7 +341,8 @@ def staff_view(request): "user_designation": user_info.user_type, "announcements": context, "request_to": requests_received, - "fac_list": context_f + "fac_list": context_f, + "department_info": department_context }) elif desig=='deptadmin_me': template_name = 'department/admin_me.html' @@ -328,7 +350,8 @@ def staff_view(request): "user_designation": user_info.user_type, "announcements": context, "request_to": requests_received, - "fac_list": context_f + "fac_list": context_f, + "department_info": department_context }) elif desig=='deptadmin_sm': template_name = 'department/admin_sm.html' @@ -336,7 +359,8 @@ def staff_view(request): "user_designation": user_info.user_type, "announcements": context, "request_to": requests_received, - "fac_list": context_f + "fac_list": context_f, + "department_info": department_context }) # if desig == 'deptadmin_cse': @@ -355,7 +379,8 @@ def staff_view(request): "user_designation": user_info.user_type, "announcements": context, "request_to": requests_received, - "fac_list": context_f + "fac_list": context_f, + "department_info": department_context }) @@ -465,6 +490,7 @@ def faculty(): # print(cse_f) return context_f + def alumni(request): """ This function is used to Return data of Alumni Department-Wise. @@ -506,6 +532,7 @@ def approved(request): request.method = '' return redirect('/dep/facView/') + def deny(request): """ This function is used to deny requests. diff --git a/FusionIIIT/templates/department/admin_me.html b/FusionIIIT/templates/department/admin_me.html index b99439ebd..e90c3f0e7 100644 --- a/FusionIIIT/templates/department/admin_me.html +++ b/FusionIIIT/templates/department/admin_me.html @@ -117,7 +117,7 @@ {# Status of request! #}
{% block request_status %} - {% include "department/request_status.html" %} + {% include "department/update_department_information.html" %} {% endblock %}
diff --git a/FusionIIIT/templates/department/admin_sm.html b/FusionIIIT/templates/department/admin_sm.html index b10544552..9630a9e1a 100644 --- a/FusionIIIT/templates/department/admin_sm.html +++ b/FusionIIIT/templates/department/admin_sm.html @@ -117,7 +117,7 @@ {# Status of request! #}
{% block request_status %} - {% include "department/request_status.html" %} + {% include "department/update_department_information.html" %} {% endblock %}
diff --git a/FusionIIIT/templates/department/cse_dep.html b/FusionIIIT/templates/department/cse_dep.html index d283a0569..210ec0086 100644 --- a/FusionIIIT/templates/department/cse_dep.html +++ b/FusionIIIT/templates/department/cse_dep.html @@ -65,49 +65,20 @@

+

Phone Number: {{ department_info.cse_info.phone_number }}

+

Email: {{ department_info.cse_info.email }}

- Central Library : + Facilities :

- Institute library has e-resources through INDEST, Science Direct, IEEE, ACM, Springger Link, Nature and ASME. The Institute also has access to various online research journals & articles like following resources SIAm, AMS, ACS, Kluwer, APS, Palgrave, INFORMS, Rev.of Scientific Instruments, Appl.Physics Letters and the search engine Scopus. Total number of books in the Institute library by the year 2009-10 are approximately 6742. -

-

- High Performance Computing Labortory : Specification of Parallel Cluster (for Central Computing Facility)- JS22 Blade No.3, 16GB(2*8GB) DDR2 533 Mhz DiMMs, IBM 146GB SAS 10K SFF HDD, IBM blade center JS22 4-core 4.0 Ghz Processor and WiFi Campus etc. -

+ {{ department_info.cse_info.facilites|linebreaks}} +

Lab Infrastructure :

-
    -
  1. -

    - Advanced Manufacturing Laboratory : This Laboratory contains Rapid Prototyping Machine, CNC Controlled Abrasive Waterjet Machine, CNC Milling Center, CNC Turning Center, Dynamometer, Electro Chemical Machining System, Injection Moulding Machine etc. -

    -
  2. -
    -
  3. -

    - Biometric Laboratory : This Laboratory contains S Series, H Series, W Series cameras and p6 p520(Tower Model), p6 p520:8203 Model servers Made by IBM etc. -

    -
  4. -
    -
  5. -

    - Digital Signal Processing and Image Processing Laboratory : This Laboratory contains DSP Starter SPARTAN-3 kit (DSK), TMS 320C6713 DSK with CCS (Code Composer Studio), Image Daughter Kit with CCD Cameras, Bloom with DSP, Matrox Imaging Library, Matrox Morphis, Frame Graber Card, Color CCD Camera for online Processing etc. -

    -
  6. -
    -
  7. -

    - Infrared Imaging Laboratory : This Laboratory contains Radiometeric calibration, Extender rings, NDT Base Module, Central computing unit with TFT display, Software Modules for Lockin, Transient-and Pulse Measurement, Module Pulse- and Transient- Thermography, Source for Vibro- Thermography etc. -

    -
  8. -
    -
  9. -

    - Materials Research Laboratory : This Laboratory contains three important instruments for material characterization which are X-Ray Diffractometer (XRD), Scanning Electron Microscope (SEM) and Atomic Force Microscope (AFM) including SPM, MFM etc. -

    -
  10. -
+

+ {{ department_info.cse_info.labs|linebreaks }} +

diff --git a/FusionIIIT/templates/department/ece_dep.html b/FusionIIIT/templates/department/ece_dep.html index f71563868..cb43e5361 100644 --- a/FusionIIIT/templates/department/ece_dep.html +++ b/FusionIIIT/templates/department/ece_dep.html @@ -64,34 +64,20 @@

+

Phone Number: {{ department_info.ece_info.phone_number }}

+

Email: {{ department_info.ece_info.email }}

- Central Library : + Facilities :

- Institute library has e-resources through INDEST, Science Direct, IEEE, ACM, Springger Link, Nature and ASME. The Institute also has access to various online research journals & articles like following resources SIAm, AMS, ACS, Kluwer, APS, Palgrave, INFORMS, Rev.of Scientific Instruments, Appl.Physics Letters and the search engine Scopus. Total number of books in the Institute library by the year 2009-10 are approximately 6742. -

+ {{ department_info.ece_info.facilites|linebreaks}} +

Lab Infrastructure :

-
    -
  1. -

    - Circuits and Innovation Lab :This laboratory is dedicated to circuits designing, is intended to serve its facilities as one of the teaching labs and also to facilitate teaching projects and research projects. These projects and teaching work include the experimental and innovative study in the field of analog and digital circuits, microcontrollers and its applications. -

    -
  2. -
    -
  3. -

    - Basic Electronics lab : This Laboratory is dedicated to the concepts and implementation of basic circuits designing. It serves its facilities as one of the teaching labs and also to facilitate course projects -

    -
  4. -
    -
  5. -

    - RF&Applied Electromagnetics : This Laboratory acts as a research lab to researchscholars,research associatives. Main research areas of lab include understanding of high frequency devices ,Antenna theory concepts and design fields. -

    -
  6. -
+

+ {{ department_info.ece_info.labs|linebreaks }} +

diff --git a/FusionIIIT/templates/department/me_dep.html b/FusionIIIT/templates/department/me_dep.html index 77e46f4c2..37dabf835 100644 --- a/FusionIIIT/templates/department/me_dep.html +++ b/FusionIIIT/templates/department/me_dep.html @@ -65,110 +65,26 @@

+

Phone Number: {{ department_info.me_info.phone_number }}

+

Email: {{ department_info.me_info.email }}

- Central Library : + Facilities :

- Institute library has e-resources through INDEST, Science Direct, IEEE, ACM, Springger Link, Nature and ASME. The Institute also has access to various online research journals & articles like following resources SIAm, AMS, ACS, Kluwer, APS, Palgrave, INFORMS, Rev.of Scientific Instruments, Appl.Physics Letters and the search engine Scopus. Total number of books in the Institute library by the year 2009-10 are approximately 6742. -

-

- High Performance Computing Labortory : Specification of Parallel Cluster (for Central Computing Facility)- JS22 Blade No.3, 16GB(2*8GB) DDR2 533 Mhz DiMMs, IBM 146GB SAS 10K SFF HDD, IBM blade center JS22 4-core 4.0 Ghz Processor and WiFi Campus etc. -

+ {{ department_info.me_info.facilites|linebreaks}} +

Lab Infrastructure :

-
    -
  1. -

    - Health Monitoring, Measurement and Instrumentation Lab: -

    -
  2. -
    -
  3. -

    - Kinematics and Dynamics Lab : -

    -
  4. -
    -
  5. -

    - PG Research Lab : -

    -
  6. -
    -
  7. -

    - Fluid Mechaniccs Lab : -

    -
  8. -
    -
  9. -

    - Automobile Lab : -

    -
  10. -
    -
  11. -

    - IT Workshop/Computational Lab: -

    -
  12. -
    -
  13. -

    - Material Characterization Lab : -

    -
  14. -
    -
  15. -

    - Machine Dynamics and Vibrations Lab : -

    -
  16. -
    -
  17. -

    - Mechatronics Lab: -

    -
  18. -
    -
  19. -

    - Robotics Lab: -

    -
  20. -
    -
  21. -

    - Biomedical Engineering and Technology Lab: -

    -
  22. -
    -
  23. -

    - CFD Lab : -

    -
  24. -
    -
  25. -

    - Dieless Manufacturing Center: -

    -
  26. -
    -
  27. -

    - Manufacturing Innovation Center: -

    -
  28. -
+

+ {{ department_info.me_info.labs|linebreaks }} +

- {% comment %} tabs content faculty {% endcomment %} {% comment %}The tab menu starts here!{% endcomment %}
diff --git a/FusionIIIT/templates/department/sm_dep.html b/FusionIIIT/templates/department/sm_dep.html index 7131546e0..9ff46c1a4 100644 --- a/FusionIIIT/templates/department/sm_dep.html +++ b/FusionIIIT/templates/department/sm_dep.html @@ -77,34 +77,20 @@

+

Phone Number: {{ department_info.sm_info.phone_number }}

+

Email: {{ department_info.sm_info.email }}

- Central Library : + Facilities :

- Institute library has e-resources through INDEST, Science Direct, IEEE, ACM, Springger Link, Nature and ASME. The Institute also has access to various online research journals & articles like following resources SIAm, AMS, ACS, Kluwer, APS, Palgrave, INFORMS, Rev.of Scientific Instruments, Appl.Physics Letters and the search engine Scopus. Total number of books in the Institute library by the year 2009-10 are approximately 6742. -

+ {{ department_info.sm_info.facilites|linebreaks}} +

Lab Infrastructure :

-
    -
  1. -

    - Circuits and Innovation Lab :This laboratory is dedicated to circuits designing, is intended to serve its facilities as one of the teaching labs and also to facilitate teaching projects and research projects. These projects and teaching work include the experimental and innovative study in the field of analog and digital circuits, microcontrollers and its applications. -

    -
  2. -
    -
  3. -

    - Basic Electronics lab : This Laboratory is dedicated to the concepts and implementation of basic circuits designing. It serves its facilities as one of the teaching labs and also to facilitate course projects -

    -
  4. -
    -
  5. -

    - RF&Applied Electromagnetics : This Laboratory acts as a research lab to researchscholars,research associatives. Main research areas of lab include understanding of high frequency devices ,Antenna theory concepts and design fields. -

    -
  6. -
+

+ {{ department_info.sm_info.labs|linebreaks }} +

diff --git a/FusionIIIT/templates/department/update_department_information.html b/FusionIIIT/templates/department/update_department_information.html index 7a952df9c..fb5f447c9 100644 --- a/FusionIIIT/templates/department/update_department_information.html +++ b/FusionIIIT/templates/department/update_department_information.html @@ -34,12 +34,12 @@
- +
- +