BCcampus / pressbooks

Pressbooks – the CMS for books
https://pressbooks.org/
GNU General Public License v3.0
0 stars 0 forks source link

Add custom fields to media manager #1

Closed alex-418 closed 6 years ago

alex-418 commented 6 years ago

Clearly labeled, with description text letting them know where it will show up.

Using attachment_fields_to_edit Following TASL

  1. Title - TEXT
  2. Title Source - URL
  3. Author - TEXT
  4. Author Source - URL
  5. License - Selectbox (Content: https://github.com/pressbooks/pressbooks/blob/dev/inc/class-licensing.php#L39)

These fields would go after the author fields and before the licence drow-down menu.

  1. Adapted by: TEXT

  2. Adapted by: URL

  3. Figure: TEXT

bdolor commented 6 years ago

As a first pass, the base TASL (Title, Author, Source, License) has been added to the media manager:

image

@josieg - to validate, go to Dashboard, edit any chapter, then click 'Add Media' — the fields will be on the right hand side. Once you enter values and select 'Insert into Post' the data should remain there then next time you visit the media manager by either the menu item on the left side or 'Add Media' button again.

josiegray commented 6 years ago

I found one problem:

I upload an image, add all of the attribution information, and insert it into a chapter. When I go back to the media manager, the licence is no longer selected, but the Title, Author, and Source content is still there.

Also, the dropdown menu for the Licence field seems to extend off of the screen so it just looks like a textbox.

attributions box
bdolor commented 6 years ago

excellent, thank you @josiegray - I noticed this just now as well. Please send back to the 'doing' column and once it's fixed I'll send it back to the 'validating' column.

bdolor commented 6 years ago

fixed via https://github.com/BCcampus/pressbooks/commit/0fb6a09d6f4036ccd42b3c2f2f67d3dffa7daf37

josieg commented 6 years ago

Will you be adding the other fields to the media manager in this sprint? (Author source (URL), adapted by (Text) + source (URL), and figure (Text)?