Initial commit
This commit is contained in:
11
app/views/application/_breadcrumbs.html.erb
Normal file
11
app/views/application/_breadcrumbs.html.erb
Normal file
@@ -0,0 +1,11 @@
|
||||
<% if breadcrumbs? %>
|
||||
<nav aria-label="breadcrumb">
|
||||
<ol class="breadcrumb small">
|
||||
<% breadcrumb_trail do |crumb| %>
|
||||
<li class="breadcrumb-item <%= crumb.current? ? "active" : "" %>">
|
||||
<%= link_to_unless crumb.current?, crumb.name, crumb.url, (crumb.current? ? {"aria-current" => "page"} : {}) %>
|
||||
</li>
|
||||
<% end %>
|
||||
</ol>
|
||||
</nav>
|
||||
<% end %>
|
||||
5
app/views/application/_flash.html.erb
Normal file
5
app/views/application/_flash.html.erb
Normal file
@@ -0,0 +1,5 @@
|
||||
<% if flash.alert.present? %>
|
||||
<div class="alert alert-danger text-center text-md-left"><%= flash.alert.html_safe %></div>
|
||||
<% elsif flash.notice.present? %>
|
||||
<div class="alert alert-primary text-center text-md-left"><%= flash.notice.html_safe %></div>
|
||||
<% end %>
|
||||
58
app/views/application/_header.html.erb
Normal file
58
app/views/application/_header.html.erb
Normal file
@@ -0,0 +1,58 @@
|
||||
<header class="container-fluid bg-light border-bottom py-3 sticky-top">
|
||||
<div class="row align-items-center">
|
||||
<div class="col-4">
|
||||
<%= link_to signed_in_root_path, class: "navbar-brand" do %>
|
||||
<%= suite_wordmark %>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="col-4 text-center">
|
||||
<h1 class="h4 m-0">
|
||||
<% if signed_in? %>
|
||||
<% if Current.user.accounts.size > 1 %>
|
||||
<div class="dropdown">
|
||||
<button class="btn btn-secondary dropdown-toggle" type="button" id="dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
<%= Current.account.name %>
|
||||
</button>
|
||||
<div class="dropdown-menu" aria-labelledby="dropdownMenuButton">
|
||||
<% Current.user.accounts.each do |account| %>
|
||||
<%= link_to(account.name, account_session_path({ account_session: { account_id: account.id } }), class: "dropdown-item", method: :put) %>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<% else %>
|
||||
<%= Current.account.name if Current.account %>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<%= yield :page_title %>
|
||||
<% end %>
|
||||
</h1>
|
||||
</div>
|
||||
<div class="col-4 text-right">
|
||||
<% if signed_in? %>
|
||||
<div class="btn-group">
|
||||
<%= link_to :profile, class: "text-decoration-none text-reset dropdown-toggle", data: { toggle: "dropdown" } do %>
|
||||
<span class="mr-2"><%= get_name_or_email(Current.user) %></span>
|
||||
<%= image_or_text_avatar(Current.user) %>
|
||||
<% end %>
|
||||
|
||||
<div class="dropdown-menu">
|
||||
<% if Current.user.admin? %>
|
||||
<%= link_to "BIG Admin", [:admin, :signed_in_root], class: "dropdown-item" %>
|
||||
<% end %>
|
||||
|
||||
<%= link_to "Profile Settings", profile_path, class: "dropdown-item" %>
|
||||
|
||||
<% if Current.account && Current.user.account_manager?(Current.account) %>
|
||||
<%= link_to "Account Settings", [:account_auths], class: "dropdown-item" %>
|
||||
<% end %>
|
||||
|
||||
<%= link_to t(".sign_out"), :session, method: :delete, class: "dropdown-item" %>
|
||||
</div>
|
||||
</div>
|
||||
<% elsif params[:controller] != "sessions" %>
|
||||
<span class="navbar-text">Already Have a ME Suite Account?</span>
|
||||
<%= link_to "Sign In", [:new, :session], class: "btn btn-sm btn-light border" %>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
3
app/views/application/_masquerade.html.erb
Normal file
3
app/views/application/_masquerade.html.erb
Normal file
@@ -0,0 +1,3 @@
|
||||
<div class="alert alert-warning fixed-bottom mb-0 text-center">
|
||||
<%= link_to fa_icon("user-secret", text: "Stop Masquerading"), admin_masquerade_path, method: :delete %>
|
||||
</div>
|
||||
50
app/views/application/_sidebar.html.erb
Normal file
50
app/views/application/_sidebar.html.erb
Normal file
@@ -0,0 +1,50 @@
|
||||
<aside class="bg-dark text-white p-4 rounded">
|
||||
<h1 class="h4 mb-0"><%= project.name %></h1>
|
||||
<small class="font-weight-bold text-primary text-uppercase"><%= project.client_name %></small>
|
||||
<nav class="mt-3">
|
||||
<ul class="nav nav-pills nav-pills-dark flex-column">
|
||||
<li class="nav-item">
|
||||
<%= link_to fa_icon("folder fw", text: t(".files")), project, class: class_string("nav-link" => true, active: sidenav_files_nav_link_active?(project)) %>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
<hr class="divider-light mx-n4">
|
||||
<nav>
|
||||
<ul class="nav nav-pills nav-pills-dark flex-column">
|
||||
<li class="nav-item">
|
||||
<%= link_to [project, :contract_templates], class: class_string("nav-link", "active" => %w(contract_templates release_template_imports).include?(controller_name)) do %>
|
||||
<%= lock_icon_for Current.account, :releaseme %>
|
||||
<%= product_wordmark :release_me, class: class_string("d-inline-block", "disabled" => !Current.account.releaseme_enabled?) %>
|
||||
<% end %>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<%= link_to [project, :broadcasts], class: class_string("nav-link", "active" => controller_name == "broadcasts") do %>
|
||||
<%= lock_icon_for(Current.account, :directme) %>
|
||||
<%= product_wordmark :direct_me, class: class_string("d-inline-block", "disabled" => !Current.account.directme_enabled?) %>
|
||||
<% end %>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<%= link_to "#", class: "nav-link" do %>
|
||||
<%= lock_icon_for(Current.account, :editme) %>
|
||||
<%= product_wordmark :edit_me, class: "d-inline-block disabled" %>
|
||||
<% end %>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<%= link_to [project, :videos], class: class_string("nav-link", "active" => controller_name == "videos") do %>
|
||||
<%= lock_icon_for(Current.account, :deliverme) %>
|
||||
<%= product_wordmark :deliver_me, class: class_string("d-inline-block", "disabled" => !Current.account.deliverme_enabled?) %>
|
||||
<% end %>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
<hr class="divider-light mx-n4">
|
||||
<div class="d-flex justify-content-between">
|
||||
<%= pluralize project.members.size, t(".team_member") %>
|
||||
<%= link_to fa_icon("gear"), [project, :project_memberships], class: "text-muted" %>
|
||||
</div>
|
||||
<ul class="list-unstyled d-flex flex-row flex-wrap justify-content-start align-items-center">
|
||||
<% project.members.each do |member| %>
|
||||
<li class="list-inline-item mt-2"><%= image_or_text_avatar(member) %></li>
|
||||
<% end %>
|
||||
</ul>
|
||||
</aside>
|
||||
Reference in New Issue
Block a user