translations of forum
This commit is contained in:
		@ -52,3 +52,6 @@ Curriculum=curriculum
 | 
			
		||||
Credits=Credits
 | 
			
		||||
InscriptionService=I.S.
 | 
			
		||||
faculty=Faculty
 | 
			
		||||
forum.create=Create forum
 | 
			
		||||
forum.create.name=New forum's name
 | 
			
		||||
forum.post.create.name=New post's title 
 | 
			
		||||
 | 
			
		||||
@ -52,3 +52,6 @@ Curriculum=Cursus
 | 
			
		||||
Credits=Credits
 | 
			
		||||
InscriptionService=S.I.
 | 
			
		||||
faculty=Faculté
 | 
			
		||||
forum.create=Créer un forum
 | 
			
		||||
forum.create.name=Nom du forum
 | 
			
		||||
forum.post.create.name=Titre du post
 | 
			
		||||
 | 
			
		||||
@ -7,6 +7,7 @@
 | 
			
		||||
 | 
			
		||||
<script setup>
 | 
			
		||||
import { ref, reactive } from 'vue'
 | 
			
		||||
import i18n from '@/i18n.js'
 | 
			
		||||
import { getCourses } from '@/rest/courses.js'
 | 
			
		||||
import { ForumsOfCurrentCourse, getForumsOfCourse, createForum } from '@/rest/forum.js'
 | 
			
		||||
import { PostsOfCurrentForum, getPostsOfForum, createPost } from '@/rest/forum.js'
 | 
			
		||||
@ -34,7 +35,7 @@ const addPostContent = ref("");
 | 
			
		||||
 | 
			
		||||
			<select id="forum" value="" v-model="selectedForum"  @change="getPostsOfForum(selectedForum !== 'create' ? selectedForum : null)" v-if="ForumsOfCurrentCourse != null">
 | 
			
		||||
				<option v-for="forum in ForumsOfCurrentCourse" :value=forum.id>{{forum.name}}</option>
 | 
			
		||||
				<option v-if="(Role === 'Admin' || Role === 'Teacher') && ForumsOfCurrentCourse != null" value="create">Create Forum</option>
 | 
			
		||||
				<option v-if="(Role === 'Admin' || Role === 'Teacher') && ForumsOfCurrentCourse != null" value="create">{{ i18n("forum.create") }}</option>
 | 
			
		||||
			</select>
 | 
			
		||||
		</div>
 | 
			
		||||
		<div id="PostSelector" v-if="PostsOfCurrentForum != null">
 | 
			
		||||
@ -56,13 +57,13 @@ const addPostContent = ref("");
 | 
			
		||||
 | 
			
		||||
		<!-- Popup to add forum -->
 | 
			
		||||
		<div id="addForumForm" v-if="selectedForum === 'create'" @keyup.enter="createForum(selectedCourse, addForumName); selectedForum = '';">
 | 
			
		||||
			<label>New Forum:</label>
 | 
			
		||||
			<label>{{ i18n("forum.create.name") }}</label>
 | 
			
		||||
			<input type="text" placeholder="Name" v-model=addForumName  />
 | 
			
		||||
		</div>
 | 
			
		||||
 | 
			
		||||
		<!-- Popup to add Post -->
 | 
			
		||||
		<div id="addPostForm" v-if=addPost>
 | 
			
		||||
			<label>New Post:</label>
 | 
			
		||||
			<label>i18n("forum.post.create.name")</label>
 | 
			
		||||
			<input type="text" placeholder="subject" v-model=addPostSubject @keyup.enter="createPost(selectedForum, addPostSubject, addPostContent); addPost = false;"/>
 | 
			
		||||
			<textarea v-model="addPostContent" placeholder=content></textarea>
 | 
			
		||||
			<input type="submit" value="send" @click="createPost(selectedForum, addPostSubject, addPostContent); addPost = false;">
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user