changed "article" to "research"
to be more more general
This commit is contained in:
parent
783cd8fa9f
commit
8650482d11
@ -9,6 +9,8 @@ package ovh.herisson.Clyde.Tables.ScientificPublications;
|
||||
*
|
||||
******************************************************/
|
||||
public enum PaperType {
|
||||
article,
|
||||
slides,
|
||||
Article,
|
||||
Paper,
|
||||
Book,
|
||||
BookChapter,
|
||||
}
|
||||
|
@ -5,7 +5,7 @@ package ovh.herisson.Clyde.Tables.ScientificPublications;
|
||||
* @author Maxime Bartha
|
||||
* @scope Extension Publications scientifiques
|
||||
*
|
||||
* Article entity
|
||||
* Research entity
|
||||
*
|
||||
******************************************************/
|
||||
import jakarta.persistence.*;
|
||||
@ -16,14 +16,13 @@ import lombok.Setter;
|
||||
import org.hibernate.annotations.CreationTimestamp;
|
||||
import org.hibernate.annotations.OnDelete;
|
||||
import org.hibernate.annotations.OnDeleteAction;
|
||||
import ovh.herisson.Clyde.Tables.User;
|
||||
import java.util.Date;
|
||||
@Getter
|
||||
@Setter
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Entity
|
||||
public class Article {
|
||||
public class Research {
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.AUTO)
|
||||
private Long id;
|
@ -22,7 +22,7 @@ import org.hibernate.annotations.OnDeleteAction;
|
||||
@Setter
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class ArticleCoAuthors {
|
||||
public class ResearchCoAuthors {
|
||||
|
||||
@ManyToOne(fetch = FetchType.EAGER)
|
||||
@JoinColumn(name = "Researcher")
|
||||
@ -31,5 +31,5 @@ public class ArticleCoAuthors {
|
||||
@ManyToOne(fetch = FetchType.EAGER)
|
||||
@OnDelete(action = OnDeleteAction.CASCADE)
|
||||
@JoinColumn(name = "Article")
|
||||
private Article article;
|
||||
private Research research;
|
||||
}
|
@ -1,5 +1,5 @@
|
||||
<!----------------------------------------------------
|
||||
File: ArticleComponent.vue
|
||||
File: ResearchComponent.vue
|
||||
Author: Maxime Bartha
|
||||
Scope: Extension Publicatons scientifiquess
|
||||
Description: Pop Up for selecting search Filters
|
||||
|
@ -1,5 +1,5 @@
|
||||
<!----------------------------------------------------
|
||||
File: ArticleComponent.vue
|
||||
File: ResearchComponent.vue
|
||||
Author: Maxime Bartha
|
||||
Scope: Extension Publicatons scientifiquess
|
||||
Description: Pop Up summarizing
|
||||
@ -32,7 +32,7 @@ onClickOutside(target, ()=>emit('modal-close'))
|
||||
<ul v-for="n in example"><li>{{n}}</li></ul>
|
||||
<div id="downloads">
|
||||
<button @click.stop="emit('modal-close')">Download BibTex</button>
|
||||
<button @click.stop="emit('modal-close')">Download Article</button>
|
||||
<button @click.stop="emit('modal-close')">Download Research</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
@ -8,46 +8,56 @@
|
||||
<script setup>
|
||||
import { ref, reactive } from "vue";
|
||||
import FilterComponent from "@/Apps/ScientificPublications/FilterComponent.vue";
|
||||
import ArticleComponent from "@/Apps/ScientificPublications/ArticleComponent.vue";
|
||||
import ArticleComponent from "@/Apps/ScientificPublications/ResearchComponent.vue";
|
||||
const input = ref("");
|
||||
const statsOf = ref("");
|
||||
const statsBy = ref("");
|
||||
const isFilterOpened = ref(false);
|
||||
const isArticleOpened = ref(false);
|
||||
const isResearchOpened = ref(false);
|
||||
let chart;
|
||||
|
||||
const openModal = () => {
|
||||
const openFilter = () => {
|
||||
isFilterOpened.value = true;
|
||||
};
|
||||
const closeModal = () => {
|
||||
const closeFilter = () => {
|
||||
isFilterOpened.value = false;
|
||||
};
|
||||
const submitFilters = ()=>{
|
||||
// call only with those filters the get
|
||||
}
|
||||
const openArticle = (article) => {
|
||||
isArticleOpened.value = true;
|
||||
const openResearch = (article) => {
|
||||
isResearchOpened.value = true;
|
||||
}
|
||||
|
||||
const closeArticle = () => {
|
||||
isArticleOpened.value =false;
|
||||
const closeResearch = () => {
|
||||
isResearchOpened.value =false;
|
||||
}
|
||||
|
||||
const downloadBibTex = (article) => {
|
||||
const downloadBibTex = (research) => {
|
||||
//todo
|
||||
}
|
||||
|
||||
const downloadArticle = (article) => {
|
||||
const downloadArticle = (research) => {
|
||||
//todo
|
||||
}
|
||||
|
||||
|
||||
const articleList = [
|
||||
const researchList = [
|
||||
["The Great Potato War Lorem Ipsum aeaDq Terelumni ","Author",["Co-author1", "co-Authors2"],
|
||||
" Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas condimentum ex tempor leo pulvinar, vitae imperdiet leo pellentesque. Aenean aliquam, ante at tempus sagittis, lorem leo feugiat felis, eget vestibulum tortor est nec libero. Cras sit amet venenatis velit, at rhoncus est. Cras id sem placerat, cursus sem et, aliquam felis. Nullam mi nunc, laoreet eget rutrum ac, blandit nec lorem. Duis fermentum aliquet tortor ac tristique. Aenean ac sagittis nulla, at auctor dolor. Vivamus et neque sodales, vestibulum dolor et, posuere urna. Pellentesque ut elit metus. Cras velit lectus, luctus auctor interdum eu, aliquam nec est. Donec elementum nisl sit amet nibh aliquam ultricies. Nullam felis orci, suscipit eu tincidunt pretium, euismod vel sem. Duis eget vehicula neque, nec gravida leo. Cras pellentesque arcu quis justo lobortis, ut semper massa rhoncus. Quisque sagittis dignissim congue. Nullam tortor ligula, mattis vel cursus id, pretium non lacus.",
|
||||
"language",
|
||||
"access",
|
||||
]
|
||||
],
|
||||
["The First Ever Paper","Author",["Co-author1", "co-Authors2"],
|
||||
" Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas condimentum ex tempor leo pulvinar, vitae imperdiet leo pellentesque. Aenean aliquam, ante at tempus sagittis, lorem leo feugiat felis, eget vestibulum tortor est nec libero. Cras sit amet venenatis velit, at rhoncus est. Cras id sem placerat, cursus sem et, aliquam felis. Nullam mi nunc, laoreet eget rutrum ac, blandit nec lorem. Duis fermentum aliquet tortor ac tristique. Aenean ac sagittis nulla, at auctor dolor. Vivamus et neque sodales, vestibulum dolor et, posuere urna. Pellentesque ut elit metus. Cras velit lectus, luctus auctor interdum eu, aliquam nec est. Donec elementum nisl sit amet nibh aliquam ultricies. Nullam felis orci, suscipit eu tincidunt pretium, euismod vel sem. Duis eget vehicula neque, nec gravida leo. Cras pellentesque arcu quis justo lobortis, ut semper massa rhoncus. Quisque sagittis dignissim congue. Nullam tortor ligula, mattis vel cursus id, pretium non lacus.",
|
||||
"language",
|
||||
"access",
|
||||
],
|
||||
["the atomic disintegration of particular radioactive cells","Author",["Co-author1", "co-Authors2"],
|
||||
" Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas condimentum ex tempor leo pulvinar, vitae imperdiet leo pellentesque. Aenean aliquam, ante at tempus sagittis, lorem leo feugiat felis, eget vestibulum tortor est nec libero. Cras sit amet venenatis velit, at rhoncus est. Cras id sem placerat, cursus sem et, aliquam felis. Nullam mi nunc, laoreet eget rutrum ac, blandit nec lorem. Duis fermentum aliquet tortor ac tristique. Aenean ac sagittis nulla, at auctor dolor. Vivamus et neque sodales, vestibulum dolor et, posuere urna. Pellentesque ut elit metus. Cras velit lectus, luctus auctor interdum eu, aliquam nec est. Donec elementum nisl sit amet nibh aliquam ultricies. Nullam felis orci, suscipit eu tincidunt pretium, euismod vel sem. Duis eget vehicula neque, nec gravida leo. Cras pellentesque arcu quis justo lobortis, ut semper massa rhoncus. Quisque sagittis dignissim congue. Nullam tortor ligula, mattis vel cursus id, pretium non lacus.",
|
||||
"language",
|
||||
"access",
|
||||
],
|
||||
]
|
||||
|
||||
|
||||
@ -61,14 +71,14 @@ const jsonMockViewsByYears= [
|
||||
|
||||
function searchInList(list, searchInput) {
|
||||
let retList = []
|
||||
if (searchInput === "")
|
||||
return [list[0].slice(0,2)]
|
||||
if (searchInput === ""){
|
||||
list.forEach(r => retList.push(r.slice(0, 2)))
|
||||
return retList
|
||||
}
|
||||
for (let i = 0; i < list.length; i++) {
|
||||
console.log(list[i])
|
||||
if (lDistance(list[i][0], searchInput) < 10 || list[i][0].toUpperCase().indexOf(searchInput.toUpperCase()) > -1){
|
||||
retList.push(list[i].slice(0,2))
|
||||
}
|
||||
console.log(list[i][0].toUpperCase().indexOf(searchInput.toUpperCase()))
|
||||
}
|
||||
return retList
|
||||
}
|
||||
@ -128,9 +138,8 @@ function update(){
|
||||
|
||||
<template>
|
||||
<div id="main">
|
||||
<FilterComponent :isOpen="isFilterOpened" @modal-close="closeModal" @submit="submitFilters">
|
||||
</FilterComponent>
|
||||
<ArticleComponent :isOpen="isArticleOpened" @modal-close="closeArticle"></ArticleComponent>
|
||||
<FilterComponent :isOpen="isFilterOpened" @modal-close="closeFilter" @submit="submitFilters"></FilterComponent>
|
||||
<ArticleComponent :isOpen="isResearchOpened" @modal-close="closeResearch"></ArticleComponent>
|
||||
<div id="profilePicture">
|
||||
<img src="/Clyde.png" />
|
||||
</div>
|
||||
@ -152,7 +161,7 @@ function update(){
|
||||
<select @change="update()" id="stats-select" v-model="statsOf">
|
||||
<option value="views">Views</option>
|
||||
<option value="co-authors">Co-authors</option>
|
||||
<option value="articles">Articles</option>
|
||||
<option value="researches">Researches</option>
|
||||
<option value="language">Languages</option>
|
||||
</select>
|
||||
</div>
|
||||
@ -168,16 +177,16 @@ function update(){
|
||||
<CanvasJSChart :options="options" id=chart @chart-ref="c => chart = c "/>
|
||||
</div>
|
||||
</div>
|
||||
<div id="articles">
|
||||
<div id="researches">
|
||||
<div id="search">
|
||||
<input type="text" id="search-input" placeholder="search articles" v-model="input"/>
|
||||
<button id="filterButton" @click="openModal"> Filters </button>
|
||||
<input type="text" id="search-input" placeholder="search for researches" v-model="input"/>
|
||||
<button id="filterButton" @click="openFilter"> Filters </button>
|
||||
</div>
|
||||
<ul id="articlesUL">
|
||||
<li id="articleLi" v-for="n in searchInList(articleList,input)">
|
||||
<ul id="researchUL">
|
||||
<li id="researchLi" v-for="n in searchInList(researchList,input)">
|
||||
<div class="vl"> {{n[0]}}</div>
|
||||
<div class="vl"> {{n[1]}}</div>
|
||||
<a @click="openArticle"> MoreInfo </a></li>
|
||||
<a @click="openResearch"> MoreInfo </a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
@ -262,7 +271,7 @@ function update(){
|
||||
}
|
||||
|
||||
|
||||
#articlesUL {
|
||||
#researchUL {
|
||||
list-style-type: none;
|
||||
color: white;
|
||||
padding: 12px;
|
||||
@ -270,7 +279,7 @@ function update(){
|
||||
height: 400px;
|
||||
overflow: scroll;
|
||||
}
|
||||
#articleLi{
|
||||
#researchLi{
|
||||
display: grid;
|
||||
grid-template-columns: auto auto auto;
|
||||
border: 2px solid black;
|
||||
|
Loading…
Reference in New Issue
Block a user