Skip to content

Default Theme (CFM-174) #32

Merged
merged 8 commits into from Jun 23, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
22 changes: 19 additions & 3 deletions NOTICE
Expand Up @@ -56,6 +56,10 @@ files and utilities for further information:
MIT License
https://getbootstrap.com/

Duet Date Picker (app/webroot/js/duet-datepicker)
MIT License
https://github.com/duetds/date-picker

Guzzle (app/AvailablePlugin/GithubProvisioner/Vendor/guzzle)
MIT License
https://github.com/guzzle/guzzle
Expand All @@ -68,16 +72,28 @@ files and utilities for further information:
MIT License
https://bitbucket.org/pellepim/jstimezonedetect

noty (app/webroot/js/jquery/noty)
MIT License
http://ned.im/noty
Material Icons (app/webroot/css/fonts/material-icons)
Apache 2.0
https://fonts.google.com/icons?selected=Material+Icons

Open Sans (app/webroot/css/fonts/opensans)
Apache 2.0
https://fonts.google.com/specimen/Open+Sans

PHP GitHub API 2.0 (app/AvailablePlugin/GithubProvisioner/Vendor/guzzle/guzzle)
MIT License
https://github.com/KnpLabs/php-github-api

Select 2
MIT License
https://select2.org/

Shibboleth Embedded Discovery Service (app/webroot/js/eds)
Apache 2.0
https://shibboleth.net/products/embedded-discovery-service.html

vuejs
MIT License
https://vuejs.org/

---------------------------------------------------------------------------
3 changes: 3 additions & 0 deletions app/resources/locales/en_US/field.po
Expand Up @@ -248,6 +248,9 @@ msgstr "Required"
msgid "room"
msgstr "Room"

msgid "search.placeholder"
msgstr "Search..."

msgid "sponsor"
msgstr "Sponsor"

Expand Down
51 changes: 50 additions & 1 deletion app/resources/locales/en_US/menu.po
Expand Up @@ -25,13 +25,62 @@
# Menu Messages

msgid "co.configuration"
msgstr "Configuration"
msgstr "Config"

msgid "co.connections"
msgstr "Connections"

msgid "co.lifecycle"
msgstr "Lifecycle"

msgid "co.operations"
msgstr "Operations"

msgid "co.groups"
msgstr "Groups"

msgid "co.people"
msgstr "People"

msgid "co.people.enrollments.pending"
msgstr "Pending Enrollments"

msgid "co.people.enrollments.pending.desc"
msgstr "See and manage in-progress enrollments (CO Petitions)"

msgid "co.people.external.source.records"
msgstr "External Source Records"

msgid "co.people.external.source.records.desc"
msgstr "See and manage information from your external sources"

msgid "co.people.panel.title"
msgstr "People"

msgid "co.people.panel.desc"
msgstr "COmanage Registry is a registry for people. This section contains the basic building blocks for modeling and managing people in COmanage."

msgid "co.people.population"
msgstr "My Population"

msgid "co.people.population.desc"
msgstr "Review and manage people in your collaboration (CO Person Records)"

msgid "co.structure"
msgstr "Structure"

msgid "co.structure.panel.title"
msgstr "Structure"

msgid "co.structure.panel.desc"
msgstr "COmanage registry provides structures for modeling and managing your organization, including COUs, Groups, and Departments."

msgid "co.structure.groups"
msgstr "Groups"

msgid "co.structure.groups.all"
msgstr "All Groups"

msgid "co.switch"
msgstr "Switch CO"

3 changes: 3 additions & 0 deletions app/resources/locales/en_US/operation.po
Expand Up @@ -114,6 +114,9 @@ msgstr "Remove"
msgid "save"
msgstr "Save"

msgid "search"
msgstr "Search"

msgid "skip_to_content"
msgstr "Skip to main content"

Expand Down
10 changes: 5 additions & 5 deletions app/templates/element/badgeList.php
Expand Up @@ -27,7 +27,7 @@
* 'color' => BadgeColorModeEnum::Blue,
* 'outline' => false,
* 'pill' => true,
* 'fa_class' => 'fa-key',
* 'icon' => 'material-icons-key',
* ),
* );
*
Expand All @@ -48,13 +48,13 @@

foreach($vv_badge_list as $badge) {
$badge_classes = [];
$fa_element = "";
$icon = "";

if(isset($badge['pill']) && $badge['pill']) {
$badge_classes[] = "rounded-pill";
}
if(!empty($badge['fa_class'])) {
$fa_element = '<i class="mr-1 fa ' . $badge["fa_class"] .'"></i>';
if(!empty($badge['icon'])) {
$icon = '<i class="mr-1 material-icons" aria-hidden="true">' . $badge["icon"] .'</i>';
}
if(isset($badge['outline']) && $badge['outline']) {
$badge_classes[] = "bg-outline-" . $badge['color'];
Expand All @@ -69,7 +69,7 @@
// Print the Badge
print $this->Html->tag(
'span',
$fa_element . $badge['text'],
$icon . $badge['text'],
[
'class' => 'mr-1 badge ' . implode(' ', $badge_classes),
'escape' => false,
Expand Down
73 changes: 16 additions & 57 deletions app/templates/element/javascript.php
Expand Up @@ -33,71 +33,30 @@
$('.focusFirst').focus();

// DESKTOP MENU DRAWER BEHAVIOR
// Check the drawer half-closed cookie on first load and set the drawer state appropriately
if (Cookies.get("desktop-drawer-state") == "half-closed") {
$("#navigation-drawer").addClass("half-closed");
$("#main").addClass("drawer-half-closed");
}

// Hamburger menu-drawer toggle
$('#co-hamburger').click(function () {
if($(window).width() < 768) {
// Mobile mode
$("#navigation-drawer").removeClass("half-closed").toggle();
} else {
// Desktop mode
if ($("#navigation-drawer").hasClass("half-closed")) {
$("#navigation-drawer").removeClass("half-closed");
$("#main").removeClass("drawer-half-closed");
// set a cookie to hold drawer half-open state between requests
Cookies.set("desktop-drawer-state", "open");
} else {
$("#navigation-drawer").addClass("half-closed");
$("#main").addClass("drawer-half-closed");
// set a cookie to hold drawer half-open state between requests
Cookies.set("desktop-drawer-state", "half-closed");
}
}
$('#co-menu-collapse').click(function(){
$('#navigation-drawer').toggleClass('closed');
});

// Catch the edge-case of browser resize causing menu-drawer
// to remain hidden and vice versa.
$(window).resize(function() {
if($( window ).width() > 767) {
$("#navigation-drawer").show();
} else {
$("#navigation-drawer").hide();
}
$('#co-hamburger').click(function() {
$('#navigation-drawer').toggleClass('visible');
});

$('.menu-panel-toggle').click(function() {
$(this).next('.menu-panel').toggleClass('visible');
});

// Desktop half-closed drawer behavior & expandable menu items
$('#navigation-drawer a.menuTop').click(function () {
if (Cookies.get("desktop-drawer-state") == "half-closed") {
$("#navigation-drawer").toggleClass("half-closed");
}
$('.menu-panel-close').click(function() {
$(this).closest('.menu-panel').removeClass('visible');
});

// END DESKTOP MENU DRAWER BEHAVIOR

// USER MENU BEHAVIORS
$("#global-search label").click(function () {
$("#global-search-box").toggle();
// GLOBAL SEARCH
$('#search-bar input').focus(function() {
$('#search-bar button').addClass('visible');
});

// Accordion - XXX Deprecated?
// $(".accordion").accordion();

// Click outside behaviors
// XXX Enable when / if needed (also enable popopvers below)
/*$(document).on('click', function (e) {
// Hide popovers on click outside but don't close current popover when interacting with content inside it
$('#content [data-bs-toggle="popover"]').each(function () {
if (!$(this).is(e.target) && $('.popover.show').has(e.target).length === 0) {
$(this).popover('hide');
}
});
});*/

// TOP SEARCH FILTER FORM

// TOP FILTER FORM
// Send only non-empty fields in the form
$("#top-filters-form").submit(function() {
$("#top-filters-form *").filter(':input').each(function () {
Expand Down
52 changes: 52 additions & 0 deletions app/templates/element/links.php
@@ -0,0 +1,52 @@
<?php
/*
* COmanage Registry Custom Links
*
* Portions licensed to the University Corporation for Advanced Internet
* Development, Inc. ("UCAID") under one or more contributor license agreements.
* See the NOTICE file distributed with this work for additional information
* regarding copyright ownership.
*
* UCAID licenses this file to you under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with the
* License. You may obtain a copy of the License at:
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* @link https://www.internet2.edu/comanage COmanage Project
* @package registry
* @since COmanage Registry v5.0.0
* @license Apache License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0)
*/
?>
<?php /* if(isset($vv_NavLinks) || isset($vv_CoNavLinks)): */ ?>
<div class="custom-links">
<ul>
<!-- XXX Mockup some links for layout considerations (CFM-162) -->
<li><a href="#">Link 1</a></li>
<li><a href="#">Link 2</a></li>
<li><a href="#">Link 3</a></li>
<?php
// Emit dynamically configured (via Navigation Links) links

if(isset($vv_NavLinks)) {
foreach($vv_NavLinks as $l){
print '<li><a href="' . $l['NavigationLink']['url'] . '">' . filter_var($l['NavigationLink']['title'],FILTER_SANITIZE_SPECIAL_CHARS) . '</a>';
}
}

if(isset($vv_CoNavLinks)) {
foreach($vv_CoNavLinks as $l){
print '<li><a href="' . $l['CoNavigationLink']['url'] . '">' . filter_var($l['CoNavigationLink']['title'],FILTER_SANITIZE_SPECIAL_CHARS) . '</a>';
}
}
?>
</ul>
</div>
<?php /* endif; */ ?>