-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add folder, directory, and search pages
- Loading branch information
1 parent
394fd0c
commit d73229c
Showing
23 changed files
with
348 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
.nowrap { | ||
white-space: nowrap; | ||
} | ||
|
||
.overflow-hidden, | ||
.overflow-hover { | ||
overflow: hidden; | ||
text-overflow: ellipsis; | ||
} | ||
|
||
.overflow-hover { | ||
@media (hover) { | ||
&:hover { | ||
overflow: visible; | ||
} | ||
} | ||
} | ||
|
||
.breakword { | ||
word-break: break-word; | ||
|
||
code { | ||
white-space: pre-wrap; | ||
} | ||
} | ||
|
||
.center-horizontally { | ||
display: flex; | ||
justify-content: center; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
@each $name, $theme in $themes { | ||
.theme-#{$name}-bg { | ||
@if map-get($theme, link-color) { | ||
.page-item.active { | ||
.page-link { | ||
background-color: map-get($theme, link-color); | ||
border-color: map-get($theme, link-color); | ||
color: map-get($theme, brand-white); | ||
} | ||
} | ||
.page-link { | ||
color: map-get($theme, link-color); | ||
|
||
&:hover, | ||
&:focus, | ||
&:active { | ||
color: map-get($theme, link-color); | ||
text-decoration: none; | ||
} | ||
} | ||
} @else { | ||
.page-item.active { | ||
.page-link { | ||
background-color: map-get($theme, primary); | ||
border-color: map-get($theme, primary); | ||
color: map-get($theme, brand-white); | ||
} | ||
} | ||
.page-link { | ||
color: map-get($theme, primary); | ||
|
||
&:hover, | ||
&:focus, | ||
&:active { | ||
color: map-get($theme, primary); | ||
text-decoration: none; | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,19 @@ | ||
.col-12.col-md-3.col-xl-2.sidebar-wrapper | ||
.sidebar | ||
#sidebar-nav-wrapper.sidebar-nav-wrapper.collapse | ||
.pt-3.py-md-3.mx-3.my-0.ml-md-3.mb-md-3.mr-md-0 | ||
#sidebar-nav-wrapper.sidebar-nav-wrapper.collapse.pt-3.py-md-3 | ||
.mx-3.my-0.ml-md-3.mb-md-3.mr-md-0 | ||
%ul.sidebar-menu.sidebar-menu-shadow | ||
%li.sidebar-menu-header= render "sidebar/toggle", title: "Loft-HF" | ||
%li.sidebar-menu-header= render "sidebar/toggle", title: ENV["website_name"] | ||
%li= link_to "Dashboard", dashboard_path, class: current_page?(dashboard_path) ? "active" : nil | ||
%li= link_to "Directory", directory_path, class: current_page?(directory_path) ? "active" : nil | ||
|
||
.mx-3.my-0.ml-md-3.mb-md-3.mr-md-0 | ||
%ul.sidebar-menu.sidebar-menu-shadow | ||
%li.sidebar-menu-header Documents | ||
%li= link_to "Manual of Procedures", folder_path(title: "Manual of Procedures"), class: current_page?(folder_path(title: "Manual of Procedures")) ? "active" : nil | ||
|
||
- if false | ||
.mx-3.my-0.ml-md-3.mb-md-3.mr-md-0 | ||
%ul.sidebar-menu.sidebar-menu-shadow | ||
%li.sidebar-menu-header DSMB Reports | ||
%li= link_to "Subset B", folder_path(title: "b"), class: current_page?(folder_path(title: "b")) ? "active" : nil |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
- @title = "Directory" | ||
|
||
- @theme = "default" | ||
- content_for :header, @title | ||
= render "internal/tabs" | ||
- content_for :sidebar, render("internal/sidebar") | ||
|
||
- if @users.present? | ||
.dashboard-container.dashboard-table | ||
%table.table.table-striped.table-borderless.table-hover.table-sticky | ||
%col | ||
%thead | ||
%tr | ||
%th Name | ||
%th Email | ||
|
||
- @users.each do |user| | ||
%tr | ||
%td= user.full_name | ||
%td= user.email | ||
|
||
.center-horizontally= paginate @users, theme: "bootstrap" | ||
|
||
.jumbotron.jumbotron-custom-text.jumbotron-shadow | ||
= icon("far", "comments") | ||
= mail_to ActionMailer::Base.smtp_settings[:email], "Contact us" | ||
if your listed information is incorrect. | ||
|
||
- else | ||
.jumbotron.jumbotron-custom-text | ||
= icon("fas", "clone", class: "mr-1") | ||
No users found. | ||
= link_to "Start over", directory_path if params[:search].present? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
- @title = "Folder" | ||
|
||
- @theme = "default" | ||
- content_for :header, @title | ||
= render "internal/tabs" | ||
- content_for :sidebar, render("internal/sidebar") | ||
|
||
.dashboard-container.dashboard-container-border-accent | ||
.d-inline-block.mr-1= icon("far", "file-alt") | ||
.d-inline{ style: "font-weight: 200;" }= params[:title] | ||
.dashboard-container.dashboard-table | ||
%table.table.table-striped.table-borderless.table-hover.table-sticky | ||
%col | ||
%col | ||
%col{ width: "1px" } | ||
%thead | ||
%tr | ||
%th File | ||
%th.text-center Size | ||
%th.text-center Uploaded | ||
%tr | ||
%td | ||
%span.text-primary Introduction.pdf | ||
%small.text-muted (download disabled) | ||
%td.text-center.small | ||
= number_to_human_size 202049 | ||
%td.text-center.nowrap.small | ||
= (Time.zone.now - 1.day).strftime("%Y-%^b-%d") | ||
%tr | ||
%td | ||
%span.text-primary MOP-Final-revision.pdf | ||
%small.text-muted (download disabled) | ||
%td.text-center.small | ||
= number_to_human_size 4022049 | ||
%td.text-center.nowrap.small | ||
= (Time.zone.now - 2.day).strftime("%Y-%^b-%d") | ||
.jumbotron.jumbotron-custom-text.jumbotron-shadow | ||
= icon("fas", "info-circle") | ||
Not finding a specific file? Use the search to find it more quickly. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
- @title = "Search" | ||
|
||
- @theme = "default" | ||
= render "internal/tabs" | ||
- @container = "container-fluid" | ||
|
||
.page-box.p-0.last-box.d-flex.flex-column.justify-content-between | ||
%div | ||
.header-container{ class: content_for?(:tabs) ? "header-container-no-border" : nil } | ||
.container-fluid | ||
%h1.page-heading | ||
= @title | ||
.header-tabs | ||
.container-fluid | ||
= yield :tabs | ||
.row.no-gutters.flex-md-nowrap.theme-custom-spacing | ||
%main.col.p-3.remove-last-margin{ role: "main" } | ||
.container | ||
= form_with url: search_path, method: :get, local: true, id: "search-form", class: "my-3", skip_enforcing_utf8: true do |form| | ||
.input-group | ||
= form.text_field :search, value: params[:search], class: "form-control form-control-lg", placeholder: "Start your search...", autocomplete: "off", autofocus: params[:search].blank? | ||
.input-group-append | ||
= link_to "#", class: "btn btn-lg btn-primary", data: { object: "submit-and-disable", target: "#search-form" } do | ||
%i.fa.fa-search | ||
|
||
- if @search_documents.present? | ||
- @search_documents.each do |document| | ||
.dashboard-container.dashboard-container-border-accent | ||
- case document.searchable.class.to_s | ||
- when "User" | ||
.d-flex.align-items-center | ||
.d-inline-block.mr-1.text-primary-muted.pr-3= icon("far", "user", class: "fa-3x") | ||
.d-inline{ style: "font-weight: 200;" } | ||
.text-dark= document.searchable.full_name | ||
.text-muted | ||
= document.searchable.email | ||
- else | ||
.d-inline-block.mr-1= icon("far", "file-alt") | ||
.d-inline.text-muted{ style: "font-weight: 200;" } File | ||
- elsif params[:search].present? | ||
.mt-5.mb-4.text-center{ style: "font-weight: 300;font-size: 1.25rem;" } | ||
No results returned. | ||
= link_to "Start over.", search_path | ||
- else | ||
.mt-5.mb-4.text-center.text-primary-muted{ style: "font-weight: 300;font-size: 1.25rem;" } Search for files and users. | ||
|
||
|
||
.py-5.footer-custom-bg | ||
.container | ||
.lead.text-center.mb-5 | ||
= icon("far", "comments") | ||
|
||
= mail_to ActionMailer::Base.smtp_settings[:email], "Contact us" | ||
with any questions. | ||
|
||
- if false | ||
Have another question? | ||
|
||
= link_to contact_path do | ||
%span.nowrap | ||
Contact us | ||
%i.fa.fa-caret-right | ||
|
||
.text-center | ||
.text-center.pt-5= image_tag "logos/loft-logo-v1.png", style: "max-width: 400px;width: 100%;height: auto;", class: "img-ignore-selection rounded" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.