mirror of
https://github.com/rickbarrette/redmine_qbo_labels.git
synced 2026-11-18 01:50:36 -05:00
New plugin: print part labels on a Brother QL printer
Print label in the top-right actions of issues, estimates and invoices prints the customer's last name and the PO number (W/E/I + number) in big bold letters on a 62mm continuous roll, with a preview of the label and its status until it's printed. A print agent on the printer's network (redmine_qbo_label_agent) asks Redmine for labels every couple of seconds with its printer's token, so labels print from anywhere. Administration » Label printers: printers, agent tokens and status, recent labels. Settings: label lengths, capitals, poll interval, how long a label waits for an offline agent, and logging the agents' requests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
commit
3e29f14f76
41 files changed
+2194
No files matched your search
@@ -0,0 +1,102 @@
|
||||
/* Print label dialog (redmine_qbo_labels) */
|
||||
|
||||
/* The label font, also used by the print agent (DejaVu Sans Bold, Latin subset; see assets/fonts/LICENSE) */
|
||||
@font-face {
|
||||
font-family: 'QboLabel';
|
||||
src: url('../fonts/qbo-label-bold.ttf') format('truetype');
|
||||
font-weight: 700;
|
||||
font-style: normal;
|
||||
font-display: swap;
|
||||
}
|
||||
|
||||
#qbo-label-dialog .qbo-label-preview-wrap {
|
||||
margin: 0 0 1em;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
/* The label as it comes off the roll, scaled to the dialog */
|
||||
#qbo-label-dialog canvas.qbo-label-preview {
|
||||
display: block;
|
||||
margin: 0 auto;
|
||||
max-width: 100%;
|
||||
max-height: 160px;
|
||||
width: auto;
|
||||
height: auto;
|
||||
background: #fff;
|
||||
border: 1px solid #ccc;
|
||||
border-radius: 6px;
|
||||
box-shadow: 0 1px 3px rgba(0, 0, 0, .15);
|
||||
}
|
||||
|
||||
#qbo-label-dialog .qbo-label-size {
|
||||
margin-top: .3em;
|
||||
color: #888;
|
||||
font-size: .9em;
|
||||
}
|
||||
|
||||
#qbo-label-dialog .tabular p {
|
||||
padding-left: 130px;
|
||||
}
|
||||
|
||||
#qbo-label-dialog .tabular label {
|
||||
width: 120px;
|
||||
margin-left: -130px;
|
||||
}
|
||||
|
||||
#qbo-label-dialog input.qbo-label-line {
|
||||
width: 95%;
|
||||
font-weight: bold;
|
||||
font-size: 1.1em;
|
||||
}
|
||||
|
||||
#qbo-label-dialog input.qbo-label-copies {
|
||||
width: 5em;
|
||||
}
|
||||
|
||||
#qbo-label-dialog .qbo-label-warning,
|
||||
#qbo-label-dialog .qbo-label-status[data-state="failed"] .qbo-label-status-text {
|
||||
color: #c22;
|
||||
}
|
||||
|
||||
#qbo-label-dialog .qbo-label-status-text {
|
||||
font-size: 1.2em;
|
||||
text-align: center;
|
||||
padding: .5em 0;
|
||||
}
|
||||
|
||||
#qbo-label-dialog .qbo-label-status[data-state="printed"] .qbo-label-status-text {
|
||||
color: #1a7f37;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
#qbo-label-dialog .qbo-label-status[data-state="working"] .qbo-label-status-text::before {
|
||||
content: '';
|
||||
display: inline-block;
|
||||
width: .8em;
|
||||
height: .8em;
|
||||
margin-right: .5em;
|
||||
border: 2px solid currentColor;
|
||||
border-right-color: transparent;
|
||||
border-radius: 50%;
|
||||
vertical-align: -1px;
|
||||
animation: qbo-label-spin .8s linear infinite;
|
||||
}
|
||||
|
||||
@keyframes qbo-label-spin {
|
||||
to { transform: rotate(360deg); }
|
||||
}
|
||||
|
||||
/* Administration » Label printers */
|
||||
table.label-printers .status-online { color: #1a7f37; font-weight: bold; }
|
||||
table.label-printers .status-offline { color: #c22; }
|
||||
table.label-printers .qbo-label-muted { color: #888; font-style: italic; }
|
||||
table.label-jobs td.lines { font-weight: bold; white-space: nowrap; }
|
||||
table.label-jobs td.status-failed,
|
||||
table.label-jobs td.status-expired { color: #c22; }
|
||||
table.label-jobs td.status-printed { color: #1a7f37; }
|
||||
pre.qbo-label-token { white-space: pre-wrap; word-break: break-all; }
|
||||
|
||||
@media screen and (max-width: 899px) {
|
||||
#qbo-label-dialog .tabular p { padding-left: 0; }
|
||||
#qbo-label-dialog .tabular label { width: auto; margin-left: 0; display: block; text-align: left; float: none; }
|
||||
}
|
||||
Reference in new issue
Block a user