Index: resources/views/dashboard/folders/files.blade.php
===================================================================
--- resources/views/dashboard/folders/files.blade.php	(revision c6b84df06586305606df5b76204a64cdc63b09a2)
+++ resources/views/dashboard/folders/files.blade.php	(revision a0635eb17a5e94ef0f7516801a86eaf53c605263)
@@ -2,7 +2,4 @@
 
 @section("title", "SaveSpace - Folder")
-
-@section('pageTitle', 'SaveSpace - Folder')
-
 
 @section('content')
@@ -103,5 +100,5 @@
                                     </a>
                                     <div class="dropdown-menu dropdown-menu-right">
-                                        <a href="javascript:void(0)" class="dropdown-item" data-toggle="modal" data-target="#editModal_{{$file->id}}">
+                                        <a href="javascript:void(0)" class="dropdown-item" data-toggle="modal" data-target="#editFileModal_{{$file->id}}">
                                             Rename
                                         </a>
@@ -147,5 +144,5 @@
                     </div>
 
-                    <div class="modal fade" id="editModal_{{$file->id}}" tabindex="-1" role="dialog" aria-hidden="true">
+                    <div class="modal fade" id="editFileModal_{{$file->id}}" tabindex="-1" role="dialog" aria-hidden="true">
                         <div class="modal-dialog modal-dialog-centered modal-lg" role="document">
                             <div class="modal-content">
@@ -176,4 +173,72 @@
                                     </form>
                                 </div>
+                            </div>
+                        </div>
+                    </div>
+                @empty
+                    <div class="col-xl-3 col-lg-4 col-md-6 col-sm-12">No items found</div>
+                @endforelse
+
+                    <div class="modal fade" id="editModal_{{$folder->id}}" tabindex="-1" role="dialog" aria-hidden="true">
+                        <div class="modal-dialog modal-dialog-centered modal-lg" role="document">
+                            <div class="modal-content">
+                                <div class="modal-header">
+                                    <h5 class="modal-title" id="exampleModalCenterTitle">Edit folder</h5>
+                                    <button type="button" class="close" data-dismiss="modal" aria-label="Close">
+                                        <i class="ti-close"></i>
+                                    </button>
+                                </div>
+                                <div class="modal-body">
+                                    <form action="{{ route("dashboard.folders.edit", ["id" => $folder->id]) }}" method="post" accept-charset="utf-8" enctype="multipart/form-data">
+                                        @method("patch")
+                                        @csrf
+                                        <div class="row">
+                                            <div class="col-md-6">
+                                                <div class="form-group">
+                                                    <label>Department</label>
+                                                    <select class="form-control edit_folder_deparment" name="department" required>
+                                                        @foreach ($departments as $department)
+                                                            <option value="{{ $department->id }}" data-dept-code="{{ $department->code }}" {{ old("department", $folder->department->id) == $department->id ? "selected" : "" }}>{{ $department->name }}</option>
+                                                        @endforeach
+                                                    </select>
+                                                </div>
+                                            </div>
+                                            <div class="col-md-6">
+                                                <div class="form-group">
+                                                    <label>Archive ID</label>
+                                                    <input type="text" name="arch_id" value="{{ old("arch_id", $folder->arch_id) }}" class="form-control" placeholder="Archive ID" required>
+                                                </div>
+                                            </div>
+                                        </div>
+                                        <div class="row">
+                                            <div class="col-md-6">
+                                                <div class="form-group">
+                                                    <label>Name</label>
+                                                    <input type="text" name="name" value="{{ old("name", $folder->name) }}" class="form-control" placeholder="Name" minlength="2" maxlength="30" required>
+                                                </div>
+                                            </div>
+                                            <div class="col-md-6">
+                                                <div class="form-group">
+                                                    <label>Note</label>
+                                                    <textarea class="form-control" name="note" maxlength="80">
+                                                        {{ old("note", $folder->note) }}
+                                                    </textarea>
+                                                </div>
+                                            </div>
+                                        </div>
+                                        <div class="row">
+                                            <div class="col-md-6">
+                                                <input type="file" class="form-control" id="file-item" name="file_item[]" accept="{{ $fileTypes }}" multiple>
+                                            </div>
+                                        </div>
+                                        <br/>
+                                        <div class="modal-footer">
+                                            <button type="button" class="btn btn-secondary" data-dismiss="modal">Close
+                                            </button>
+                                            <button type="submit" class="btn btn-primary">Save changes</button>
+                                        </div>
+                                    </form>
+                                </div>
+
                             </div>
                         </div>
@@ -255,7 +320,4 @@
                         </div>
                     </div>
-                @empty
-                    <div class="col-xl-3 col-lg-4 col-md-6 col-sm-12">No items found</div>
-                @endforelse
             </div>
 
@@ -266,69 +328,4 @@
         </div>
 
-        <div class="modal fade" id="editModal_{{$folder->id}}" tabindex="-1" role="dialog" aria-hidden="true">
-            <div class="modal-dialog modal-dialog-centered modal-lg" role="document">
-                <div class="modal-content">
-                    <div class="modal-header">
-                        <h5 class="modal-title" id="exampleModalCenterTitle">Edit folder</h5>
-                        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
-                            <i class="ti-close"></i>
-                        </button>
-                    </div>
-                    <div class="modal-body">
-                        <form action="{{ route("dashboard.folders.edit", ["id" => $folder->id]) }}" method="post" accept-charset="utf-8" enctype="multipart/form-data">
-                            @method("patch")
-                            @csrf
-                            <div class="row">
-                                <div class="col-md-6">
-                                    <div class="form-group">
-                                        <label>Folder</label>
-                                        <select class="form-control edit_folder_deparment" name="department" required>
-                                            @foreach ($departments as $department)
-                                                <option value="{{ $department->id }}" data-dept-code="{{ $department->code }}" {{ old("department", $folder->department->id) == $department->id ? "selected" : "" }}>{{ $department->name }}</option>
-                                            @endforeach
-                                        </select>
-                                    </div>
-                                </div>
-                                <div class="col-md-6">
-                                    <div class="form-group">
-                                        <label>Archive ID</label>
-                                        <input type="text" name="arch_id" value="{{ old("arch_id", $folder->arch_id) }}" class="form-control" placeholder="Archive ID" required>
-                                    </div>
-                                </div>
-                            </div>
-                            <div class="row">
-                                <div class="col-md-6">
-                                    <div class="form-group">
-                                        <label>Name</label>
-                                        <input type="text" name="name" value="{{ old("name", $folder->name) }}" class="form-control" placeholder="Name" minlength="2" maxlength="30" required>
-                                    </div>
-                                </div>
-                                <div class="col-md-6">
-                                    <div class="form-group">
-                                        <label>Note</label>
-                                        <textarea class="form-control" name="note" maxlength="80">
-                                                        {{ old("note", $folder->note) }}
-                                                    </textarea>
-                                    </div>
-                                </div>
-                            </div>
-                            <div class="row">
-                                <div class="col-md-6">
-                                    <input type="file" class="form-control" id="file-item" name="file_item[]" accept="{{ $fileTypes }}" multiple>
-                                </div>
-                            </div>
-                            <br/>
-                            <div class="modal-footer">
-                                <button type="button" class="btn btn-secondary" data-dismiss="modal">Close
-                                </button>
-                                <button type="submit" class="btn btn-primary">Save changes</button>
-                            </div>
-                        </form>
-                    </div>
-
-                </div>
-            </div>
-        </div>
-
     </div>
 
Index: resources/views/dashboard/folders/index.blade.php
===================================================================
--- resources/views/dashboard/folders/index.blade.php	(revision c6b84df06586305606df5b76204a64cdc63b09a2)
+++ resources/views/dashboard/folders/index.blade.php	(revision a0635eb17a5e94ef0f7516801a86eaf53c605263)
@@ -2,6 +2,4 @@
 
 @section("title", "SaveSpace - Folders")
-
-@section('pageTitle', 'SaveSpace - Folders')
 
 @section('content')
@@ -93,7 +91,9 @@
                                     <a class="dropdown-item" href="{{ URL::current()."?id=".Request::get('id')."&sort=newest" }}">Date</a>
                                     <a class="dropdown-item" href="{{ URL::current()."?id=".Request::get('id')."&sort=name" }}">Name</a>
+                                    <a class="dropdown-item" href="{{ URL::current()."?id=".Request::get('id')."&sort=no_of_files" }}">Number of files</a>
                                 @else
                                     <a class="dropdown-item" href="{{ URL::current()."?sort=newest" }}">Date</a>
                                     <a class="dropdown-item" href="{{ URL::current()."?sort=name" }}">Name</a>
+                                    <a class="dropdown-item" href="{{ URL::current()."?sort=no_of_files" }}">Number of files</a>
                                 @endif
                             </div>
@@ -240,4 +240,32 @@
                     </div>
 
+                    <div class="modal fade" id="deleteModal_{{$folder->id}}" tabindex="-1" role="dialog" aria-hidden="true">
+                        <div class="modal-dialog modal-dialog-centered" role="document">
+                            <div class="modal-content">
+                                <div class="modal-header">
+                                    <h5 class="modal-title" id="exampleModalCenterTitle">Delete confirmation</h5>
+                                    <button type="button" class="close" data-dismiss="modal" aria-label="Close">
+                                        <i class="ti-close"></i>
+                                    </button>
+                                </div>
+                                <div class="modal-body">
+                                    <form action="{{ route("dashboard.folders.destroy", $folder->id) }}" method="POST">
+                                        @csrf
+                                        @method('DELETE')
+                                        <p>Are you sure you want to delete folder {{$folder->name}} with Archive ID: {{ $folder->arch_id }}?</p>
+                                        <div class="modal-footer">
+                                            <button type="button" class="btn btn-secondary" data-dismiss="modal">Close
+                                            </button>
+                                            <button type="submit" class="btn btn-primary">Save changes</button>
+                                        </div>
+                                    </form>
+                                </div>
+                            </div>
+                        </div>
+                    </div>
+                @empty
+                    <div class="col-xl-3 col-lg-4 col-md-6 col-sm-12">No items found</div>
+                @endforelse
+
                     <div class="modal fade" id="createModal" tabindex="-1" role="dialog" aria-hidden="true">
                         <div class="modal-dialog modal-dialog-centered modal-lg" role="document">
@@ -316,32 +344,4 @@
                     </div>
 
-                    <div class="modal fade" id="deleteModal_{{$folder->id}}" tabindex="-1" role="dialog" aria-hidden="true">
-                        <div class="modal-dialog modal-dialog-centered" role="document">
-                            <div class="modal-content">
-                                <div class="modal-header">
-                                    <h5 class="modal-title" id="exampleModalCenterTitle">Delete confirmation</h5>
-                                    <button type="button" class="close" data-dismiss="modal" aria-label="Close">
-                                        <i class="ti-close"></i>
-                                    </button>
-                                </div>
-                                <div class="modal-body">
-                                    <form action="{{ route("dashboard.folders.destroy", $folder->id) }}" method="POST">
-                                        @csrf
-                                        @method('DELETE')
-                                        <p>Are you sure you want to delete folder {{$folder->name}} with Archive ID: {{ $folder->arch_id }}?</p>
-                                        <div class="modal-footer">
-                                            <button type="button" class="btn btn-secondary" data-dismiss="modal">Close
-                                            </button>
-                                            <button type="submit" class="btn btn-primary">Save changes</button>
-                                        </div>
-                                    </form>
-                                </div>
-                            </div>
-                        </div>
-                    </div>
-                @empty
-                    <div class="col-xl-3 col-lg-4 col-md-6 col-sm-12">No items found</div>
-                @endforelse
-
             </div>
             @if(!Request::query('search'))
