{"action":"created","comment":{"url":"https://api.github.com/repos/driebit/ginger/pulls/comments/166942730","pull_request_review_id":95082638,"id":166942730,"diff_hunk":"@@ -0,0 +1,29 @@\n+%% @doc A date filter for ISO 8601 datetimes (instead of datetime tuples).\n+%%      If a year is passed <<\"2017\">>, that year is printed. Other inputs are\n+%%      converted to a datetime tuple set and passed to Zotonic's date filter.\n+-module(filter_collection_query_pager).\n+\n+-export([\n+    collection_query_pager/5\n+]).\n+\n+-include_lib(\"zotonic.hrl\").\n+\n+collection_query_pager(Search, Index, QueryId, \"1\", Context) ->\n+    Search2 = z_convert:to_atom(Search),\n+    Result = z_search:search({Search2, [{query_id, QueryId},{index, Index}]},{1,2},Context),\n+    Ids = Result#search_result.result,\n+    Prev = undefined,\n+    Next = lists:last(Ids),\n+    [Prev, Next];","path":"modules/mod_ginger_collection/filters/filter_collection_query_pager.erl","position":18,"original_position":18,"commit_id":"6c75896bb694775542b06437aa08da18486a6010","original_commit_id":"6c75896bb694775542b06437aa08da18486a6010","user":{"login":"ddeboer","id":89267,"avatar_url":"https://avatars1.githubusercontent.com/u/89267?v=4","gravatar_id":"","url":"https://api.github.com/users/ddeboer","html_url":"https://github.com/ddeboer","followers_url":"https://api.github.com/users/ddeboer/followers","following_url":"https://api.github.com/users/ddeboer/following{/other_user}","gists_url":"https://api.github.com/users/ddeboer/gists{/gist_id}","starred_url":"https://api.github.com/users/ddeboer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ddeboer/subscriptions","organizations_url":"https://api.github.com/users/ddeboer/orgs","repos_url":"https://api.github.com/users/ddeboer/repos","events_url":"https://api.github.com/users/ddeboer/events{/privacy}","received_events_url":"https://api.github.com/users/ddeboer/received_events","type":"User","site_admin":false},"body":"Writing this in fewer lines of code is clearer to me:\r\n\r\n```erlang\r\n#search_result{result = Ids} = z_search:search({Search2, [{query_id, QueryId}, {index, Index}]}, {1, 2}, Context),\r\n[undefined, lists:last(Ids)].\r\n```","created_at":"2018-02-08T14:07:00Z","updated_at":"2018-02-08T14:11:37Z","html_url":"https://github.com/driebit/ginger/pull/361#discussion_r166942730","pull_request_url":"https://api.github.com/repos/driebit/ginger/pulls/361","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/driebit/ginger/pulls/comments/166942730"},"html":{"href":"https://github.com/driebit/ginger/pull/361#discussion_r166942730"},"pull_request":{"href":"https://api.github.com/repos/driebit/ginger/pulls/361"}}},"pull_request":{"url":"https://api.github.com/repos/driebit/ginger/pulls/361","id":167978759,"html_url":"https://github.com/driebit/ginger/pull/361","diff_url":"https://github.com/driebit/ginger/pull/361.diff","patch_url":"https://github.com/driebit/ginger/pull/361.patch","issue_url":"https://api.github.com/repos/driebit/ginger/issues/361","number":361,"state":"open","locked":false,"title":"[collection] ZZC-57 Added collection navigation","user":{"login":"loetie","id":5628172,"avatar_url":"https://avatars1.githubusercontent.com/u/5628172?v=4","gravatar_id":"","url":"https://api.github.com/users/loetie","html_url":"https://github.com/loetie","followers_url":"https://api.github.com/users/loetie/followers","following_url":"https://api.github.com/users/loetie/following{/other_user}","gists_url":"https://api.github.com/users/loetie/gists{/gist_id}","starred_url":"https://api.github.com/users/loetie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/loetie/subscriptions","organizations_url":"https://api.github.com/users/loetie/orgs","repos_url":"https://api.github.com/users/loetie/repos","events_url":"https://api.github.com/users/loetie/events{/privacy}","received_events_url":"https://api.github.com/users/loetie/received_events","type":"User","site_admin":false},"body":"Added collection navigation. Part of https://gitlab.driebit.nl/driebit/zuiderzeecollectie/merge_requests/10","created_at":"2018-02-08T13:58:14Z","updated_at":"2018-02-08T14:11:37Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7f9b55f30d3b969fe75fade0a73344d5a55c9a68","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"milestone":null,"commits_url":"https://api.github.com/repos/driebit/ginger/pulls/361/commits","review_comments_url":"https://api.github.com/repos/driebit/ginger/pulls/361/comments","review_comment_url":"https://api.github.com/repos/driebit/ginger/pulls/comments{/number}","comments_url":"https://api.github.com/repos/driebit/ginger/issues/361/comments","statuses_url":"https://api.github.com/repos/driebit/ginger/statuses/6c75896bb694775542b06437aa08da18486a6010","head":{"label":"driebit:ZZC-57","ref":"ZZC-57","sha":"6c75896bb694775542b06437aa08da18486a6010","user":{"login":"driebit","id":649899,"avatar_url":"https://avatars1.githubusercontent.com/u/649899?v=4","gravatar_id":"","url":"https://api.github.com/users/driebit","html_url":"https://github.com/driebit","followers_url":"https://api.github.com/users/driebit/followers","following_url":"https://api.github.com/users/driebit/following{/other_user}","gists_url":"https://api.github.com/users/driebit/gists{/gist_id}","starred_url":"https://api.github.com/users/driebit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/driebit/subscriptions","organizations_url":"https://api.github.com/users/driebit/orgs","repos_url":"https://api.github.com/users/driebit/repos","events_url":"https://api.github.com/users/driebit/events{/privacy}","received_events_url":"https://api.github.com/users/driebit/received_events","type":"Organization","site_admin":false},"repo":{"id":59114967,"name":"ginger","full_name":"driebit/ginger","owner":{"login":"driebit","id":649899,"avatar_url":"https://avatars1.githubusercontent.com/u/649899?v=4","gravatar_id":"","url":"https://api.github.com/users/driebit","html_url":"https://github.com/driebit","followers_url":"https://api.github.com/users/driebit/followers","following_url":"https://api.github.com/users/driebit/following{/other_user}","gists_url":"https://api.github.com/users/driebit/gists{/gist_id}","starred_url":"https://api.github.com/users/driebit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/driebit/subscriptions","organizations_url":"https://api.github.com/users/driebit/orgs","repos_url":"https://api.github.com/users/driebit/repos","events_url":"https://api.github.com/users/driebit/events{/privacy}","received_events_url":"https://api.github.com/users/driebit/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/driebit/ginger","description":"Ginger: awesome semantic CMS built on Zotonic","fork":false,"url":"https://api.github.com/repos/driebit/ginger","forks_url":"https://api.github.com/repos/driebit/ginger/forks","keys_url":"https://api.github.com/repos/driebit/ginger/keys{/key_id}","collaborators_url":"https://api.github.com/repos/driebit/ginger/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/driebit/ginger/teams","hooks_url":"https://api.github.com/repos/driebit/ginger/hooks","issue_events_url":"https://api.github.com/repos/driebit/ginger/issues/events{/number}","events_url":"https://api.github.com/repos/driebit/ginger/events","assignees_url":"https://api.github.com/repos/driebit/ginger/assignees{/user}","branches_url":"https://api.github.com/repos/driebit/ginger/branches{/branch}","tags_url":"https://api.github.com/repos/driebit/ginger/tags","blobs_url":"https://api.github.com/repos/driebit/ginger/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/driebit/ginger/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/driebit/ginger/git/refs{/sha}","trees_url":"https://api.github.com/repos/driebit/ginger/git/trees{/sha}","statuses_url":"https://api.github.com/repos/driebit/ginger/statuses/{sha}","languages_url":"https://api.github.com/repos/driebit/ginger/languages","stargazers_url":"https://api.github.com/repos/driebit/ginger/stargazers","contributors_url":"https://api.github.com/repos/driebit/ginger/contributors","subscribers_url":"https://api.github.com/repos/driebit/ginger/subscribers","subscription_url":"https://api.github.com/repos/driebit/ginger/subscription","commits_url":"https://api.github.com/repos/driebit/ginger/commits{/sha}","git_commits_url":"https://api.github.com/repos/driebit/ginger/git/commits{/sha}","comments_url":"https://api.github.com/repos/driebit/ginger/comments{/number}","issue_comment_url":"https://api.github.com/repos/driebit/ginger/issues/comments{/number}","contents_url":"https://api.github.com/repos/driebit/ginger/contents/{+path}","compare_url":"https://api.github.com/repos/driebit/ginger/compare/{base}...{head}","merges_url":"https://api.github.com/repos/driebit/ginger/merges","archive_url":"https://api.github.com/repos/driebit/ginger/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/driebit/ginger/downloads","issues_url":"https://api.github.com/repos/driebit/ginger/issues{/number}","pulls_url":"https://api.github.com/repos/driebit/ginger/pulls{/number}","milestones_url":"https://api.github.com/repos/driebit/ginger/milestones{/number}","notifications_url":"https://api.github.com/repos/driebit/ginger/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/driebit/ginger/labels{/name}","releases_url":"https://api.github.com/repos/driebit/ginger/releases{/id}","deployments_url":"https://api.github.com/repos/driebit/ginger/deployments","created_at":"2016-05-18T12:48:46Z","updated_at":"2017-12-26T02:18:54Z","pushed_at":"2018-02-08T13:58:15Z","git_url":"git://github.com/driebit/ginger.git","ssh_url":"git@github.com:driebit/ginger.git","clone_url":"https://github.com/driebit/ginger.git","svn_url":"https://github.com/driebit/ginger","homepage":"http://ginger.nl","size":29531,"stargazers_count":13,"watchers_count":13,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"archived":false,"open_issues_count":144,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":2,"open_issues":144,"watchers":13,"default_branch":"master"}},"base":{"label":"driebit:master","ref":"master","sha":"6e7dd53160e5e980aab48abfe604ed154156e89c","user":{"login":"driebit","id":649899,"avatar_url":"https://avatars1.githubusercontent.com/u/649899?v=4","gravatar_id":"","url":"https://api.github.com/users/driebit","html_url":"https://github.com/driebit","followers_url":"https://api.github.com/users/driebit/followers","following_url":"https://api.github.com/users/driebit/following{/other_user}","gists_url":"https://api.github.com/users/driebit/gists{/gist_id}","starred_url":"https://api.github.com/users/driebit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/driebit/subscriptions","organizations_url":"https://api.github.com/users/driebit/orgs","repos_url":"https://api.github.com/users/driebit/repos","events_url":"https://api.github.com/users/driebit/events{/privacy}","received_events_url":"https://api.github.com/users/driebit/received_events","type":"Organization","site_admin":false},"repo":{"id":59114967,"name":"ginger","full_name":"driebit/ginger","owner":{"login":"driebit","id":649899,"avatar_url":"https://avatars1.githubusercontent.com/u/649899?v=4","gravatar_id":"","url":"https://api.github.com/users/driebit","html_url":"https://github.com/driebit","followers_url":"https://api.github.com/users/driebit/followers","following_url":"https://api.github.com/users/driebit/following{/other_user}","gists_url":"https://api.github.com/users/driebit/gists{/gist_id}","starred_url":"https://api.github.com/users/driebit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/driebit/subscriptions","organizations_url":"https://api.github.com/users/driebit/orgs","repos_url":"https://api.github.com/users/driebit/repos","events_url":"https://api.github.com/users/driebit/events{/privacy}","received_events_url":"https://api.github.com/users/driebit/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/driebit/ginger","description":"Ginger: awesome semantic CMS built on Zotonic","fork":false,"url":"https://api.github.com/repos/driebit/ginger","forks_url":"https://api.github.com/repos/driebit/ginger/forks","keys_url":"https://api.github.com/repos/driebit/ginger/keys{/key_id}","collaborators_url":"https://api.github.com/repos/driebit/ginger/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/driebit/ginger/teams","hooks_url":"https://api.github.com/repos/driebit/ginger/hooks","issue_events_url":"https://api.github.com/repos/driebit/ginger/issues/events{/number}","events_url":"https://api.github.com/repos/driebit/ginger/events","assignees_url":"https://api.github.com/repos/driebit/ginger/assignees{/user}","branches_url":"https://api.github.com/repos/driebit/ginger/branches{/branch}","tags_url":"https://api.github.com/repos/driebit/ginger/tags","blobs_url":"https://api.github.com/repos/driebit/ginger/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/driebit/ginger/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/driebit/ginger/git/refs{/sha}","trees_url":"https://api.github.com/repos/driebit/ginger/git/trees{/sha}","statuses_url":"https://api.github.com/repos/driebit/ginger/statuses/{sha}","languages_url":"https://api.github.com/repos/driebit/ginger/languages","stargazers_url":"https://api.github.com/repos/driebit/ginger/stargazers","contributors_url":"https://api.github.com/repos/driebit/ginger/contributors","subscribers_url":"https://api.github.com/repos/driebit/ginger/subscribers","subscription_url":"https://api.github.com/repos/driebit/ginger/subscription","commits_url":"https://api.github.com/repos/driebit/ginger/commits{/sha}","git_commits_url":"https://api.github.com/repos/driebit/ginger/git/commits{/sha}","comments_url":"https://api.github.com/repos/driebit/ginger/comments{/number}","issue_comment_url":"https://api.github.com/repos/driebit/ginger/issues/comments{/number}","contents_url":"https://api.github.com/repos/driebit/ginger/contents/{+path}","compare_url":"https://api.github.com/repos/driebit/ginger/compare/{base}...{head}","merges_url":"https://api.github.com/repos/driebit/ginger/merges","archive_url":"https://api.github.com/repos/driebit/ginger/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/driebit/ginger/downloads","issues_url":"https://api.github.com/repos/driebit/ginger/issues{/number}","pulls_url":"https://api.github.com/repos/driebit/ginger/pulls{/number}","milestones_url":"https://api.github.com/repos/driebit/ginger/milestones{/number}","notifications_url":"https://api.github.com/repos/driebit/ginger/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/driebit/ginger/labels{/name}","releases_url":"https://api.github.com/repos/driebit/ginger/releases{/id}","deployments_url":"https://api.github.com/repos/driebit/ginger/deployments","created_at":"2016-05-18T12:48:46Z","updated_at":"2017-12-26T02:18:54Z","pushed_at":"2018-02-08T13:58:15Z","git_url":"git://github.com/driebit/ginger.git","ssh_url":"git@github.com:driebit/ginger.git","clone_url":"https://github.com/driebit/ginger.git","svn_url":"https://github.com/driebit/ginger","homepage":"http://ginger.nl","size":29531,"stargazers_count":13,"watchers_count":13,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"archived":false,"open_issues_count":144,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":2,"open_issues":144,"watchers":13,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/driebit/ginger/pulls/361"},"html":{"href":"https://github.com/driebit/ginger/pull/361"},"issue":{"href":"https://api.github.com/repos/driebit/ginger/issues/361"},"comments":{"href":"https://api.github.com/repos/driebit/ginger/issues/361/comments"},"review_comments":{"href":"https://api.github.com/repos/driebit/ginger/pulls/361/comments"},"review_comment":{"href":"https://api.github.com/repos/driebit/ginger/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/driebit/ginger/pulls/361/commits"},"statuses":{"href":"https://api.github.com/repos/driebit/ginger/statuses/6c75896bb694775542b06437aa08da18486a6010"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"ddeboer"}}