Skip to content

Commit fd6ba50

Browse files
authored
Merge pull request #1690 from griidc/release/6.66.0
Release/6.66.0
2 parents 9ff6bf1 + 5e2ab10 commit fd6ba50

30 files changed

+756
-33
lines changed

assets/css/activeInactive.css

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
.active {
2+
transition: opacity 0.25s ease-in-out;
3+
opacity: 1;
4+
height: auto;
5+
}
6+
.inactive {
7+
transition: opacity 0.25s ease-in-out;
8+
opacity: 0.5;
9+
height: 0;
10+
overflow: hidden;
11+
}
12+
li {
13+
margin-bottom: revert!important;
14+
}

assets/js/entry/landing-page.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import '../../scss/landing-pages.scss';
2+
import '../../css/activeInactive.css';
3+
import Alpine from 'alpinejs';
4+
import '../modules/cardClick';
5+
6+
window.Alpine = Alpine;
7+
Alpine.start();

assets/js/modules/cardClick.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
const cardClick = () => {
2+
document.querySelectorAll('.card').forEach((card) => {
3+
const cardElement = card;
4+
cardElement.onclick = () => {
5+
if (window.getSelection().toString() === '') {
6+
const link = card.querySelector('a');
7+
if (typeof (link) !== 'undefined' && link != null) {
8+
link.click();
9+
}
10+
}
11+
};
12+
});
13+
};
14+
15+
export default { cardClick };
16+
17+
cardClick();

assets/js/vue/ResearchGroupApp.vue

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
<template>
22
<div class="container" ref="formContainer">
3-
<hr>
43
<b-card no-body class="main-card">
54
<b-tabs pills fill justified card v-if="showData" lazy vertical class="min-vh-100">
65
<b-tab title="Overview">

assets/js/vue/components/research-group/PeopleTab.vue

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,9 @@
44
v-for="person in sortedPeople"
55
:key="person.id"
66
:title="person.person.firstName + ' ' + person.person.lastName"
7-
:sub-title="person.label" style="min-width: 18rem; max-width: 27rem">
8-
<b-card-text v-tooltip="{
9-
content: person.person.organization,
10-
placement:'top'
11-
}">
7+
:sub-title="person.label" style="min-width: 18rem; max-width: 27rem; cursor: pointer;"
8+
@click="openUrl(person)">
9+
<b-card-text>
1210
{{ person.person.organization | truncate(75) }}
1311
</b-card-text>
1412
<b-card-text class="text-muted">
@@ -32,6 +30,14 @@ export default {
3230
created() {
3331
this.sortedPeople = this.$options.filters.sort('person.lastName', this.personResearchGroups);
3432
},
33+
methods: {
34+
openUrl(person) {
35+
window.open(
36+
// eslint-disable-next-line no-undef
37+
`${Routing.generate('app_person_land', { person: person.person.id })}`, '_blank',
38+
);
39+
},
40+
},
3541
};
3642
</script>
3743

assets/scss/components/badge.scss

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
@layer components {
2+
.badge {
3+
@apply inline-flex items-center gap-x-1.5 py-1 px-2 rounded-md text-xs font-medium bg-blue-600 text-white shadow-sm font-bold text-[13.5px];
4+
}
5+
6+
.badge-pill {
7+
@apply rounded-full gap-x-1 py-1 px-2 min-w-8 text-center items-center justify-center;
8+
}
9+
10+
.badge-primary {@apply bg-primary text-white;}
11+
.badge-secondary {@apply bg-secondary text-white;}
12+
.badge-alternate {@apply bg-alternate text-white;}
13+
.badge-itemtype {@apply bg-itemtype text-white;}
14+
.badge-restricted {@apply bg-restricted text-white;}
15+
.badge-available {@apply bg-available text-white;}
16+
.badge-submitted {@apply bg-submitted text-white;}
17+
.badge-identified {@apply bg-identified text-black;}
18+
.badge-coldstorage {@apply bg-coldstorage text-black;}
19+
.badge-ncei {@apply bg-ncei text-white;}
20+
.badge-erddap {@apply bg-erddap text-black;}
21+
}

assets/scss/components/card.scss

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
@layer components {
2+
.card {
3+
@apply p-4 rounded-lg mb-4 border border-black/[.125] hover:shadow-lg hover:transition-all;
4+
}
5+
}
6+

assets/scss/components/links.scss

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
@layer components {
2+
.pagelink {
3+
@apply text-blue-600 inline-flex items-center font-medium hover:underline;
4+
}
5+
}
6+

assets/scss/landing-pages.scss

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
@tailwind base;
2+
@tailwind components;
3+
@tailwind utilities;
4+
5+
@import 'components/card.scss';
6+
@import 'components/badge.scss';
7+
@import 'components/links.scss';
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
<?php
2+
3+
namespace App\Controller\UI;
4+
5+
use App\Entity\FundingCycle;
6+
use App\Entity\Person;
7+
use App\Entity\ResearchGroup;
8+
use App\Repository\InformationProductRepository;
9+
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
10+
use Symfony\Component\HttpFoundation\Response;
11+
use Symfony\Component\Routing\Annotation\Route;
12+
13+
class LandingController extends AbstractController
14+
{
15+
#[Route('/funding-cycle/about/{fundingCycle}', name: 'app_funding_cycle_land')]
16+
public function fundingCycleLand(FundingCycle $fundingCycle, InformationProductRepository $informationProductRepository): Response
17+
{
18+
$informationProducts = $informationProductRepository->findByFundingCycle($fundingCycle);
19+
20+
return $this->render(
21+
'LandingPages/funding-cycle-land.html.twig',
22+
[
23+
'fundingCycle' => $fundingCycle,
24+
'informationProducts' => $informationProducts,
25+
]
26+
);
27+
}
28+
29+
#[Route('/person/about/{person}', name: 'app_person_land')]
30+
public function personLand(Person $person, InformationProductRepository $informationProductRepository): Response
31+
{
32+
33+
$informationProducts = $informationProductRepository->findByPerson($person);
34+
35+
return $this->render(
36+
'LandingPages/person-land.html.twig',
37+
[
38+
'person' => $person,
39+
'informationProducts' => $informationProducts,
40+
]
41+
);
42+
}
43+
44+
#[Route('/research-group/about/{researchGroup}', name: 'pelagos_app_ui_researchgroup_about')]
45+
public function researchGroupLand(ResearchGroup $researchGroup, InformationProductRepository $informationProductRepository): Response
46+
{
47+
48+
$informationProducts = $informationProductRepository->findOneByResearchGroupId($researchGroup->getId());
49+
50+
return $this->render(
51+
'LandingPages/research-group-land.html.twig',
52+
[
53+
'researchGroup' => $researchGroup,
54+
'informationProducts' => $informationProducts,
55+
]
56+
);
57+
}
58+
}

0 commit comments

Comments
 (0)