Skip to content

Commit

Permalink
change watermark to also show for students in case the report is not …
Browse files Browse the repository at this point in the history
…qr code signed
  • Loading branch information
anderson-mj committed Jan 14, 2025
1 parent 8423146 commit 27751de
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
6 changes: 3 additions & 3 deletions app/helpers/pdf_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -345,15 +345,15 @@ def new_document(name, title, options = {}, &block)
pdf.create_stamp("watermark") do
pdf.rotate(60, origin: [0, 0]) do
pdf.fill_color "993333"
pdf.font("FreeMono", size: 22) do
pdf.font("FreeMono", size: 25) do
pdf.draw_text(
I18n.t("pdf_content.professor_watermark"), at: [0, 0]
I18n.t("pdf_content.watermark"), at: [0, 0]
)
end
pdf.fill_color "000000"
end
end
pdf.repeat(:all, dynamic: true) do
pdf.repeat(:all) do
pdf.stamp_at "watermark", [80, 0]
end
end
Expand Down
1 change: 0 additions & 1 deletion app/models/ability.rb
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,6 @@ def initialize_student_pages(user, roles)
enrollment.dismissal&.dismissal_reason&.thesis_judgement === DismissalReason::APPROVED
end
can :grades_report_pdf, Enrollment, student_id: user.student.id
can :generate_report_without_watermark, Enrollment, student_id: user.student.id
else
cannot [:show, :enroll, :save_enroll], :student_enrollment
end
Expand Down
2 changes: 1 addition & 1 deletion config/locales/pt-BR.yml
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ pt-BR:
justification_grade_not_count_in_gpr: " Justificativa "

pdf_content:
professor_watermark: "DOCUMENTO VÁLIDO APENAS PARA USO INTERNO E PESSOAL DO PROFESSOR"
watermark: "DOCUMENTO PARA USO INTERNO E SEM VALOR OFICIAL"

rescue_blank_text: "Não informado"

Expand Down

0 comments on commit 27751de

Please sign in to comment.