klnodekb/views/article.pug

272 lines
10 KiB
Plaintext

extends layout
block content
.mainContainer
link(rel='stylesheet' href='https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css')
.panel.panel-primary
.panel-heading
h4 Berendezés: #{article.title}
.panel-body
#form-group
div.row
div.col-md-6
h4(style="font-weight: bold") Munka szám: #{article.workNumber}
h4(style="font-weight: bold") Gyártási szám: #{article.deviceNumber}
h4(style="font-weight: bold") Berendezés jele: #{article.workSign}
div.col-md-6
p(style="text-align:right;") Létrehozó: #{author}
p(style="text-align:right;") Létrehozva: #{article.deviceDate}
p(style="text-align:right;") Megnevezés: #{article.title}
div.row
hr
div.col-md-6
p Megjegyzés: #{article.body}
//input.btn.btn-primary(type='Submit',value='Törlés')
.panel-footer
.btn-toolbar(role='toolbar')
if (rot || user.canAdd.files)
.btn-group(role='group')
a.btn.btn-success(href='/articles/edit/'+article._id+'/'+workId)
i.fa.fa-edit.fa-lg.fa-fw
| Szerkesztés
.btn-group(role='group')
a.btn.btn-danger.delete-article(href='#', data-id=article._id, data-wid=work)
i.fa.fa-trash.fa-lg.fa-fw
| Törlés
.btn-group(role='group')
if (workId==='0')
a.btn.btn-success(href='/devices/')
i.fa.fa-home.fa-lg.fa-fw
| Vissza
else
a.btn.btn-success(href='/work/'+workId)
i.fa.fa-home.fa-lg.fa-fw
| Vissza
.btn-group(role='group')
a.btn.btn-primary(href='/components/list/'+article._id+"/"+workId+"/0") Komponensek
|   
span.badge #{article.componentsArray.length}
.btn-group(role='group')
form(method='POST', action='/articles/gyartmanykisero/'+article.id+"/"+workId)
.input-group(style='width:400px')
input.form-control(type='text',name='separationText',placeholder='Szeparáció',style='background-color:#B9EFB9;')
span.input-group-btn
button.btn.btn-primary(type='submit')
span.glyphicon.glyphicon-print(aria-hidden='true')
| Gyártmánykísérő lap
.panel.panel-primary
.panel-heading
h4 Hozzáadott jegyzőkönyvek
.panel-body
.row
main.col-sm-9.ml-sm-auto.col-md-10.pt-3(role='main')
.table-responsive
table.table.table-striped(style='background-color:#FFFFE0;')
thead
tr
th #
th Megnevezés
th Típus
th Létrehozva
th Készítő
tbody
each cert, i in certs
tr
td #{i+1}
td
if (user.canAdd.files || user.canModify.files)
if (cert.certType==='KIF')
a(href="/certificates_kif/kifcert/"+cert._id)= cert.jkvTitle
if (cert.certType==='KOFTR')
a(href="/certificates_tr/kofcert/"+cert._id)= cert.jkvTitle
if (cert.certType==='KOFMC')
a(href="/certificates_mc/kofcert/"+cert._id)= cert.jkvTitle
else
if (cert.certType==='KIF')
label #{cert.jkvTitle}
if (cert.certType==='KOFTR')
label #{cert.jkvTitle}
if (cert.certType==='KOFMC')
label #{cert.jkvTitle}
td #{cert.certType}
td #{cert.bornDate}
td #{cert.author}
.panel-footer
.btn-toolbar(role='toolbar')
.btn-group(role='group')
a.btn.btn-primary(href='/certificates_kif/kifcertnew/'+article._id) Új KIF jegyzőkönyv
.btn-group(role='group')
a.btn.btn-primary(href='/certificates_tr/kofcertnew/'+article._id) Új TR jegyzőkönyv
.btn-group(role='group')
a.btn.btn-primary(href='/certificates_mc/kofcertnew/'+article._id) Új Mérőcella jkv
.panel.panel-primary
.panel-heading
h4 Hozzáadott dokumentumok
.panel-body
.row
main.col-sm-9.ml-sm-auto.col-md-10.pt-3(role='main')
h2 Hozzáadott dokumentumok
.table-responsive
table.table.table-striped(style='background-color:#FFFFE0;')
thead
tr
th #
th Megnevezés
th Típus
if (user.canDelete.files)
th Törlés
tbody
each doc, i in docObjs
tr
td #{i+1}
td
if (user.canDownload)
a(href='/articles/view/'+article.filePath+'/'+doc.filen) #{doc.filen}
else
p #{doc.filen}
td
img(src=doc.ico, width='32px', height='32px', alt='description here')
if (user.canDelete.files)
td
a.btn.btn-danger.delete-articleFile(href='#',data-path=doc.filen,data-id=article._id, data-wid=workId)
.glyphicon.glyphicon-trash
.panel-footer
if (user.canAdd.files)
form(id='upForm',enctype='multipart/form-data', action='/articles/upload/'+article._id+'/'+workId, method='post', aid=article._id,wid=workId)
div.row
div.col-md-5
label.btn.btn-primary.btn-block.btn-outlined(for='imageUpload') Fájlok kiválasztása
input#imageUpload(type='file',multiple='', style='display: none', name='photo')
input.form-control#dpath(name='dataPath',type='hidden', readonly=true, value=article.filePath)
div.col-md-1
button.btn.btn-primary.upload-btn(type='submit',value='Fájlok feltöltése')
.glyphicon.glyphicon-cloud-upload
br
.progress
.progress-bar(role='progressbar', style='width: 0%;', aria-valuenow='0', aria-valuemin='0', aria-valuemax='100', )
//label(id='perc') Percent Complete:
br
br
.container-fluid
.panel.panel-primary
.panel-heading
h4 Gyártmány fotók
.panel-body
style.
div.gallery {
background: #0275d8aa;
border-radius: 5px;
border: 1px solid #ccc;
width: 270px;
height: 270px;
}
div.gallery:hover {
border: 1px solid #777;
}
div.gallery .glr {
display: block;
margin-top: 10px;
margin-left: auto;
margin-right: auto;
width: 253px;
height: 190px;
}
div.desc {
padding: 5px;
text-align: center;
}
* {
box-sizing: border-box;
}
.responsive {
padding: 6px 6px;
float: left;
width: 24.99999%;
}
@media only screen and (max-width: 700px){
.responsive {
width: 49.99999%;
margin: 6px 0;
}
}
@media only screen and (max-width: 500px){
.responsive {
width: 100%;
}
}
.clearfix:after {
content: "";
display: table;
clear: both;
}
.glr:focus {
/*image.width=150;*/
}
.glr:hover {
box-shadow: 0 0 2px 1px rgba(0, 140, 186, 0.5);
transform: scale(2);
height: auto;
}
.glr {
transition: transform .25s ease;
}
each file in fileObjs
if(file.extension === '.jpg')
.responsive
.gallery
a(target='_blank', href='/articles/view/'+article.filePath+'/'+file.filen)
img.glr(src=file.ico, width='280px', height='300px')
.desc
if (user.canDelete.files)
a.btn.btn-danger.delete-articleFile(href='#',data-path=file.filen,data-id=article._id, data-wid=workId)
.glyphicon.glyphicon-trash
//a.btn.btn-danger.btn-xs.delete-file(href='#',file-name=file.filen,file-path=+article.filePath+'/'+file.filen,id='delete') Törlés
.glyphicon.glyphicon-trash
.clearfix
div(style='padding:6px;')
br
script(src='https://code.jquery.com/jquery-1.10.2.js')
script(src='/js/upload.js')
script(src='/js/main.js')
script(src='/js/removeFile.js')
//script(src='/socket.io/socket.io.js')
//script.
$('.upload-btn').on('click', function (){
$('.progress-bar').text('0%');
$('.progress-bar').width('0%');
$(".progress-bar").fadeIn('fast');
});
var socket = io.connect('localhost:80');
socket.on('connect', function(data) {
socket.emit('join', 'Hello World from client');
socket.on('messages', function(data) {
console.log(data);
$('.progress-bar').text(data + '%');
$('.progress-bar').width(data + '%');
if(data === 100 ){ // do whatever want to do after 100% complete
var hideProg = setTimeout(function() {
$(".progress-bar").fadeOut('slow');
}, 2000);
}
});
});