i'm trying to make vacancies plugin for my website (corporate website where users can submit their job offer application).
What i am trying to achieve:
- User goes to specified page
- User uploads file with regard to the provided guidelines
- Script saves file in the specified folder and gets name of the file as the name of the applicant
- Script adds information to database (id, applicant_name, file_path, created_on, updated_on)
- Admin can view application in the backend
I've managed to achieve first 4 goals, however i have no idea on how to allow administrator to get the link to the file from the backend.
I'm using models to store information in the database. On the backend i can see when the file is uploaded and what is the name of the applicant. However, what im trying to do is when administrator clicks on the item in the list (model default update page), he should be prompted with the link to download file.
Here are few screenshots:
Here administrator should be able to get the link to download file (maybe, later i will do integration with Office Online Document Viewer)
Database view after file has been submitted
Anyone have an idea on how to provide such functionality to the administrator?
Maybe, to simplify question even more, i will put it this way: How can i get Model object in the update.htm in the controller file, so i can access all of the fields of the model from this file. Right now it uses
$this->renderForm();