final translation and documentation
This commit is contained in:
parent
f081b7206f
commit
219165aacf
@ -1,5 +1,12 @@
|
||||
package ovh.herisson.Clyde.EndPoints.ScientificPublications;
|
||||
|
||||
/******************************************************
|
||||
* @file StatController.java
|
||||
* @author Bartha Maxime
|
||||
* @scope Publications Scientifiques
|
||||
*
|
||||
* Api class for handling statistics
|
||||
******************************************************/
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
|
@ -1,5 +1,12 @@
|
||||
package ovh.herisson.Clyde.Repositories.ScientificPublications;
|
||||
|
||||
/******************************************************
|
||||
* @file ResearchRepository.java
|
||||
* @author Bartha Maxime
|
||||
* @scope Publications Scientifiques
|
||||
*
|
||||
* Repository handling communication with Reseach table
|
||||
******************************************************/
|
||||
import org.springframework.data.jpa.repository.Query;
|
||||
import org.springframework.data.repository.CrudRepository;
|
||||
import ovh.herisson.Clyde.Tables.ScientificPublications.Research;
|
||||
|
@ -1,5 +1,12 @@
|
||||
package ovh.herisson.Clyde.Repositories.ScientificPublications;
|
||||
|
||||
/******************************************************
|
||||
* @file ResearcherRepository.java
|
||||
* @author Bartha Maxime
|
||||
* @scope Publications Scientifiques
|
||||
*
|
||||
* Repository handling communication with Reseacher table
|
||||
******************************************************/
|
||||
import org.springframework.data.jpa.repository.Query;
|
||||
import org.springframework.data.repository.CrudRepository;
|
||||
import ovh.herisson.Clyde.Tables.ScientificPublications.Research;
|
||||
|
@ -1,5 +1,12 @@
|
||||
package ovh.herisson.Clyde.Repositories.ScientificPublications;
|
||||
|
||||
/******************************************************
|
||||
* @file StatsRepository.java
|
||||
* @author Bartha Maxime
|
||||
* @scope Publications Scientifiques
|
||||
*
|
||||
* Repository handling communication with Reseach table for making statistics
|
||||
******************************************************/
|
||||
import org.springframework.data.jpa.repository.Query;
|
||||
import org.springframework.data.repository.CrudRepository;
|
||||
import ovh.herisson.Clyde.Tables.ScientificPublications.Research;
|
||||
|
@ -1,5 +1,12 @@
|
||||
package ovh.herisson.Clyde.Services.ScientificPublications;
|
||||
|
||||
/******************************************************
|
||||
* @file ResearchesService.java
|
||||
* @author Bartha Maxime
|
||||
* @scope Publications Scientifiques
|
||||
*
|
||||
* Service for managing researcher and researches
|
||||
******************************************************/
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
import ovh.herisson.Clyde.Repositories.ScientificPublications.ResearchRepository;
|
||||
@ -130,39 +137,6 @@ public class ResearchesService {
|
||||
}
|
||||
researcherRepo.save(researcher);
|
||||
}
|
||||
|
||||
|
||||
//Co Author part
|
||||
public boolean saveCoAuthors(Iterable<Long> researchersId, Research research) {
|
||||
|
||||
if (researchersId == null) return false;
|
||||
|
||||
ArrayList<Researcher> toAdd = new ArrayList<>();
|
||||
for (long researcherId : researchersId){
|
||||
Researcher researcher= researcherRepo.findById(researcherId);
|
||||
if (researcher== null){
|
||||
return false;
|
||||
}
|
||||
if (!toAdd.contains(researcher))
|
||||
{
|
||||
toAdd.add(researcher);
|
||||
}
|
||||
}
|
||||
research.getCoAuthors().addAll(toAdd);
|
||||
articleRepo.save(research);
|
||||
return true;
|
||||
}
|
||||
|
||||
public boolean deleteCoAuthor(Research research,Researcher coAuthor) {
|
||||
|
||||
if (!research.getCoAuthors().contains(coAuthor))
|
||||
return false;
|
||||
|
||||
research.getCoAuthors().remove(coAuthor);
|
||||
articleRepo.save(research);
|
||||
return true;
|
||||
}
|
||||
|
||||
// Other stuff
|
||||
|
||||
public Research addView(Research research) {
|
||||
@ -188,12 +162,9 @@ public class ResearchesService {
|
||||
}
|
||||
}
|
||||
|
||||
if (research.getAccess() == Access.Restricted && (
|
||||
user.getRole() == Role.Secretary ||
|
||||
user.getRole() == Role.Teacher || user.getRole() == Role.InscriptionService))
|
||||
return false; // if the access is restricted only the staff member (above) can access the research
|
||||
return research.getAccess() != Access.Restricted || (user.getRole() != Role.Secretary &&
|
||||
user.getRole() != Role.Teacher && user.getRole() != Role.InscriptionService);
|
||||
// if the access is restricted only the staff member (above) can access the research
|
||||
|
||||
return true;
|
||||
// if the researcher is the author or one of the co-authors of the research will return false
|
||||
}
|
||||
}
|
||||
|
@ -1,14 +1,19 @@
|
||||
package ovh.herisson.Clyde.Services.ScientificPublications;
|
||||
|
||||
/******************************************************
|
||||
* @file StatisticsService
|
||||
* @author Bartha Maxime
|
||||
* @scope Publications Scientifiques
|
||||
*
|
||||
* Service for managing statistics
|
||||
******************************************************/
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
import ovh.herisson.Clyde.Repositories.ScientificPublications.ResearchRepository;
|
||||
import ovh.herisson.Clyde.Repositories.ScientificPublications.ResearcherRepository;
|
||||
import ovh.herisson.Clyde.Repositories.ScientificPublications.StatsRepository;
|
||||
import ovh.herisson.Clyde.Tables.ScientificPublications.Research;
|
||||
import ovh.herisson.Clyde.Tables.ScientificPublications.Researcher;
|
||||
|
||||
import java.security.Key;
|
||||
import java.util.*;
|
||||
|
||||
@Service
|
||||
|
@ -6,7 +6,6 @@ package ovh.herisson.Clyde.Tables.ScientificPublications;
|
||||
* @scope Extension Publications scientifiques
|
||||
*
|
||||
* Research entity
|
||||
*
|
||||
******************************************************/
|
||||
import jakarta.persistence.*;
|
||||
import lombok.Getter;
|
||||
|
@ -6,7 +6,6 @@ package ovh.herisson.Clyde.Tables.ScientificPublications;
|
||||
* @scope Extension Publications scientifiques
|
||||
*
|
||||
* Researcher entity
|
||||
*
|
||||
******************************************************/
|
||||
import jakarta.persistence.*;
|
||||
import lombok.AllArgsConstructor;
|
||||
|
@ -54,3 +54,64 @@ Curriculum=curriculum
|
||||
Credits=Credits
|
||||
InscriptionService=I.S.
|
||||
faculty=Faculty
|
||||
Year=Year
|
||||
Access=Access
|
||||
Access.Restricted=Restricted
|
||||
Access.OpenSource=OpenSource
|
||||
Access.Private=Private
|
||||
Language=Language
|
||||
Month=Month
|
||||
Month.01=january
|
||||
Month.02=february
|
||||
Month.03=march
|
||||
Month.04=april
|
||||
Month.05=may
|
||||
Month.06=june
|
||||
Month.07=july
|
||||
Month.08=august
|
||||
Month.09=september
|
||||
Month.10=october
|
||||
Month.11=november
|
||||
Month.12=december
|
||||
Domain=Domain
|
||||
PaperType=PaperType
|
||||
Submit=Submit
|
||||
Search.Researches=Search For Researches
|
||||
Search.Researchers=Search For Researchers
|
||||
Filters=Filters
|
||||
Toggle.Researcher=Toggle Researcher Search
|
||||
Untoggle.Researcher=Toggle Research Search
|
||||
MoreInfo=More Info
|
||||
Modify.Research=Modify Research
|
||||
To.Change.In.Options=To change in regular account options
|
||||
Modify.Data=Modify Data
|
||||
Confirm.Changes=Confirm Changes
|
||||
Cancel.Changes=Cancel Changes
|
||||
Post.Research=Post a new Research
|
||||
Summary=Summary
|
||||
Title=Title
|
||||
Views=Number of Views
|
||||
See.Research=See Research
|
||||
SeeBibTex=See BibTex
|
||||
Author=Author
|
||||
CoAuthors=Co-Authors
|
||||
ReleaseDate=ReleaseDate
|
||||
Article.Id=Article Id
|
||||
Delete.Research=Delete Research
|
||||
Here=Here
|
||||
Stat.Type=Stat Type
|
||||
Researches=Researches
|
||||
Please.Select.Option=Please Select an Option
|
||||
Class.By=Class By
|
||||
PaperType.Article=Article
|
||||
PaperType.Book=Book
|
||||
PaperType.Book.Chapter=Book Chapter
|
||||
PaperType.Paper=Paper
|
||||
Research.Pdf=Research Pdf
|
||||
BibTex.Pdf=BibTex Pdf
|
||||
CoAuthors.List=Co-Author List
|
||||
Confirm.Publish=Confirm Publishing
|
||||
Cancel.Publish=Cancel Publishing
|
||||
Years=Years
|
||||
Months=Months
|
||||
By=By
|
@ -54,3 +54,64 @@ Curriculum=Cursus
|
||||
Credits=Credits
|
||||
InscriptionService=S.I.
|
||||
faculty=Faculté
|
||||
Year=Année
|
||||
Access=Accès
|
||||
Access.Restricted=Restreint
|
||||
Access.OpenSource=Libre
|
||||
Access.Private=Privé
|
||||
Language=Langue
|
||||
Month=Mois
|
||||
Month.01=janvier
|
||||
Month.02=fevrier
|
||||
Month.03=mars
|
||||
Month.04=avril
|
||||
Month.05=mai
|
||||
Month.06=juin
|
||||
Month.07=juillet
|
||||
Month.08=août
|
||||
Month.09=septembre
|
||||
Month.10=octobre
|
||||
Month.11=novembre
|
||||
Month.12=decembre
|
||||
Domain=Domaine
|
||||
PaperType=Type de recherche
|
||||
Submit=Envoyer
|
||||
Search.Researches=Chercher Par Recherche
|
||||
Search.Researchers=Chercher Par Chercheur
|
||||
Filters=Filtres
|
||||
Toggle.Researcher=Activer la recherche par chercheur
|
||||
Untoggle.Researcher=Désactiver la recherche par chercheur
|
||||
MoreInfo=Plus d'info
|
||||
Modify.Research=Modifer l'article
|
||||
To.Change.In.Options=À changer dans les options
|
||||
Modify.Data=Modifier
|
||||
Confirm.Changes=Confirmer les Changements
|
||||
Cancel.Changes=Abandonner les Changements
|
||||
Post.Research=Poster un nouvel article
|
||||
Summary=Résumé
|
||||
Title=Titre
|
||||
Views=Nombre de Vues
|
||||
See.Research=Ouvrir l'article
|
||||
SeeBibTex=Ouvrir le BibTex
|
||||
Author=Autheur
|
||||
CoAuthors=Co-Autheurs
|
||||
ReleaseDate=Date de Parution
|
||||
Article.Id=Id de l'article
|
||||
Delete.Research=Supprimer l'article
|
||||
Here=Ici
|
||||
Stat.Type=Type de Stat
|
||||
Researches=Recherches
|
||||
Please.Select.Option=Selectionnez des Options
|
||||
Class.By=Classifer Par
|
||||
PaperType.Article=Article
|
||||
PaperType.Book=Livre
|
||||
PaperType.Book.Chapter=Chapitre de Livre
|
||||
PaperType.Paper=Papier
|
||||
Research.Pdf=Pdf de la Recherche
|
||||
BibTex.Pdf=BibTex de la Recherche
|
||||
CoAuthors.List=Liste des Co-Autheurs
|
||||
Confirm.Publish=Confirmer la Publication
|
||||
Cancel.Publish=Annuler la Publication
|
||||
Years=Années
|
||||
Months=Mois
|
||||
By=par
|
||||
|
@ -7,6 +7,7 @@
|
||||
<script setup>
|
||||
import { ref } from "vue";
|
||||
import {onClickOutside} from '@vueuse/core'
|
||||
import i18n from "@/i18n.js";
|
||||
const yearList = ref([])
|
||||
const yearCheckedList = ref([])
|
||||
const monthList = ref([])
|
||||
@ -66,37 +67,6 @@ for (let i=0;i< props.allArticles.length;i++) {
|
||||
|
||||
if (!paperTypeList.value.includes(r.paperType) && r.paperType !== null) paperTypeList.value.push(r.paperType);
|
||||
}
|
||||
function monthToString(month){
|
||||
|
||||
switch (month){
|
||||
case "01":
|
||||
return "january"
|
||||
case "02":
|
||||
return "february"
|
||||
case "03":
|
||||
return "march"
|
||||
case "04":
|
||||
return "april"
|
||||
case "05":
|
||||
return "may"
|
||||
case "06":
|
||||
return "june"
|
||||
case "07":
|
||||
return "july"
|
||||
case "08":
|
||||
return "august"
|
||||
case "09":
|
||||
return "september"
|
||||
case "10":
|
||||
return "november"
|
||||
case "11":
|
||||
return "october"
|
||||
case "12":
|
||||
return "december"
|
||||
default:
|
||||
return "unknown"
|
||||
}
|
||||
}
|
||||
const emit = defineEmits(["modal-close", "submit"]);
|
||||
|
||||
const target = ref(null)
|
||||
@ -109,15 +79,15 @@ onClickOutside(target, ()=>emit('modal-close'))
|
||||
<div class="modal-wrapper">
|
||||
<div class="modal-container" ref="target">
|
||||
<div id="filterGrid">
|
||||
<div> Year :<ul class="checkers"> <li v-for="n in yearList"> <input type="checkbox" :value=n v-model="yearCheckedList"> {{n}} </li> </ul> </div>
|
||||
<div class="vl"> Access :<ul class="checkers"> <li v-for="n in accessList"> <input type="checkbox" :value=n v-model="accessCheckedList"> {{n}} </li> </ul> </div>
|
||||
<div class="vl"> Language :<ul class="checkers"> <li v-for="n in languageList"> <input type="checkbox" :value=n v-model="languageCheckedList"> {{n}} </li> </ul> </div>
|
||||
<div> Month :<ul class="checkers"> <li v-for="n in monthList"> <input type="checkbox" :value=n v-model="monthCheckedList"> {{monthToString(n)}} </li> </ul> </div>
|
||||
<div class="vl"> Domain :<ul class="checkers"> <li v-for="n in domainList"> <input type="checkbox" :value=n v-model="domainCheckedList"> {{n}} </li> </ul> </div>
|
||||
<div class="vl"> PaperType :<ul class="checkers"> <li v-for="n in paperTypeList"> <input type="checkbox" :value=n v-model="paperTypCheckedList"> {{n}} </li> </ul> </div>
|
||||
<div> {{i18n("Year")}} :<ul class="checkers"> <li v-for="n in yearList"> <input type="checkbox" :value=n v-model="yearCheckedList"> {{n}} </li> </ul> </div>
|
||||
<div class="vl"> {{i18n("Access")}}:<ul class="checkers"> <li v-for="n in accessList"> <input type="checkbox" :value=n v-model="accessCheckedList"> {{i18n("Access."+n)}} </li> </ul> </div>
|
||||
<div class="vl"> {{i18n("Language")}} :<ul class="checkers"> <li v-for="n in languageList"> <input type="checkbox" :value=n v-model="languageCheckedList"> {{n}} </li> </ul> </div>
|
||||
<div> {{i18n("Month")}} :<ul class="checkers"> <li v-for="n in monthList"> <input type="checkbox" :value=n v-model="monthCheckedList"> {{i18n("Month." + n)}} </li> </ul> </div>
|
||||
<div class="vl"> {{i18n("Domain")}} :<ul class="checkers"> <li v-for="n in domainList"> <input type="checkbox" :value=n v-model="domainCheckedList"> {{n}} </li> </ul> </div>
|
||||
<div class="vl"> {{i18n("PaperType")}} :<ul class="checkers"> <li v-for="n in paperTypeList"> <input type="checkbox" :value=n v-model="paperTypCheckedList"> {{n}} </li> </ul> </div>
|
||||
</div>
|
||||
<div id="submit">
|
||||
<button @click.stop="submit">Submit</button>
|
||||
<button @click.stop="submit">{{i18n("Submit")}}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1,8 +1,15 @@
|
||||
<!----------------------------------------------------
|
||||
File: ListResearches.vue
|
||||
Author: Maxime Bartha
|
||||
Scope: Extension Publicatons scientifiquess
|
||||
Description: Listing of the researches with filters
|
||||
----------------------------------------------------->
|
||||
<script setup>
|
||||
import {ref, watch} from "vue";
|
||||
import FilterComponent from "@/Apps/ScientificPublications/FilterComponent.vue";
|
||||
import ArticleComponent from "@/Apps/ScientificPublications/ResearchComponent.vue";
|
||||
import {fetchAllResearches} from "@/rest/ScientificPublications/ManageResearch.js";
|
||||
import i18n from "../../i18n.js";
|
||||
const input = ref("")
|
||||
const isFilterOpened = ref(false);
|
||||
const isResearchOpened = ref(false);
|
||||
@ -106,11 +113,11 @@ const emit = defineEmits(["modified"]);
|
||||
<FilterComponent :isOpen="isFilterOpened" :allArticles="researchList" @modal-close="closeFilter" @submit="submitFilters"></FilterComponent>
|
||||
<ArticleComponent :article="articleToDisplay" :isOpen="isResearchOpened" :manage="props.manage" @modal-close="closeResearch" @modified="emit('modified')"></ArticleComponent>
|
||||
<div id="search">
|
||||
<input v-if="!isResearcher" type="text" id="search-input" placeholder="search for researches" v-model="input"/>
|
||||
<input v-else type="text" id="search-input" placeholder="search for researcher" v-model="input"/>
|
||||
<button v-if="!isResearcher" id="filterButton" @click="openFilter"> Filters </button>
|
||||
<button v-if="!isResearcher" id="unToggledResearchButton" @click="isResearcher = !isResearcher"> Toggle Researcher Search</button>
|
||||
<button v-if="isResearcher" id="toggledResearchButton" @click="isResearcher = !isResearcher"> UnToggle Researcher Search</button>
|
||||
<input v-if="!isResearcher" type="text" id="search-input" :placeholder="i18n('Search.Researches')" v-model="input"/>
|
||||
<input v-else type="text" id="search-input" :placeholder="i18n('Search.Researchers')" v-model="input"/>
|
||||
<button v-if="!isResearcher" id="filterButton" @click="openFilter"> {{i18n("Filters")}} </button>
|
||||
<button v-if="!isResearcher" id="unToggledResearchButton" @click="isResearcher = !isResearcher"> {{i18n("Toggle.Researcher")}}</button>
|
||||
<button v-if="isResearcher" id="toggledResearchButton" @click="isResearcher = !isResearcher"> {{i18n("Untoggle.Researcher")}}</button>
|
||||
</div>
|
||||
<div id="researches">
|
||||
<ul id="researchUL">
|
||||
@ -118,8 +125,8 @@ const emit = defineEmits(["modified"]);
|
||||
<div class="vl"> {{n.title}}</div>
|
||||
<div class="vl"> <a :href="'#/researcher-profile?id=' + n.researcher.id"> {{ n.researcher.user.firstName +" "+ n.researcher.user.lastName }}</a>
|
||||
</div>
|
||||
<a v-if="!manage" @click="openResearch(n)"> MoreInfo </a>
|
||||
<a v-else @click="openResearch(n)"> Modify Research</a></li>
|
||||
<a v-if="!manage" @click="openResearch(n)"> {{i18n("MoreInfo")}}</a>
|
||||
<a v-else @click="openResearch(n)"> {{i18n("Modify.Research")}}</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
@ -215,7 +222,4 @@ a{
|
||||
#toggledResearchButton:hover{
|
||||
background: #ff2d55;
|
||||
}
|
||||
|
||||
|
||||
|
||||
</style>
|
@ -1,9 +1,16 @@
|
||||
<!----------------------------------------------------
|
||||
File: ManageResearchesProfile.vue
|
||||
Author: Maxime Bartha
|
||||
Scope: Extension Publicatons scientifiquess
|
||||
Description: Managing Researcher Profile page
|
||||
----------------------------------------------------->
|
||||
<script setup>
|
||||
import { ref} from "vue";
|
||||
import {fetchResearches, } from "@/rest/ScientificPublications/ResearcherProfile.js";
|
||||
import {getSelf, patchProfile} from "@/rest/ScientificPublications/ManageResearcherProfile.js";
|
||||
import ResearchPostComponent from "@/Apps/ScientificPublications/ResearchPostComponent.vue";
|
||||
import ListResearches from "@/Apps/ScientificPublications/ListResearches.vue";
|
||||
import i18n from "../../i18n.js";
|
||||
const input = ref("");
|
||||
const isPostResearchOpened = ref(false);
|
||||
const changing = ref(false);
|
||||
@ -40,30 +47,30 @@ async function modifiedResearch(){
|
||||
</div>
|
||||
<div id="researcherInfos">
|
||||
<div class="surrounded" v-if="!changing">{{researcher.user.lastName}} {{researcher.user.firstName}}</div>
|
||||
<div class="surrounded" v-else> To Be changed in manage (simple) Profile</div>
|
||||
<div class="surrounded" v-else> {{i18n("To.Change.In.Options")}}</div>
|
||||
|
||||
<div class="surrounded" v-if="!changing">Orcid : {{researcher.orcidId}}</div>
|
||||
<div class="surrounded" v-else>Orcid : <input v-model="toModify.orcidId"> </input></div>
|
||||
|
||||
<div class="surrounded" v-if="!changing">Email : {{researcher.user.email}}</div>
|
||||
<div class="surrounded" v-else> To Be changed in manage (simple) Profile</div>
|
||||
<div class="surrounded" v-else> {{i18n("To.Change.In.Options")}}</div>
|
||||
|
||||
<div class="surrounded" v-if="!changing">
|
||||
site : <a :href=researcher.site style="color: #007aff"> {{researcher.site}}</a>
|
||||
Site : <a :href=researcher.site style="color: #007aff"> {{researcher.site}}</a>
|
||||
</div>
|
||||
<div class="surrounded" v-else>Site : <input v-model="toModify.site"></input></div>
|
||||
|
||||
<div class="surrounded" v-if="!changing">Domain : {{researcher.domain}}</div>
|
||||
<div class="surrounded" v-if="!changing">{{i18n("Domain")}} : {{researcher.domain}}</div>
|
||||
<div class="surrounded" v-else>Domain : <input v-model="toModify.domain"> </input></div>
|
||||
|
||||
<div style="text-align: center; align-self: center" v-if="!changing"> <button class="modifyButton" @click="changing = !changing">Modify Data</button></div>
|
||||
<div style="text-align: center; align-self: center" v-if="!changing"> <button class="modifyButton" @click="changing = !changing">{{i18n("Modify.Data")}}</button></div>
|
||||
<div v-else style="text-align: center; align-self: center">
|
||||
<button id="confirmButton" @click="confirmChanges">Confirm Changes</button>
|
||||
<button id="cancelButton" @click="cancelChanges">Cancel Changes</button>
|
||||
<button id="confirmButton" @click="confirmChanges"> {{i18n("Confirm.Changes")}}</button>
|
||||
<button id="cancelButton" @click="cancelChanges"> {{i18n("Cancel.Changes")}}</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="postArticle" style="text-align: center">
|
||||
<button class="modifyButton" @click="openPostResearch">Post a Research</button>
|
||||
<button class="modifyButton" @click="openPostResearch">{{i18n("Post.Research")}}</button>
|
||||
|
||||
|
||||
</div>
|
||||
|
@ -2,13 +2,14 @@
|
||||
File: ResearchComponent.vue
|
||||
Author: Maxime Bartha
|
||||
Scope: Extension Publicatons scientifiquess
|
||||
Description: Pop Up summarizing
|
||||
Description: Pop Up summarizing a research infos
|
||||
----------------------------------------------------->
|
||||
|
||||
<script setup xmlns="http://www.w3.org/1999/html">
|
||||
import {ref } from "vue";
|
||||
import {onClickOutside} from '@vueuse/core'
|
||||
import {patchArticle, deleteArticle, addView} from "@/rest/ScientificPublications/ManageResearch.js";
|
||||
import i18n from "../../i18n.js";
|
||||
|
||||
const restURL = import.meta.env.VITE_CLYDE_MODE === 'container' ? "http://localhost:8000": import.meta.env.DEV ? "http://localhost:5173" : "https://clyde.herisson.ovh/api"
|
||||
const props = defineProps({
|
||||
@ -71,40 +72,40 @@ async function articleClicked(){
|
||||
<div class="modal-wrapper">
|
||||
<div class="modal-container" ref="target">
|
||||
<div ><ul>
|
||||
<li>Article Id : {{article.id}}</li>
|
||||
<li>Title : {{article.title}}</li>
|
||||
<li>Author : {{article.researcher.user.lastName + " " + article.researcher.user.firstName}}</li>
|
||||
<li> Co Authors : <ul id="coAuthors" v-for="n in article.coAuthors"> <li id="coAuthorsLi"> {{n.user.firstName}} {{n.user.lastName}}, </li></ul></li>
|
||||
<li>Summary : {{article.summary}}</li>
|
||||
<li>ReleaseDate: {{format(article.releaseDate)}}</li>
|
||||
<li>Language : {{article.language}}</li>
|
||||
<li>PaperType : {{article.paperType}}</li>
|
||||
<li>Domain : {{article.domain}}</li>
|
||||
<li>Views : {{article.views}}</li>
|
||||
<li>Access : {{article.access}}</li>
|
||||
<li>{{i18n("Article.Id")}} : {{article.id}}</li>
|
||||
<li>{{i18n("Title")}} : {{article.title}}</li>
|
||||
<li>{{i18n("Author")}} : {{article.researcher.user.lastName + " " + article.researcher.user.firstName}}</li>
|
||||
<li>{{i18n("CoAuthors")}} : <ul id="coAuthors" v-for="n in article.coAuthors"> <li id="coAuthorsLi"> {{n.user.firstName}} {{n.user.lastName}}, </li></ul></li>
|
||||
<li>{{i18n("Summary")}} : {{article.summary}}</li>
|
||||
<li>{{i18n("ReleaseDate")}} : {{format(article.releaseDate)}}</li>
|
||||
<li>{{i18n("Language")}} : {{article.language}}</li>
|
||||
<li>{{i18n("PaperType")}} : {{article.paperType}}</li>
|
||||
<li>{{i18n("Domain")}} : {{article.domain}}</li>
|
||||
<li>{{i18n("Views")}} : {{article.views}}</li>
|
||||
<li>{{i18n("Access")}} : {{i18n(article.access)}}</li>
|
||||
</ul>
|
||||
<div id="downloads" v-if="article.pdfLocation !== null && !manage">
|
||||
<a :href=downloadPdf() @click.stop="articleClicked" target="_blank">See Research</a>
|
||||
<a v-if="article.bibTexLocation !== null" :href=downloadBibTex() @click.stop="emit('modal-close')" target="_blank">See bibTex</a> </div>
|
||||
<a :href=downloadPdf() @click.stop="articleClicked" target="_blank">{{i18n("See.Research")}}</a>
|
||||
<a v-if="article.bibTexLocation !== null" :href=downloadBibTex() @click.stop="emit('modal-close')" target="_blank">{{i18n("See.BibTex")}}</a> </div>
|
||||
</div>
|
||||
<div v-if="manage">
|
||||
<div>
|
||||
<ul>
|
||||
<li>Title : <input v-model="toModify.title"></li>
|
||||
<li>Language : <input v-model="toModify.language"></li>
|
||||
<li>Summary : <input v-model="toModify.summary"></li>
|
||||
<li>Domain : <input v-model="toModify.domain"></li>
|
||||
<li>Access :
|
||||
<li>{{i18n("Title")}} : <input v-model="toModify.title"></li>
|
||||
<li>{{i18n("Language")}} : <input v-model="toModify.language"></li>
|
||||
<li>{{i18n("Summary")}} : <input v-model="toModify.summary"></li>
|
||||
<li>{{i18n("Domain")}} : <input v-model="toModify.domain"></li>
|
||||
<li>{{i18n("Access")}} :
|
||||
<select id="classed-select" v-model="toModify.access">
|
||||
<option value="OpenSource">OpenSource</option>
|
||||
<option value="Restricted">Restricted</option>
|
||||
<option value="Private">Private</option>
|
||||
<option value="OpenSource">{{i18n("Access.OpenSource")}}</option>
|
||||
<option value="Restricted">{{i18n("Access.Restricted")}}</option>
|
||||
<option value="Private">{{i18n("Access.Private")}}</option>
|
||||
</select></li>
|
||||
</ul>
|
||||
</div>
|
||||
<button id="confirmButton" @click="confirmChanges">Confirm Changes</button>
|
||||
<button id="cancelButton" @click="cancelChanges">Cancel Changes</button>
|
||||
<button id="deleteButton" @click="deleteThisArticle">Delete Research </button>
|
||||
<button id="confirmButton" @click="confirmChanges"> {{i18n("Confirm.Changes")}}</button>
|
||||
<button id="cancelButton" @click="cancelChanges">{{i18n("Cancel.Changes")}}</button>
|
||||
<button id="deleteButton" @click="deleteThisArticle">{{i18n("Delete.Research")}} </button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1,8 +1,15 @@
|
||||
<!----------------------------------------------------
|
||||
File: ResearchPostComponent.vue
|
||||
Author: Maxime Bartha
|
||||
Scope: Extension Publicatons scientifiquess
|
||||
Description: pop up for posting a research
|
||||
----------------------------------------------------->
|
||||
<script setup>
|
||||
|
||||
import { ref } from "vue";
|
||||
import {onClickOutside} from '@vueuse/core'
|
||||
import {uploadFile, postResearch, fetchAllResearchers} from "@/rest/ScientificPublications/ManageResearch.js";
|
||||
import i18n from "../../i18n.js";
|
||||
const allResearcher = ref(await fetchAllResearchers())
|
||||
|
||||
const coAuthors = ref([])
|
||||
@ -61,34 +68,34 @@ onClickOutside(target, ()=>emit('modal-close'))
|
||||
<div class="modal-container" ref="target">
|
||||
<div ><ul>
|
||||
|
||||
<li>Title : <input v-model="toPost.title"></li>
|
||||
<li>Summary : <input v-model="toPost.summary"></li>
|
||||
<li>Language : <input v-model="toPost.language"></li>
|
||||
<li>Domain : <input v-model="toPost.domain"></li>
|
||||
<li>PaperType : <select id="classed-select" v-model="toPost.paperType">
|
||||
<option value="Article">Article</option>
|
||||
<option value="Book">Book</option>
|
||||
<option value="BookChapter">Book Chapter</option>
|
||||
<option value="Paper">Paper</option>
|
||||
<li>{{i18n("Title")}} : <input v-model="toPost.title"></li>
|
||||
<li>{{i18n("Summary")}} : <input v-model="toPost.summary"></li>
|
||||
<li>{{i18n("Language")}} : <input v-model="toPost.language"></li>
|
||||
<li>{{i18n("Domain")}} : <input v-model="toPost.domain"></li>
|
||||
<li>{{i18n("PaperType")}} : <select id="classed-select" v-model="toPost.paperType">
|
||||
<option value="Article">{{i18n("PaperType.Article")}}</option>
|
||||
<option value="Book">{{i18n("PaperType.Book")}}</option>
|
||||
<option value="BookChapter">{{i18n("PaperType.Book.Chapter")}}</option>
|
||||
<option value="Paper">{{i18n("PaperType.Paper")}}Paper</option>
|
||||
</select></li>
|
||||
<li>Access : <select id="classed-select" v-model="toPost.access">
|
||||
<option value="OpenSource">OpenSource</option>
|
||||
<option value="Restricted">Restricted</option>
|
||||
<option value="Private">Private</option>
|
||||
<li>{{i18n("Access")}} : <select id="classed-select" v-model="toPost.access">
|
||||
<option value="OpenSource">{{i18n("Access.OpenSource")}}</option>
|
||||
<option value="Restricted">{{i18n("Access.Restricted")}}</option>
|
||||
<option value="Private">{{i18n("Access.Private")}}</option>
|
||||
</select></li>
|
||||
|
||||
|
||||
<li> Research Pdf :
|
||||
<li> {{i18n("Research.Pdf")}} :
|
||||
<form novalidate enctype="multipart/form-data" class="inputBox">
|
||||
<input type="file" @change="uploadResearchPdf($event.target.files);" accept="application/pdf">
|
||||
</form></li>
|
||||
<li> Research BibTex :
|
||||
<li> {{i18n("BibTex.Pdf")}}
|
||||
<form novalidate enctype="multipart/form-data" class="inputBox">
|
||||
<input type="file" @change="uploadBibTex($event.target.files);" accept=".bib">
|
||||
</form></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="CoAuthorList"> Co-Authors List:
|
||||
<div id="CoAuthorList"> {{i18n("CoAuthors.List")}} :
|
||||
<ul style="list-style-type: none;" v-for="n in allResearcher">
|
||||
<li v-if="n.id !== props.researcher.id"> <input type="checkbox" :value=n v-model="coAuthors"> {{n.id}} : {{n.user.firstName}} {{n.user.lastName}}</li>
|
||||
</ul>
|
||||
@ -96,14 +103,12 @@ onClickOutside(target, ()=>emit('modal-close'))
|
||||
</div>
|
||||
<div></div>
|
||||
<div>
|
||||
<button id="confirmButton" @click="postNewResearch">Confirm Publish</button>
|
||||
<button id="cancelButton" @click="cancelPost">Cancel Publish</button>
|
||||
<button id="confirmButton" @click="postNewResearch">{{i18n("Confirm.Publish")}}</button>
|
||||
<button id="cancelButton" @click="cancelPost">{{i18n("Cancel.Publish")}}</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
@ -132,12 +137,6 @@ onClickOutside(target, ()=>emit('modal-close'))
|
||||
margin-top: 9px;
|
||||
}
|
||||
|
||||
#coAuthorList{
|
||||
overflow: scroll;
|
||||
}
|
||||
|
||||
|
||||
|
||||
#downloads button {
|
||||
align-self: center;
|
||||
margin-left: 2px;
|
||||
|
@ -9,6 +9,7 @@
|
||||
import { ref, reactive } from "vue";
|
||||
import {fetchResearcher, fetchResearches, fetchStats} from "@/rest/ScientificPublications/ResearcherProfile.js";
|
||||
import ListResearches from "@/Apps/ScientificPublications/ListResearches.vue";
|
||||
import i18n from "../../i18n.js";
|
||||
const input = ref("");
|
||||
const statsOf = ref("");
|
||||
const statsBy = ref("");
|
||||
@ -40,7 +41,7 @@ const options = reactive({
|
||||
animationEnabled: true,
|
||||
title: {
|
||||
fontColor: "white",
|
||||
text : "please select options",
|
||||
text : i18n("Please.Select.Option"),
|
||||
},
|
||||
data: [
|
||||
{
|
||||
@ -64,7 +65,7 @@ function update(){
|
||||
options.data[0].dataPoints = stats.value[index]
|
||||
|
||||
|
||||
options.title.text = statsOf.value + " By "+ statsBy.value;
|
||||
options.title.text = i18n(statsOf.value) +" "+ i18n("By") +" " + i18n(statsBy.value);
|
||||
chart.render();
|
||||
}
|
||||
</script>
|
||||
@ -79,26 +80,26 @@ function update(){
|
||||
<div class="surrounded">Orcid : {{researcher.orcidId}}</div>
|
||||
<div class="surrounded">Email : {{researcher.user.email}}</div>
|
||||
<div class="surrounded">
|
||||
site : <a :href=researcher.site style="color: #007aff"> {{researcher.site}}</a>
|
||||
Site : <a :href=researcher.site style="color: #007aff"> {{researcher.site}}</a>
|
||||
</div>
|
||||
<div class="surrounded">Domain : {{researcher.domain}}</div>
|
||||
<div id="coAuthorList" class="surrounded">Co-authors list : <a :href=downloadCoAuthors() download="coAuthors.json"> here </a></div>
|
||||
<div class="surrounded">{{i18n("Domain")}} : {{researcher.domain}}</div>
|
||||
<div id="coAuthorList" class="surrounded">Co-authors list : <a :href=downloadCoAuthors() download="coAuthors.json">{{i18n("Here")}}</a></div>
|
||||
</div>
|
||||
<div id="stats">
|
||||
<div class="surrounded">
|
||||
Stat type :
|
||||
{{i18n("Stat.Type")}} :
|
||||
<select @change="update()" id="stats-select" v-model="statsOf">
|
||||
<option value="views">Views</option>
|
||||
<option value="researches">Researches</option>
|
||||
<option value="languages">Languages</option>
|
||||
<option value="Views">{{i18n("Views")}}</option>
|
||||
<option value="Researches">{{i18n("Researches")}}</option>
|
||||
<option value="Languages">{{i18n("Language")}}</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="surrounded">
|
||||
Class by:
|
||||
{{i18n("Class.By")}} :
|
||||
<select @change="update()" id="classed-select" v-model="statsBy">
|
||||
<option value="years">Years</option>
|
||||
<option value="months">Months</option>
|
||||
<option value="topics">Topics</option>
|
||||
<option value="Years">{{i18n("Years")}}</option>
|
||||
<option value="Months">{{i18n("Months")}}</option>
|
||||
<option value="Topics">{{i18n("Domain")}}</option>
|
||||
</select>
|
||||
</div>
|
||||
<div id="statsPie">
|
||||
|
Loading…
Reference in New Issue
Block a user