Initial commit
This commit is contained in:
@@ -0,0 +1,149 @@
|
||||
extends /layout
|
||||
|
||||
mixin sideMenu(meta)
|
||||
include /common/side-menu-mixin-consultancy
|
||||
+sideNavigation(meta)
|
||||
|
||||
block pageSpecificScipts
|
||||
script(nonce=cspNonce src="/javascripts/utils.js")
|
||||
script(nonce=cspNonce src="/javascripts/mixed-content.js")
|
||||
script(nonce=cspNonce src="/javascripts/consultancy.js")
|
||||
script(nonce=cspNonce src="/javascripts/consultancy-edit.js")
|
||||
script(nonce=cspNonce src="/javascripts/comments.js")
|
||||
script(nonce=cspNonce src="/javascripts/consultancy-handle-unsaved.js")
|
||||
|
||||
block body
|
||||
- const specificUserRights = user && (user.hasRole('consultant') || user.hasRole('consultancy admin'))
|
||||
section#fixed-top-section
|
||||
include /common/main-navigation
|
||||
+main-navigation(false)
|
||||
block config
|
||||
- const pageTypeObject = sentFrom
|
||||
- const subHeading = 'Urejanje'
|
||||
- const description = 'Dodajte terminološki odgovor in ga utemeljite.'
|
||||
|
||||
+sideMenu(pageTypeObject)
|
||||
|
||||
include ../../../utilities/mixed-content
|
||||
|
||||
include /utilities/consultancy-admin-in-progress-panel-header
|
||||
//- const c = { h1: 'Terminološko svetovanje', description: 'Terminološka svetovalnica je namenjena širši strokovni javnosti, ki se sooča s konkretnimi poimenovalnimi problemi, pa naj gre za popolnoma nove pojme, ki jih je v slovenščini šele treba poimenovati, ali že znane pojme, za katere obstaja več poimenovanj, pa strokovnjaki čutijo potrebo po sistemskem poenotenju oz. izbiri najprimernejše rešitve.', buttons: [{ type: 'link', content: 'Zastavi novo vprašanje', url: '/svetovanje/vprasanje/novo' }] }
|
||||
- const c = { noSidebar: true, hrefurl: `/svetovanje/vprasanje/admin/${sentFrom}`, specificRights: specificUserRights, exportButtonPresent: false, h1: 'Urejanje terminološkega odgovora', description: 'Dodajte terminološki odgovor in ga utemeljite.', buttons: [{ form: 'edit-form', type: 'button', content: 'Shrani spremembe', contentDisabled: true }] }
|
||||
+mainHeader(c)
|
||||
if specificUserRights
|
||||
.content-hold-prerequisites
|
||||
#offset-main.main-container.offset-correction
|
||||
.row.mt-4.mx-0
|
||||
.col.g-0
|
||||
p.text-header-description-gray.mb-2 <b>Datum vprašanja:</b> #{ entry.timeCreated }
|
||||
p.text-header-description-gray.mt-2.mb-0 <b>Uporabnik:</b> #{ author.firstName }
|
||||
p.text-header-description-gray.mt-1 <b>E-pošta:</b> #{ author.email }
|
||||
hr
|
||||
p.text-header-description-gray.mb-2 <b>Datum objave/spremembe:</b> #{ entry.timePublished }
|
||||
p.text-header-description-gray.mt-2.mb-0 <b>Avtorji mnenja:</b>
|
||||
span.text-header-description-gray= ` ${entry.answerAuthors ? entry.answerAuthors.join(`, `) : ''}`
|
||||
p.text-header-description-gray.mt-1 <b>URL povezava do mnenja:</b> #{ isPublished?`${urlPrefix}/svetovanje/vprasanje/${id}`:'' }
|
||||
hr
|
||||
form#edit-form.row(method="put" action="/api/v1/consultancy/entry")
|
||||
input(type="hidden" name="_method" value="put")
|
||||
input#entry-id.d-none(type="text" value=id)
|
||||
.col
|
||||
h5.navigation-text-color Urejanje
|
||||
|
||||
#question-title-field.mt-4
|
||||
.title.mt-4
|
||||
.subject-name.col.d-flex.justify-content-between
|
||||
label.mb-1.smaller-gray-uppercase(for="address") NASLOV*
|
||||
- const type = 'two'
|
||||
+mixedContentBtns
|
||||
.row
|
||||
.col
|
||||
textarea#question-title.form-control.explanation-field.mc-field.dispatch-tab(
|
||||
type="text"
|
||||
name="address"
|
||||
) #{ entry.title }
|
||||
//- .col-sm.d-flex.align-items-center
|
||||
span.d-md-inline.d-block.smaller-gray-info.ms-xxl-3.ms-md-3 Navodilo k posamičnemu polju. Reprehenderit aliqua quis ut velit eu irure non ad sunt sunt ipsum sunt esse.
|
||||
|
||||
.cerif-area.mt-4
|
||||
.subject-name
|
||||
label.smaller-gray-uppercase(for="select-cerif") PODROČJE
|
||||
.row
|
||||
#cerif
|
||||
select#select-cerif.select-cerif.name-input.d-inline.form-control(
|
||||
name="domainPrimary"
|
||||
required
|
||||
)
|
||||
option(value=-1)
|
||||
each domain in allPrimaryDomains
|
||||
option(
|
||||
value=domain.id
|
||||
selected=domain.id === entry.domainPrimaryId
|
||||
)= domain.nameSl
|
||||
#invalid-section.invalid-feedback-selection.hidden-section.mt-3 Nimate izbranega področja CERIF.
|
||||
//- .col-sm.d-flex.align-items-center
|
||||
span.d-md-inline.d-block.smaller-gray-info.ms-xxl-3.ms-md-3 Področje, v katero sodi opisani terminološki problem
|
||||
|
||||
#question-field.mt-4
|
||||
.title.mt-4
|
||||
.subject-name.col.d-flex.justify-content-between
|
||||
label.mb-1.smaller-gray-uppercase(for="questionTitle") VPRAŠANJE*
|
||||
+mixedContentBtns(type)
|
||||
.row
|
||||
.col
|
||||
textarea#question.form-control.explanation-field.mc-field.dispatch-tab(
|
||||
type="text"
|
||||
name="questionTitle"
|
||||
) #{ entry.question }
|
||||
//- .col-sm.d-flex.align-items-center
|
||||
span.d-md-inline.d-block.smaller-gray-info.ms-xxl-3.ms-md-3 Navodilo k posamičnemu polju. Reprehenderit aliqua quis ut velit eu irure non ad sunt sunt ipsum sunt esse.
|
||||
|
||||
#text-editor.mt-4
|
||||
.subject-name
|
||||
span.smaller-gray-uppercase MNENJE*
|
||||
.row
|
||||
.col
|
||||
-
|
||||
let innerHTML = ""
|
||||
if(!!entry.answer){
|
||||
innerHTML = entry.answer
|
||||
} else {
|
||||
if(entry.institution){
|
||||
innerHTML += `
|
||||
<b>Institucija:</b> ${entry.institution}
|
||||
<br><br>
|
||||
`
|
||||
}
|
||||
if(entry.description){
|
||||
innerHTML += `
|
||||
<b>Opis terminološkega problema:</b> ${entry.description}
|
||||
<br><br>`
|
||||
}
|
||||
if(entry.existingSolutions){
|
||||
innerHTML += `
|
||||
<b>Obstoječe poimenovalne rešitve:</b> ${entry.existingSolutions}
|
||||
<br><br>
|
||||
`
|
||||
}
|
||||
if(entry.examplesOfUse){
|
||||
innerHTML += `
|
||||
<b>Primeri rabe:</b> ${entry.examplesOfUse}
|
||||
<br><br><br>
|
||||
`
|
||||
}
|
||||
}
|
||||
|
||||
#opinion.summernote !{ innerHTML }
|
||||
//- .col-sm.d-flex.align-items-center
|
||||
span.d-md-inline.d-block.smaller-gray-info.ms-xxl-3.ms-md-3 Navodilo k posamičnemu polju. Reprehenderit aliqua quis ut velit eu irure non ad sunt sunt ipsum sunt esse.
|
||||
.comments-content.col-12.col-md-12.py-md-3.bd-content
|
||||
include /utilities/comments-with-pager
|
||||
else
|
||||
include /utilities/empty-main-panel-header
|
||||
+mainHeader
|
||||
.content-hold-prerequisites.ps-4.pe-4
|
||||
#offset-main.ps-2.pe-2
|
||||
p Nimate ustreznih pravic
|
||||
include /utilities/modal-alert-mixin
|
||||
+alertModal('unsaved-data', 'Shrani', 'Ne', 'modal-save-btn', 'modal-dont-save-btn', 'Imate neshranjene spremebe. Ali jih želite shraniti?')
|
||||
include /common/footer
|
||||
Reference in New Issue
Block a user