-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[3.1] Minimal header - part 1 (incomplete implementation that defaults as disabled until [3.2] part 2 is done) #1429
Changes from 17 commits
0ebecbb
edb42d2
57ed341
04307a4
7c298af
7b2a2ec
3a7df65
36f4590
c075c3b
ce66a20
142bc23
1be07aa
d544b7e
61f811b
6917e88
c24233e
48a4af5
ebe2ae8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,8 @@ | |
else include_once($SERVER_ROOT.'/content/lang/collections/individual/index.en.php'); | ||
if($LANG_TAG != 'en' && file_exists($SERVER_ROOT.'/content/lang/collections/fieldterms/materialSampleVars.'.$LANG_TAG.'.php')) include_once($SERVER_ROOT.'/content/lang/collections/fieldterms/materialSampleVars.'.$LANG_TAG.'.php'); | ||
else include_once($SERVER_ROOT.'/content/lang/collections/fieldterms/materialSampleVars.en.php'); | ||
if($LANG_TAG == 'en' || !file_exists($SERVER_ROOT.'/content/lang/header.' . $LANG_TAG . '.php')) include_once($SERVER_ROOT . '/content/lang/header.en.php'); | ||
else include_once($SERVER_ROOT . '/content/lang/header.' . $LANG_TAG . '.php'); | ||
header('Content-Type: text/html; charset=' . $CHARSET); | ||
|
||
$submit = array_key_exists('formsubmit', $_REQUEST) ? $_REQUEST['formsubmit'] : ''; | ||
|
@@ -20,6 +22,8 @@ | |
$clid = array_key_exists('clid', $_REQUEST) ? $indManager->sanitizeInt($_REQUEST['clid']) : 0; | ||
$format = isset($_GET['format']) ? $_REQUEST['format'] : ''; | ||
|
||
$shouldUseMinimalMapHeader = $SHOULD_USE_MINIMAL_MAP_HEADER ?? false; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would just make this a single line of if($SHOULD_USE_MINIMAL_MAP_HEADER ?? false) include(...). I realize it is also being used for the css logic but if you look at the other comments you see that I recommend styling changes that wouldn't require this conditional spacing. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I just tried this. I can't seem to get the header to display nicely along with the "Open Search Panel" button in collections/map/index.php, even if I explicitly set Maybe we meet about this and problem solve together in Part 2? I have a feeling that I have something to learn here, but I couldn't find an immediate solution. I added it to the TODO list in Part 2: https://github.com/BioKIC/Symbiota/issues/1428. |
||
|
||
if($occid) $indManager->setOccid($occid); | ||
elseif($guid) $occid = $indManager->setGuid($guid); | ||
elseif($collid && $pk){ | ||
|
@@ -307,12 +311,20 @@ function initializeMap(){ | |
.smaller-header { | ||
font-size: 2rem; | ||
} | ||
<?php if($shouldUseMinimalMapHeader){ ?> | ||
.minimal-header-margin{ | ||
margin-top: 6rem; | ||
} | ||
<?php } ?> | ||
</style> | ||
</head> | ||
<body> | ||
<?php | ||
if($shouldUseMinimalMapHeader) include_once($SERVER_ROOT . '/includes/minimal_header_template.php'); | ||
?> | ||
<header style="background-image: none;"> | ||
<a class="screen-reader-only" href="#end-nav"><?php echo $LANG['SKIP_NAV'] ?></a> | ||
<h1 class="page-heading"> | ||
<h1 class="page-heading minimal-header-margin"> | ||
<?php echo $LANG['FULL_RECORD_DETAILS']; ?> | ||
</h1> | ||
<div id="end-nav"></div> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't this just be in the include file so that is a all in one package?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried implementing this in collections/map/index.php, and it doesn't seem to be working. I think it's because includes/minimal_header_template.php doesn't get included until the
<body>
of the page.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(And by, "doesn't work", I mean gives developer warnings about tags that can't be translated).