fixed spelling mistake
This commit is contained in:
parent
821377a72f
commit
7a05fc1316
@ -113,7 +113,7 @@ public class MockController {
|
|||||||
Researcher output = researchesService.saveResearcher(jojoResearcherAccount);
|
Researcher output = researchesService.saveResearcher(jojoResearcherAccount);
|
||||||
|
|
||||||
Research jojoResearch = new Research("Graphs : Advanced Search Algorithms",output,new Date(0),
|
Research jojoResearch = new Research("Graphs : Advanced Search Algorithms",output,new Date(0),
|
||||||
PaperType.Article,"here",null,"english",
|
PaperType.Article,"here.pdf",null,"english",
|
||||||
Access.OpenSource,"IT","This Article's title speaks for itself \n We'll discuss about advanced Graph search Algorithms");
|
Access.OpenSource,"IT","This Article's title speaks for itself \n We'll discuss about advanced Graph search Algorithms");
|
||||||
|
|
||||||
Research restrictedResearch = new Research("just another Name",output,new Date(1111111111),
|
Research restrictedResearch = new Research("just another Name",output,new Date(1111111111),
|
||||||
|
@ -229,7 +229,7 @@ public class ResearchController {
|
|||||||
|
|
||||||
///////
|
///////
|
||||||
//views part
|
//views part
|
||||||
@PostMapping("/addView{url}")
|
@PostMapping("/addView/{url}")
|
||||||
public ResponseEntity<ResearchDTO> addView(@PathVariable String url){
|
public ResponseEntity<ResearchDTO> addView(@PathVariable String url){
|
||||||
Research research = researchesServ.getResearchByUrl(url);
|
Research research = researchesServ.getResearchByUrl(url);
|
||||||
if (research ==null) return new ResponseEntity<>(HttpStatus.NOT_FOUND);
|
if (research ==null) return new ResponseEntity<>(HttpStatus.NOT_FOUND);
|
||||||
|
@ -194,6 +194,6 @@ public class ResearchesService {
|
|||||||
|
|
||||||
public Research addView(Research research) {
|
public Research addView(Research research) {
|
||||||
research.setViews(research.getViews()+1);
|
research.setViews(research.getViews()+1);
|
||||||
articleRepo.save(research);
|
return articleRepo.save(research);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -46,9 +46,7 @@ onClickOutside(target, ()=>emit('modal-close'))
|
|||||||
</ul>
|
</ul>
|
||||||
<div id="downloads" v-if="article.pdfLocation !== null">
|
<div id="downloads" v-if="article.pdfLocation !== null">
|
||||||
<button @click.stop="emit('downloadBibTex')">Download BibTex</button>
|
<button @click.stop="emit('downloadBibTex')">Download BibTex</button>
|
||||||
<form method="get" :action=article.pdfLocation>
|
<button @click.stop="emit('downloadPdf')">Download Research</button>
|
||||||
<button @click.stop="emit('downloadPdf', article)">Download Research</button>
|
|
||||||
</form>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
import { ref, reactive } from "vue";
|
import { ref, reactive } from "vue";
|
||||||
import FilterComponent from "@/Apps/ScientificPublications/FilterComponent.vue";
|
import FilterComponent from "@/Apps/ScientificPublications/FilterComponent.vue";
|
||||||
import ArticleComponent from "@/Apps/ScientificPublications/ResearchComponent.vue";
|
import ArticleComponent from "@/Apps/ScientificPublications/ResearchComponent.vue";
|
||||||
import {fetchResearcher, fetchResearches, fetchStats, addView} from "@/rest/ScientificPublications/ResearcherProfile.js";
|
import {fetchResearcher, fetchResearches, fetchStats, addView, getFile} from "@/rest/ScientificPublications/ResearcherProfile.js";
|
||||||
const input = ref("");
|
const input = ref("");
|
||||||
const statsOf = ref("");
|
const statsOf = ref("");
|
||||||
const statsBy = ref("");
|
const statsBy = ref("");
|
||||||
@ -48,12 +48,12 @@ const closeResearch = () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const downloadBibTex = (research) => {
|
const downloadBibTex = (research) => {
|
||||||
//todo
|
getFile(research.bibTexLocation)
|
||||||
}
|
}
|
||||||
|
|
||||||
const downloadArticle = (research) => {
|
const downloadArticle = (research) => {
|
||||||
addView(research.url)
|
addView(research.pdfLocation)
|
||||||
|
getFile(research.pdfLocation)
|
||||||
}
|
}
|
||||||
|
|
||||||
function downloadCoAuthors(){
|
function downloadCoAuthors(){
|
||||||
@ -131,7 +131,7 @@ function update(){
|
|||||||
<template>
|
<template>
|
||||||
<div id="main">
|
<div id="main">
|
||||||
<FilterComponent :isOpen="isFilterOpened" :allArticles="researchList" @modal-close="closeFilter" @submit="submitFilters()"></FilterComponent>
|
<FilterComponent :isOpen="isFilterOpened" :allArticles="researchList" @modal-close="closeFilter" @submit="submitFilters()"></FilterComponent>
|
||||||
<ArticleComponent :article="articleToDisplay" :isOpen="isResearchOpened" @modal-close="closeResearch" @downloadPdf="downloadArticle" @downloadBibTex="downloadBibTex"></ArticleComponent>
|
<ArticleComponent :article="articleToDisplay" :isOpen="isResearchOpened" @modal-close="closeResearch" @downloadPdf="downloadArticle(articleToDisplay)" @downloadBibTex="downloadBibTex(articleToDisplay)"></ArticleComponent>
|
||||||
<div id="profilePicture">
|
<div id="profilePicture">
|
||||||
<img src="/Clyde.png" />
|
<img src="/Clyde.png" />
|
||||||
</div>
|
</div>
|
||||||
|
@ -15,3 +15,6 @@ export async function addView(url){
|
|||||||
return restPost("/addView/" +url)
|
return restPost("/addView/" +url)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export async function getFile(url){
|
||||||
|
return restGet("/" + url)
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user