Skip to content

Commit

Permalink
Merge pull request #729 from WildMeOrg/citation_react
Browse files Browse the repository at this point in the history
citation page to react
  • Loading branch information
TanyaStere42 authored Sep 4, 2024
2 parents 70e1034 + 8bcf233 commit 2bfe28c
Show file tree
Hide file tree
Showing 12 changed files with 194 additions and 66 deletions.
2 changes: 2 additions & 0 deletions frontend/src/AuthenticatedSwitch.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import AuthenticatedAppHeader from "./components/AuthenticatedAppHeader";
import useGetMe from "./models/auth/users/useGetMe";
import AlertBanner from "./components/AlertBanner";
import EncounterSearch from "./pages/EncounterSearch";
import Citation from "./pages/Citation";

export default function AuthenticatedSwitch({ showAlert, setShowAlert }) {
const { data } = useGetMe();
Expand Down Expand Up @@ -47,6 +48,7 @@ export default function AuthenticatedSwitch({ showAlert, setShowAlert }) {
>
<Routes>
<Route path="/profile" element={<Profile />} />
<Route path="/citation" element={<Citation />} />
<Route path="/home" element={<Home />} />
<Route path="/encounter-search" element={<EncounterSearch />} />
<Route path="/login" element={<Login />} />
Expand Down
4 changes: 1 addition & 3 deletions frontend/src/FrontDesk.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import "./css/scrollBar.css";

export default function FrontDesk() {
const [isLoggedIn, setIsLoggedIn] = useState(false);
const [setError] = useState();
const [collaborationTitle, setCollaborationTitle] = useState();
const [collaborationData, setCollaborationData] = useState([]);
const [mergeData, setMergeData] = useState([]);
Expand All @@ -33,7 +32,6 @@ export default function FrontDesk() {
console.log("Error", error);
setLoading(false);
setIsLoggedIn(false);
setError(error.response.status);
});
};

Expand Down Expand Up @@ -85,7 +83,7 @@ export default function FrontDesk() {
if (!isLoggedIn) {
return (
<>
{/* <GoogleTagManager /> */}
<GoogleTagManager />
<UnauthenticatedSwitch
showAlert={showAlert}
setShowAlert={setShowAlert}
Expand Down
2 changes: 2 additions & 0 deletions frontend/src/UnAuthenticatedSwitch.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import AlertBanner from "./components/AlertBanner";
import UnAuthenticatedAppHeader from "./components/UnAuthenticatedAppHeader";
import NotFound from "./pages/errorPages/NotFound";
import Unauthorized from "./pages/errorPages/Unauthorized";
import Citation from "./pages/Citation";

export default function UnAuthenticatedSwitch({ showAlert, setShowAlert }) {
const [header, setHeader] = React.useState(true);
Expand Down Expand Up @@ -39,6 +40,7 @@ export default function UnAuthenticatedSwitch({ showAlert, setShowAlert }) {
path="/home"
element={<Unauthorized setHeader={setHeader} />}
/>
<Route path="/citation" element={<Citation />} />
<Route path="/encounter-search" element={<Login />} />
<Route path="/login" element={<Login />} />
<Route path="/" element={<Login />} />
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/Footer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const Footer = () => {
const { data } = useGetSiteSettings();
useEffect(() => {
if (data) {
setVersion(data.system.wildbookVersion);
setVersion(data.system?.wildbookVersion);
}
}, [data]);
return visible ? (
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/constants/navMenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ const authenticatedMenu = (username) => [
defaultMessage="Citing Wildbook"
/>
),
href: "/citing.jsp",
href: "/react/citation",
},
{
name: (
Expand Down Expand Up @@ -314,7 +314,7 @@ const unAuthenticatedMenu = [
defaultMessage="Citing Wildbook"
/>
),
href: "/citing.jsp",
href: "/react/citation",
},
{
name: (
Expand Down
14 changes: 13 additions & 1 deletion frontend/src/locale/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -227,5 +227,17 @@
"NUMBER_ANNOTATIONS": "Anzahl der Anmerkungen",
"ADD_LABELLED_KEYWORD_SEARCH": "Beschriftete Schlagwortsuche hinzufügen",
"APPLY_SEARCH_ID": "Such-ID anwenden",
"APPLY_SEARCH_ID_DESC": "Diese Funktion ermöglicht es Benutzern, ihre Suchkriterien auf einfache Weise mit anderen zu teilen. Nachdem er eine Suche durchgeführt hat, kann ein Benutzer seine eindeutige Such-ID kopieren und sie mit einem anderen Benutzer teilen. Der Empfänger kann dann diese Such-ID in den Abschnitt „Such-ID anwenden“ einfügen und auf „Anwenden“ klicken, um die genauen Suchkriterien zu replizieren und die gleichen Ergebnisse wie der ursprüngliche Benutzer zu erhalten."
"APPLY_SEARCH_ID_DESC": "Diese Funktion ermöglicht es Benutzern, ihre Suchkriterien auf einfache Weise mit anderen zu teilen. Nachdem er eine Suche durchgeführt hat, kann ein Benutzer seine eindeutige Such-ID kopieren und sie mit einem anderen Benutzer teilen. Der Empfänger kann dann diese Such-ID in den Abschnitt „Such-ID anwenden“ einfügen und auf „Anwenden“ klicken, um die genauen Suchkriterien zu replizieren und die gleichen Ergebnisse wie der ursprüngliche Benutzer zu erhalten.",
"CITATION_TITLE": "Wie man Wildbook und kollaborative Daten zitiert",
"CITATION_INTRODUCTION": "Auch wenn eine kollaborative Verbindung zwischen den Benutzern hergestellt wurde, bittet Wildbook Sie, die Datenanbieter zu kontaktieren, bevor Sie die gemeinsam genutzten Daten in einer Publikation, einem Produkt oder einer kommerziellen Anwendung verwenden.",
"CITATION_AGREEMENT": "Durch die Nutzung eines Wildbooks erklärt sich der Benutzer mit Folgendem einverstanden:",
"CITATION_AGREEMENT_ITEM_1": "Die in Wildbook enthaltenen Daten nicht in einer Publikation, einem Produkt oder einer kommerziellen Anwendung ohne vorherige schriftliche Zustimmung des ursprünglichen Datenanbieters zu verwenden.",
"CITATION_AGREEMENT_ITEM_2": "Sowohl den/die Datenanbieter als auch Wildbook korrekt zu zitieren, nachdem die Genehmigung zur Nutzung erhalten wurde.",
"CITATION_AGREEMENT_ITEM_2_SUBITEM_1": "Kollaborative Datensätze sollten alle Datenbeitragenden in absteigender Reihenfolge der beigesteuerten Begegnungen auflisten. Das Jahr sollte das Jahr sein, in dem der Datensatz konsolidiert und heruntergeladen wurde.",
"CITATION_AGREEMENT_ITEM_2_SUBITEM_2": "Beispielzitat für einen Datensatz:",
"CITATION_AGREEMENT_ITEM_2_SUBITEM_3": "Beispielzitat für ein Wildbook:",
"CITATION_CITATION_DETAILS_1": "S. Gero, J. Levenson, J. Van Oast, J. Holmberg, A. Marine-Biologist, C. Researcher, O. Cean. (2016). Kollaborativer Datensatz von: Flukebook.org. Konsolidiert und heruntergeladen: 15. Juni 2016.",
"CITATION_CITATION_DETAILS_2": "J. Levenson, S. Gero, J. Van Oast und J. Holmberg. 2015. Flukebook: cloudbasierte Foto-Identifikationsanalysetools für die Meeresforschung. Erreichbar unter: https://www.flukebook.org",
"CITATION_FORWARD": "Um die Zitierung jeder Publikation / jedes Berichts, der / das die von Wild Me bereitgestellten Daten / Werkzeuge verwendet hat, zur Aufnahme in unsere Referenzliste an [email protected] weiterzuleiten.",
"CITATION_DISCLAIMER": "Wild Me oder die ursprünglichen Datenanbieter nicht für Fehler in den Daten verantwortlich machen. Obwohl wir alle Anstrengungen unternommen haben, um die Qualität der Datenbank zu gewährleisten, können wir die Genauigkeit dieser Datensätze nicht garantieren."
}
85 changes: 48 additions & 37 deletions frontend/src/locale/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -191,42 +191,53 @@
"FILTER_RELAX_ALLELE_LENGTH": "Relax Allele Length(+/-)",
"FILTER_ALLELE1": "Allele 1",
"FILTER_ALLELE2": "Allele 2",
"FILTER_SOCIAL" : "Social",
"FILTER_SOCIAL_DESC" : "Use the fields below to limit your search based on social connections",
"FILTER_SOCIAL_UNIT" : "Social Group Unit",
"FILTER_RELATIONSHIP_ROLE" : "Social Relationship Role",
"FILTER_METADATA" : "Metadata",
"FILTER_METADATA_DESC" : "Use the fields below to limit your search based on platform-related data",
"FILTER_ENCOUNTERS_STATUS" : "Encounter Status",
"FILTER_SUBMITTER" : "Submitter, Photographer, or Email Address. This field is NOT case-sensitive",
"FILTER_ORGANIZATION_ID" : "Organization ID",
"FILTER_PROJECT_NAME" : "Project Name",
"FILTER_ASSIGNED_USER" : "Assigned User",
"ENCOUNTER_SEARCH_FILTERS" : "Encounter Search Filters",
"FILTER_SOCIAL": "Social",
"FILTER_SOCIAL_DESC": "Use the fields below to limit your search based on social connections",
"FILTER_SOCIAL_UNIT": "Social Group Unit",
"FILTER_RELATIONSHIP_ROLE": "Social Relationship Role",
"FILTER_METADATA": "Metadata",
"FILTER_METADATA_DESC": "Use the fields below to limit your search based on platform-related data",
"FILTER_ENCOUNTERS_STATUS": "Encounter Status",
"FILTER_SUBMITTER": "Submitter, Photographer, or Email Address. This field is NOT case-sensitive",
"FILTER_ORGANIZATION_ID": "Organization ID",
"FILTER_PROJECT_NAME": "Project Name",
"FILTER_ASSIGNED_USER": "Assigned User",
"ENCOUNTER_SEARCH_FILTERS": "Encounter Search Filters",
"DRAW": "Draw",
"CANCEL" : "Cancel",
"FILTERS" : "Filters",
"TYPE_HERE" : "Type here",
"SELECT_ONE_OR_MORE" : "Select one or more",
"TYPE_NUMBER" : "###",
"ENCOUNTER_PROJECT_MANAGEMENT" : "Project Management",
"ENCOUNTER_MATCHING_IMAGES_VIDEOS" : "Matching Images/Videos",
"ENCOUNTER_MAPPED_RESULTS" : "Mapped Results",
"ENCOUNTER_RESULTS_CALENDAR" : "Results Calendar",
"ENCOUNTER_ANALYSIS" : "Analysis",
"ENCOUNTER_EXPORT" : "Export",
"SEARCH_ENCOUNTERS" : "Search Encounters",
"INDIVIDUAL_ID" : "Individual ID",
"SIGHTING_ID" : "Sighting ID",
"ALTERNATIVE_ID" : "Alternative ID",
"CREATED_DATE" : "Created Date",
"LOCATION_ID" : "Location ID",
"SPECIES" : "Species",
"SUBMITTER" : "Submitter",
"DATE_SUBMITTED" : "Date Submitted",
"NUMBER_ANNOTATIONS" : "Number of Annotations",
"ADD_LABELLED_KEYWORD_SEARCH" : "Add Labelled Keyword Search" ,
"APPLY_SEARCH_ID": "Apply Search ID",
"APPLY_SEARCH_ID_DESC": "This feature allows users to share their search criteria with others easily. After performing a search, a user can copy their unique Search ID and share it with another user. The recipient can then paste this Search ID into the \"Apply Search ID\" section and click \"Apply\" to replicate the exact search criteria, obtaining the same results as the original user."

"CANCEL": "Cancel",
"FILTERS": "Filters",
"TYPE_HERE": "Type here",
"SELECT_ONE_OR_MORE": "Select one or more",
"TYPE_NUMBER": "###",
"ENCOUNTER_PROJECT_MANAGEMENT": "Project Management",
"ENCOUNTER_MATCHING_IMAGES_VIDEOS": "Matching Images/Videos",
"ENCOUNTER_MAPPED_RESULTS": "Mapped Results",
"ENCOUNTER_RESULTS_CALENDAR": "Results Calendar",
"ENCOUNTER_ANALYSIS": "Analysis",
"ENCOUNTER_EXPORT": "Export",
"SEARCH_ENCOUNTERS": "Search Encounters",
"INDIVIDUAL_ID": "Individual ID",
"SIGHTING_ID": "Sighting ID",
"ALTERNATIVE_ID": "Alternative ID",
"CREATED_DATE": "Created Date",
"LOCATION_ID": "Location ID",
"SPECIES": "Species",
"SUBMITTER": "Submitter",
"DATE_SUBMITTED": "Date Submitted",
"NUMBER_ANNOTATIONS": "Number of Annotations",
"ADD_LABELLED_KEYWORD_SEARCH": "Add Labelled Keyword Search",
"APPLY_SEARCH_ID": "Apply Search ID",
"APPLY_SEARCH_ID_DESC": "This feature allows users to share their search criteria with others easily. After performing a search, a user can copy their unique Search ID and share it with another user. The recipient can then paste this Search ID into the \"Apply Search ID\" section and click \"Apply\" to replicate the exact search criteria, obtaining the same results as the original user.",
"CITATION_TITLE": "How to Cite Wildbook and Collaborative Data",
"CITATION_INTRODUCTION": "Even if a collaborative link has been made between users, Wildbook requests you to contact the data provider(s) for use of any and all data shared in a collaboration if it is to be used in any publication, product, or commercial application.",
"CITATION_AGREEMENT": "By using any Wildbook the user agrees to the following:",
"CITATION_AGREEMENT_ITEM_1": "Not to use data contained in Wildbook in any publication, product, or commercial application without prior written consent of the original data provider.",
"CITATION_AGREEMENT_ITEM_2": "To cite both the data provider(s) and Wildbook appropriately after approval of use is obtained.",
"CITATION_AGREEMENT_ITEM_2_SUBITEM_1": "Collaborative datasets should list all data contributors in descending order of quantity of encounters contributed. The year should be listed as the year when the dataset was pooled and downloaded.",
"CITATION_AGREEMENT_ITEM_2_SUBITEM_2": "Example citation for a dataset:",
"CITATION_AGREEMENT_ITEM_2_SUBITEM_3": "Example citation for a Wildbook:",
"CITATION_CITATION_DETAILS_1": "S.Gero, J. Levenson, J. Van Oast., J Holmberg, A. Marine-Biologist, C. Researcher, O. Cean. (2016). Collaborative dataset from: Flukebook.org. Consolidated and downloaded: June 15, 2016.",
"CITATION_CITATION_DETAILS_2": "J. Levenson, S. Gero, J. Van Oast, and J. Holmberg. 2015. Flukebook: a cloud-based photo-identification analysis tools for marine mammal research. Accessible at: https://www.flukebook.org",
"CITATION_FORWARD": "To forward the citation of any publication / report that made use of the data / tools provided by Wild Me for inclusion in our list of references by submitting to [email protected].",
"CITATION_DISCLAIMER": "Not to hold Wild Me or the original data providers liable for errors in the data. While we have made every effort to ensure the quality of the database, we cannot guarantee the accuracy of these datasets."
}
25 changes: 18 additions & 7 deletions frontend/src/locale/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -206,15 +206,15 @@
"CANCEL": "Cancelar",
"FILTERS": "Filtros",
"TYPE_HERE": "Escriba aquí",
"SELECT_ONE_OR_MORE" : "Seleccione uno o más",
"TYPE_NUMBER" : "###",
"SELECT_ONE_OR_MORE": "Seleccione uno o más",
"TYPE_NUMBER": "###",
"ENCOUNTER_PROJECT_MANAGEMENT": "Gestión de Proyectos",
"ENCOUNTER_MATCHING_IMAGES_VIDEOS": "Imágenes/Vídeos Coincidentes",
"ENCOUNTER_MAPPED_RESULTS": "Resultados Mapeados",
"ENCOUNTER_RESULTS_CALENDAR": "Calendario de Resultados",
"ENCOUNTER_ANALYSIS": "Análisis",
"ENCOUNTER_EXPORT": "Exportar",
"SEARCH_ENCOUNTERS" : "Buscar Encuentros",
"SEARCH_ENCOUNTERS": "Buscar Encuentros",
"INDIVIDUAL_ID": "ID Individual",
"SIGHTING_ID": "ID de Avistamiento",
"ALTERNATIVE_ID": "ID Alternativo",
Expand All @@ -224,8 +224,19 @@
"SUBMITTER": "Remitente",
"DATE_SUBMITTED": "Fecha de Envío",
"NUMBER_ANNOTATIONS": "Número de Anotaciones",
"ADD_LABELLED_KEYWORD_SEARCH" : "Agregar Búsqueda de Palabras Clave Etiquetadas",
"APPLY_SEARCH_ID" : "Aplicar ID de Búsqueda",
"APPLY_SEARCH_ID_DESC": "Esta función permite a los usuarios compartir fácilmente sus criterios de búsqueda con otros. Después de realizar una búsqueda, un usuario puede copiar su ID de búsqueda única y compartirla con otro usuario. El destinatario puede luego pegar esta ID de búsqueda en la sección \"Aplicar ID de búsqueda\" y hacer clic en \"Aplicar\" para replicar los mismos criterios de búsqueda, obteniendo los mismos resultados que el usuario original."

"ADD_LABELLED_KEYWORD_SEARCH": "Agregar Búsqueda de Palabras Clave Etiquetadas",
"APPLY_SEARCH_ID": "Aplicar ID de Búsqueda",
"APPLY_SEARCH_ID_DESC": "Esta función permite a los usuarios compartir fácilmente sus criterios de búsqueda con otros. Después de realizar una búsqueda, un usuario puede copiar su ID de búsqueda única y compartirla con otro usuario. El destinatario puede luego pegar esta ID de búsqueda en la sección \"Aplicar ID de búsqueda\" y hacer clic en \"Aplicar\" para replicar los mismos criterios de búsqueda, obteniendo los mismos resultados que el usuario original.",
"CITATION_TITLE": "Cómo citar Wildbook y datos colaborativos",
"CITATION_INTRODUCTION": "Incluso si se ha establecido un vínculo colaborativo entre los usuarios, Wildbook solicita que contacte a los proveedores de datos para el uso de cualquiera o todos los datos compartidos en una colaboración si van a utilizarse en cualquier publicación, producto o aplicación comercial.",
"CITATION_AGREEMENT": "Al usar cualquier Wildbook, el usuario acepta lo siguiente:",
"CITATION_AGREEMENT_ITEM_1": "No usar los datos contenidos en Wildbook en ninguna publicación, producto o aplicación comercial sin el consentimiento previo por escrito del proveedor de datos original.",
"CITATION_AGREEMENT_ITEM_2": "Citar adecuadamente tanto a los proveedores de datos como a Wildbook después de obtener la aprobación para su uso.",
"CITATION_AGREEMENT_ITEM_2_SUBITEM_1": "Los conjuntos de datos colaborativos deben enumerar a todos los contribuyentes de datos en orden descendente según la cantidad de encuentros aportados. El año debe ser el año en que se consolidó y descargó el conjunto de datos.",
"CITATION_AGREEMENT_ITEM_2_SUBITEM_2": "Ejemplo de cita para un conjunto de datos:",
"CITATION_AGREEMENT_ITEM_2_SUBITEM_3": "Ejemplo de cita para un Wildbook:",
"CITATION_CITATION_DETAILS_1": "S. Gero, J. Levenson, J. Van Oast, J. Holmberg, A. Marine-Biologist, C. Researcher, O. Cean. (2016). Conjunto de datos colaborativo de: Flukebook.org. Consolidado y descargado: 15 de junio de 2016.",
"CITATION_CITATION_DETAILS_2": "J. Levenson, S. Gero, J. Van Oast y J. Holmberg. 2015. Flukebook: herramientas de análisis de identificación fotográfica basadas en la nube para la investigación de mamíferos marinos. Disponible en: https://www.flukebook.org",
"CITATION_FORWARD": "Reenviar la cita de cualquier publicación / informe que haya utilizado los datos / herramientas proporcionados por Wild Me para su inclusión en nuestra lista de referencias enviándola a [email protected].",
"CITATION_DISCLAIMER": "No responsabilizar a Wild Me ni a los proveedores de datos originales por errores en los datos. Aunque hemos hecho todo lo posible por garantizar la calidad de la base de datos, no podemos garantizar la exactitud de estos conjuntos de datos."
}
Loading

0 comments on commit 2bfe28c

Please sign in to comment.