{"action":"created","issue":{"url":"https://api.github.com/repos/pkp/pkp-lib/issues/1428","repository_url":"https://api.github.com/repos/pkp/pkp-lib","labels_url":"https://api.github.com/repos/pkp/pkp-lib/issues/1428/labels{/name}","comments_url":"https://api.github.com/repos/pkp/pkp-lib/issues/1428/comments","events_url":"https://api.github.com/repos/pkp/pkp-lib/issues/1428/events","html_url":"https://github.com/pkp/pkp-lib/issues/1428","id":153210129,"number":1428,"title":"Handle frontend display of chapter files better","user":{"login":"NateWr","id":2306629,"avatar_url":"https://avatars.githubusercontent.com/u/2306629?v=3","gravatar_id":"","url":"https://api.github.com/users/NateWr","html_url":"https://github.com/NateWr","followers_url":"https://api.github.com/users/NateWr/followers","following_url":"https://api.github.com/users/NateWr/following{/other_user}","gists_url":"https://api.github.com/users/NateWr/gists{/gist_id}","starred_url":"https://api.github.com/users/NateWr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NateWr/subscriptions","organizations_url":"https://api.github.com/users/NateWr/orgs","repos_url":"https://api.github.com/users/NateWr/repos","events_url":"https://api.github.com/users/NateWr/events{/privacy}","received_events_url":"https://api.github.com/users/NateWr/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/pkp/pkp-lib/labels/Open%20Monograph%20Press","name":"Open Monograph Press","color":"a2c6dc"}],"state":"open","locked":false,"assignee":{"login":"NateWr","id":2306629,"avatar_url":"https://avatars.githubusercontent.com/u/2306629?v=3","gravatar_id":"","url":"https://api.github.com/users/NateWr","html_url":"https://github.com/NateWr","followers_url":"https://api.github.com/users/NateWr/followers","following_url":"https://api.github.com/users/NateWr/following{/other_user}","gists_url":"https://api.github.com/users/NateWr/gists{/gist_id}","starred_url":"https://api.github.com/users/NateWr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NateWr/subscriptions","organizations_url":"https://api.github.com/users/NateWr/orgs","repos_url":"https://api.github.com/users/NateWr/repos","events_url":"https://api.github.com/users/NateWr/events{/privacy}","received_events_url":"https://api.github.com/users/NateWr/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/pkp/pkp-lib/milestones/17","html_url":"https://github.com/pkp/pkp-lib/milestones/OMP%201.2.1","labels_url":"https://api.github.com/repos/pkp/pkp-lib/milestones/17/labels","id":1453248,"number":17,"title":"OMP 1.2.1","description":"","creator":{"login":"asmecher","id":200411,"avatar_url":"https://avatars.githubusercontent.com/u/200411?v=3","gravatar_id":"","url":"https://api.github.com/users/asmecher","html_url":"https://github.com/asmecher","followers_url":"https://api.github.com/users/asmecher/followers","following_url":"https://api.github.com/users/asmecher/following{/other_user}","gists_url":"https://api.github.com/users/asmecher/gists{/gist_id}","starred_url":"https://api.github.com/users/asmecher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/asmecher/subscriptions","organizations_url":"https://api.github.com/users/asmecher/orgs","repos_url":"https://api.github.com/users/asmecher/repos","events_url":"https://api.github.com/users/asmecher/events{/privacy}","received_events_url":"https://api.github.com/users/asmecher/received_events","type":"User","site_admin":false},"open_issues":18,"closed_issues":3,"state":"open","created_at":"2015-12-10T06:48:25Z","updated_at":"2016-05-05T10:59:32Z","due_on":null,"closed_at":null},"comments":4,"created_at":"2016-05-05T10:59:32Z","updated_at":"2016-05-06T11:19:45Z","closed_at":null,"body":"Monographs with chapter file associations should display those files alongside the chapter. Also, long author lists should be displayed better."},"comment":{"url":"https://api.github.com/repos/pkp/pkp-lib/issues/comments/217414364","html_url":"https://github.com/pkp/pkp-lib/issues/1428#issuecomment-217414364","issue_url":"https://api.github.com/repos/pkp/pkp-lib/issues/1428","id":217414364,"user":{"login":"NateWr","id":2306629,"avatar_url":"https://avatars.githubusercontent.com/u/2306629?v=3","gravatar_id":"","url":"https://api.github.com/users/NateWr","html_url":"https://github.com/NateWr","followers_url":"https://api.github.com/users/NateWr/followers","following_url":"https://api.github.com/users/NateWr/following{/other_user}","gists_url":"https://api.github.com/users/NateWr/gists{/gist_id}","starred_url":"https://api.github.com/users/NateWr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NateWr/subscriptions","organizations_url":"https://api.github.com/users/NateWr/orgs","repos_url":"https://api.github.com/users/NateWr/repos","events_url":"https://api.github.com/users/NateWr/events{/privacy}","received_events_url":"https://api.github.com/users/NateWr/received_events","type":"User","site_admin":false},"created_at":"2016-05-06T11:19:45Z","updated_at":"2016-05-06T11:19:45Z","body":"pkp-lib https://github.com/pkp/pkp-lib/pull/1429\r\nomp https://github.com/pkp/omp/pull/283\r\n\r\n@alec I issued PRs to `master`. Should I issue them to any other branch?\r\n\r\nI decided to deliver a flat array of files and then write a smarty helper function that would pluck files from the list by various parameters. Although it ends up in some repetitive looping, I think it makes the template logic much more readable and provides some flexibility for people who want to quickly get an array of specific kinds of files.\r\n\r\nI think we'll still find not ideal displays for some edge cases, particularly because we don't really know much about the left-over files. But the `{pluck_files}` function should make it easier to account for this in individual setups.\r\n\r\nI also went ahead and [stripped out any publication formats that aren't available](https://github.com/pkp/omp/pull/283/files#diff-dd34e6dd3b56022d453df4351dced9dfR72). The existing code limited them by approval setting, but not availability.\r\n\r\nI'm also curious about why the `$availableFiles` smarty variable is only being assigned from within a conditional which seems related to eCommerce:\r\n\r\nhttps://github.com/pkp/omp/blob/master/pages/catalog/CatalogBookHandler.inc.php#L100-L122\r\n\r\nJust thought I'd check to see if that made sense to you?"}}