Design and implement module management system basic functions define yourself (18--design Module accessories [1])

Source: Internet
Author: User

Design Module Accessories (1)

Video Commentary watch online: Video commentary link http://i.youku.com/jfok1972


"Attachment" as a supplement to the module's record data is also a very important part, for example, for the "province" module, we can place some maps. For the "Sales Contract" module, you can upload the electronic documents of the contract body, as well as scanned parts.

For "customer" to upload their business license. Qualification type of picture and so on.

Attachment The entire management process has been completed, now only two steps to do is to add the "attachment" to the module tag. Then set the permissions again.

go to Module management, select the province, and then change.

Watermark/2/text/ahr0cdovl2jsb2cuy3nkbi5uzxqvamzvaw==/font/5a6l5l2t/fontsize/400/fill/i0jbqkfcma==/dissolve/70 /gravity/center ">

after saving, you need to add permissions to the user role in the permissions design to manipulate attachments.

(each module with an attachment will have more attachments to browse, add, change.) Deleted 4 permission settings)




then refresh the page.

Then enter the "provinces" module.




let's start by adding a picture attachment to see the effect. Select a record first. Then select "Add Attachments" in the menu.



The attachment name is entered, and the attachment type and file type are selected. Then select the attachment file you want to upload. Press upload to do it. "01" will be displayed in the annex to the "province" module, which is currently selected as an attachment. Indicates that there is an attachment.



Click the 01 link. will be out of the admin interface of the attachment.



the handling of various documents in the annex:
1. picture file: compress it to 128*128 to save to the thumbnail field, then compress the image according to the compression option when uploading the file to save the data field;
2.xls,doc files: Because Web pages cannot directly preview such files, convert the Xls,doc file to a PDF file, save it in a PDF preview field, and then save the uploaded file to the data field.
3. Other files: Save directly into the data field.

for files that can be previewed. There is a place to set the name of the suffix that can be previewed specifically. Pdf,swf,txt,htm,html,xml,sql,doc,xls is temporarily set, and the file names of these suffixes can be previewed directly in the Web page.

I'll upload some more files to see the effect.


Watermark/2/text/ahr0cdovl2jsb2cuy3nkbi5uzxqvamzvaw==/font/5a6l5l2t/fontsize/400/fill/i0jbqkfcma==/dissolve/70 /gravity/center ">


Interface for attachment operation:



The
above is a module that defines the "have attachments" after the operation.

I thought I had enough of this accessory design, and I didn't expect to be forced by a client to do a more complicated attachment function. Introduction to the following section.





Copyright notice: This article blog original articles, blogs, without consent, may not be reproduced.

Design and implement module management system basic functions define yourself (18--design Module accessories [1])

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.