2828 {% if forloop.last %}
2929 < li class ="breadcrumb-item active " aria-current ="page "> {{ breadcrumb.name }}</ li >
3030 {% else %}
31- < li class ="breadcrumb-item "> < a href ="{{ breadcrumb.url }} "> {{ breadcrumb.name }}</ a > </ li >
31+ {% if breadcrumb.name|lower == 'media' %}
32+ < li class ="breadcrumb-item active " aria-current ="page "> {{ breadcrumb.name }}</ li >
33+ {% else %}
34+ < li class ="breadcrumb-item "> < a href ="{{ breadcrumb.url }} "> {{ breadcrumb.name }}</ a > </ li >
35+ {% endif %}
3236 {% endif %}
3337 {% endfor %}
3438 </ ol >
6064 </ ul >
6165 </ div >
6266 < div class ="col-lg-9 border py-2 ">
63- < div class ="d-flex justify-content-end mb-3 ">
67+ < div class ="d-flex justify-content-start mb-3 ">
6468 < label for ="fileInput ">
6569 < i class ="fa-solid fa-upload text-primary fs-3 "> </ i >
6670 </ label >
8488 < td > {{ file.filename|file_extension|cut:"."|upper }}</ td >
8589 < td >
8690 < div class ="d-flex align-items-center actions ">
87- {% if file.file|file_extension in ".csv, .txt" %}
88- < a href ="/media/{{ file.file }} ">
89- < i title ="View " class ="fa-solid fa-eye text-primary "> </ i >
90- </ a >
91- {% elif file.file|file_extension == '.pdf' %}
92- < object data ="/media/{{ file.file }} " type ="application/pdf ">
93- < a href ="/media/{{ file.file }} ">
94- < i title ="View " class ="fa-solid fa-eye text-primary "> </ i >
95- </ a >
96- </ object >
97- {% else %}
98- < span data-bs-toggle ="modal " data-bs-target ="#file-{{forloop.counter}} ">
99- < i title ="View " class ="fa-solid fa-eye text-primary "> </ i >
100- </ span >
101- {% endif %}
91+ < span data-bs-toggle ="modal " data-bs-target ="#file-{{forloop.counter}} ">
92+ < i title ="View " class ="fa-solid fa-eye text-primary "> </ i >
93+ </ span >
10294 < div class ="dot-separator mx-2 "> </ div >
10395 < span >
10496 < a href ="{% url 'download_file' file.file|encoded_file_path %} ">
115107 <!-- Modal -->
116108 < div class ="modal fade " id ="file-{{forloop.counter}} " data-bs-backdrop ="static " data-bs-keyboard ="false "
117109 tabindex ="-1 " aria-labelledby ="staticBackdropLabel " aria-hidden ="true ">
118- < div class ="modal-dialog modal-dialog-centered modal-lg ">
110+ < div class ="modal-dialog modal-dialog-centered modal-xl ">
119111 < div class ="modal-content ">
120112 < div class ="modal-header ">
121113 < h1 class ="modal-title fs-5 " id ="staticBackdropLabel "> {{ file.filename }}</ h1 >
@@ -125,11 +117,13 @@ <h1 class="modal-title fs-5" id="staticBackdropLabel">{{ file.filename }}</h1>
125117 </ div >
126118 < div class ="modal-body ">
127119 {% if file.filename|file_extension in ".jpg, .png, .gif" %}
128- < img class ="w-100 " src ="/media/{{ file.file }} " alt ="df ">
120+ < img height =" 700px " class ="w-100 " src ="/media/{{ file.file }} " alt ="df ">
129121 {% elif file.filename|file_extension in ".mp4, .webm, .ogg" %}
130- < video class ="w-100 " height ="240 " controls >
122+ < video class ="w-100 " height ="700 " controls >
131123 < source src ="/media/{{ file.file }} " type ="video/mp4 ">
132124 </ video >
125+ {% elif file.filename|file_extension in ".pdf, .txt" %}
126+ < iframe src ="/media/{{ file.file }} " width ="100% " height ="700px "> </ iframe >
133127 {% endif %}
134128 </ div >
135129 </ div >
0 commit comments