Nice to meet you, my name is Irifune and I go to a programming school. This article is used for my own output by writing a record of the development of personal apps, which is a school task. If anyone has read it, I would be grateful if you could give us feedback.
We will develop a "paid leave management tool". For specifications, see Past Articles.
The app will be deployed, but it is not provided as a service. Please understand that this is just a part of self-study. Then go to the main subject.
This time, I would like to add a link from the Ministry of Health, Labor and Welfare and a PDF link to the paid leave notification. It's a bonus, isn't it? Actually, follow the procedure below.
--Implemented a link from the Ministry of Health, Labor and Welfare --Implemented to open in new tab --Google drive sharing settings --Implemented a link for paid leave notification
Install it on the button of the related site at the bottom left of the page. This is very easy because you just enter the URL in link_to.
haml:branches/_side.html.haml
~ Omitted ~
.links
= link_to '#' do
Paid leave notification
= link_to "https://www.mhlw.go.jp/shingi/2004/04/s0428-7b2a.html", class: "link" do
Related Sites
When you actually click the link, you will be taken from the currently open paid leave management tool page to the Ministry of Health, Labor and Welfare page. Now that you have to press the back button each time, make sure the link is displayed in a new tab.
haml:branches/_side.html.haml
~ Omitted ~
.links
= link_to '#' do
Paid leave notification
= link_to "https://www.mhlw.go.jp/shingi/2004/04/s0428-7b2a.html", target: :_blank, class: "link" do
Related Sites
I added the "target :: _ blank" part. You can now open it in a new tab.
Next, implement the link for the PDF document "Annual paid leave notification". I think that many companies manage their paid leave applications on a paper basis, so if you have a sample paid leave management tool, you can immediately print it out and give it to your employees. This time, I will get the link using the sharing setting of google drive. First, save the PDF file in your drive. You can save it by dragging and dropping. Then right-click on the file you want to share and press "Share". There is a link at the bottom of the menu that appears, so click "Change to everyone who knows the link" and then click "Copy link". Referenced article "Share files on Google Drive"
Reflect the last obtained link in link_to of rails.
haml:branches/_side.html.haml
~ Omitted ~
.links
= link_to "https://drive.google.com/file/d/1NXmC35ZbmCOAqu7oGyCOc2LqipHDGDJj/view?usp=sharing", target: :_blank, class: "link" do
Paid leave notification
= link_to "https://www.mhlw.go.jp/shingi/2004/04/s0428-7b2a.html", target: :_blank, class: "link" do
Related Sites
This method is easy, but since the account name and email address will be displayed in the opened link, if you want to implement it properly as a service, prepare a dedicated google account or another method may be better I don't know.
The personal presentation is approaching. It has become quite a form in the sense that paid holidays are given and digested manually, but since important grant calculations etc. are omitted, I will continue to make applications after May 19th. ..
Recommended Posts