GitHub PullRequestReviewCommentEvent at 2014-12-12 16:28:39
Repository: spotlight
Actor: cbeer
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/sul-dlss/spotlight/pulls/comments/21754851","id":21754851,"diff_hunk":"@@ -57,18 +57,62 @@\n         <%= f.radio_button :default_per_page, key, label: key.to_s %>\n       <% end %>\n     <% end %>\n+  <% end %>\n+  <h3><%= t(:'.sort_fields.heading')%></h3>\n+  <%= field_set_tag do %>\n+    <p class=\"instructions\"><%= t(:'.sort_fields.help') %></p>\n \n-    <%= f.form_group :sort_fields, label: {text: t(:'.sort_fields')} do %>\n-      <%= f.fields_for :sort_fields, @appearance.sort_fields do |vt| %>\n-        <%= vt.check_box :relevance, {  checked: true, disabled: true, data: { readonly: true }} %>\n-        <% @appearance.sort_options.each do |k| %>\n-          <%= vt.check_box k %>\n-        <% end %>\n-      <% end %>\n+    <%= f.fields_for :sort_fields, @appearance.sort_fields do |vt| %>\n+      <ol class=\"dd-list col-md-7 disabled-sort-option sort_fields_admin\">\n+        <li>\n+          <div class=\"panel panel-default\">\n+            <div class=\"panel-content\">\n+              <div class=\"panel-heading\">\n+                <h3 class=\"panel-title\">\n+                  <%= vt.fields_for :relevance, @appearance.sort_fields[:relevance] do |sort| %>\n+                    <%= sort.check_box_without_bootstrap :enable, { checked: true, disabled: true, data: { readonly: true } } %>\n+                    <%= sort.hidden_field :enabled, value: '1', data: { readonly: true } %>\n+                    <%= sort.hidden_field :label, {value: @appearance.sort_fields[:relevance][:label], readonly: true } %>\n+                    <%= sort.hidden_field :weight, {value: \"-1\", readonly: true } %>\n+                    <%= @appearance.sort_fields[:relevance][:label] %>\n+                  <% end %>\n+                </h3>\n+                (<%= translate_sort_fields(@appearance.configuration.blacklight_config.sort_fields[\"relevance\"].sort) %>)","path":"app/views/spotlight/appearances/edit.html.erb","position":48,"original_position":48,"commit_id":"69f62ba08275fc23b507292f78fb97e38be3af38","original_commit_id":"69f62ba08275fc23b507292f78fb97e38be3af38","user":{"login":"cbeer","id":111218,"avatar_url":"https://avatars.githubusercontent.com/u/111218?v=3","gravatar_id":"","url":"https://api.github.com/users/cbeer","html_url":"https://github.com/cbeer","followers_url":"https://api.github.com/users/cbeer/followers","following_url":"https://api.github.com/users/cbeer/following{/other_user}","gists_url":"https://api.github.com/users/cbeer/gists{/gist_id}","starred_url":"https://api.github.com/users/cbeer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cbeer/subscriptions","organizations_url":"https://api.github.com/users/cbeer/orgs","repos_url":"https://api.github.com/users/cbeer/repos","events_url":"https://api.github.com/users/cbeer/events{/privacy}","received_events_url":"https://api.github.com/users/cbeer/received_events","type":"User","site_admin":false},"body":"Instead of hard-coding the relevance field, what do you think about using the `default_sort_field` instead? ","created_at":"2014-12-12T16:28:39Z","updated_at":"2014-12-12T16:28:39Z","html_url":"https://github.com/sul-dlss/spotlight/pull/817#discussion_r21754851","pull_request_url":"https://api.github.com/repos/sul-dlss/spotlight/pulls/817","_links":{"self":{"href":"https://api.github.com/repos/sul-dlss/spotlight/pulls/comments/21754851"},"html":{"href":"https://github.com/sul-dlss/spotlight/pull/817#discussion_r21754851"},"pull_request":{"href":"https://api.github.com/repos/sul-dlss/spotlight/pulls/817"}}},"pull_request":{"url":"https://api.github.com/repos/sul-dlss/spotlight/pulls/817","id":25956893,"html_url":"https://github.com/sul-dlss/spotlight/pull/817","diff_url":"https://github.com/sul-dlss/spotlight/pull/817.diff","patch_url":"https://github.com/sul-dlss/spotlight/pull/817.patch","issue_url":"https://api.github.com/repos/sul-dlss/spotlight/issues/817","number":817,"state":"open","locked":false,"title":"Allow sort fields to be re-ordered and labels to be updated","user":{"login":"jkeck","id":96776,"avatar_url":"https://avatars.githubusercontent.com/u/96776?v=3","gravatar_id":"","url":"https://api.github.com/users/jkeck","html_url":"https://github.com/jkeck","followers_url":"https://api.github.com/users/jkeck/followers","following_url":"https://api.github.com/users/jkeck/following{/other_user}","gists_url":"https://api.github.com/users/jkeck/gists{/gist_id}","starred_url":"https://api.github.com/users/jkeck/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jkeck/subscriptions","organizations_url":"https://api.github.com/users/jkeck/orgs","repos_url":"https://api.github.com/users/jkeck/repos","events_url":"https://api.github.com/users/jkeck/events{/privacy}","received_events_url":"https://api.github.com/users/jkeck/received_events","type":"User","site_admin":false},"body":"Closes #675 \r\n\r\n![sort](https://cloud.githubusercontent.com/assets/96776/5408417/f941aaf6-818e-11e4-8e27-fffb89c3d611.gif)\r\n","created_at":"2014-12-12T07:40:53Z","updated_at":"2014-12-12T16:28:39Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e9013c986e8a1a102a934563aea1820fee3a26e6","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/sul-dlss/spotlight/pulls/817/commits","review_comments_url":"https://api.github.com/repos/sul-dlss/spotlight/pulls/817/comments","review_comment_url":"https://api.github.com/repos/sul-dlss/spotlight/pulls/comments/{number}","comments_url":"https://api.github.com/repos/sul-dlss/spotlight/issues/817/comments","statuses_url":"https://api.github.com/repos/sul-dlss/spotlight/statuses/69f62ba08275fc23b507292f78fb97e38be3af38","head":{"label":"sul-dlss:675-sort-config","ref":"675-sort-config","sha":"69f62ba08275fc23b507292f78fb97e38be3af38","user":{"login":"sul-dlss","id":230583,"avatar_url":"https://avatars.githubusercontent.com/u/230583?v=3","gravatar_id":"","url":"https://api.github.com/users/sul-dlss","html_url":"https://github.com/sul-dlss","followers_url":"https://api.github.com/users/sul-dlss/followers","following_url":"https://api.github.com/users/sul-dlss/following{/other_user}","gists_url":"https://api.github.com/users/sul-dlss/gists{/gist_id}","starred_url":"https://api.github.com/users/sul-dlss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sul-dlss/subscriptions","organizations_url":"https://api.github.com/users/sul-dlss/orgs","repos_url":"https://api.github.com/users/sul-dlss/repos","events_url":"https://api.github.com/users/sul-dlss/events{/privacy}","received_events_url":"https://api.github.com/users/sul-dlss/received_events","type":"Organization","site_admin":false},"repo":{"id":14536054,"name":"spotlight","full_name":"sul-dlss/spotlight","owner":{"login":"sul-dlss","id":230583,"avatar_url":"https://avatars.githubusercontent.com/u/230583?v=3","gravatar_id":"","url":"https://api.github.com/users/sul-dlss","html_url":"https://github.com/sul-dlss","followers_url":"https://api.github.com/users/sul-dlss/followers","following_url":"https://api.github.com/users/sul-dlss/following{/other_user}","gists_url":"https://api.github.com/users/sul-dlss/gists{/gist_id}","starred_url":"https://api.github.com/users/sul-dlss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sul-dlss/subscriptions","organizations_url":"https://api.github.com/users/sul-dlss/orgs","repos_url":"https://api.github.com/users/sul-dlss/repos","events_url":"https://api.github.com/users/sul-dlss/events{/privacy}","received_events_url":"https://api.github.com/users/sul-dlss/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/sul-dlss/spotlight","description":"Enable librarians, curators, and others who are responsible for digital collections to create   attractive, feature-rich websites that highlight these collections.","fork":false,"url":"https://api.github.com/repos/sul-dlss/spotlight","forks_url":"https://api.github.com/repos/sul-dlss/spotlight/forks","keys_url":"https://api.github.com/repos/sul-dlss/spotlight/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sul-dlss/spotlight/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sul-dlss/spotlight/teams","hooks_url":"https://api.github.com/repos/sul-dlss/spotlight/hooks","issue_events_url":"https://api.github.com/repos/sul-dlss/spotlight/issues/events{/number}","events_url":"https://api.github.com/repos/sul-dlss/spotlight/events","assignees_url":"https://api.github.com/repos/sul-dlss/spotlight/assignees{/user}","branches_url":"https://api.github.com/repos/sul-dlss/spotlight/branches{/branch}","tags_url":"https://api.github.com/repos/sul-dlss/spotlight/tags","blobs_url":"https://api.github.com/repos/sul-dlss/spotlight/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sul-dlss/spotlight/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sul-dlss/spotlight/git/refs{/sha}","trees_url":"https://api.github.com/repos/sul-dlss/spotlight/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sul-dlss/spotlight/statuses/{sha}","languages_url":"https://api.github.com/repos/sul-dlss/spotlight/languages","stargazers_url":"https://api.github.com/repos/sul-dlss/spotlight/stargazers","contributors_url":"https://api.github.com/repos/sul-dlss/spotlight/contributors","subscribers_url":"https://api.github.com/repos/sul-dlss/spotlight/subscribers","subscription_url":"https://api.github.com/repos/sul-dlss/spotlight/subscription","commits_url":"https://api.github.com/repos/sul-dlss/spotlight/commits{/sha}","git_commits_url":"https://api.github.com/repos/sul-dlss/spotlight/git/commits{/sha}","comments_url":"https://api.github.com/repos/sul-dlss/spotlight/comments{/number}","issue_comment_url":"https://api.github.com/repos/sul-dlss/spotlight/issues/comments/{number}","contents_url":"https://api.github.com/repos/sul-dlss/spotlight/contents/{+path}","compare_url":"https://api.github.com/repos/sul-dlss/spotlight/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sul-dlss/spotlight/merges","archive_url":"https://api.github.com/repos/sul-dlss/spotlight/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sul-dlss/spotlight/downloads","issues_url":"https://api.github.com/repos/sul-dlss/spotlight/issues{/number}","pulls_url":"https://api.github.com/repos/sul-dlss/spotlight/pulls{/number}","milestones_url":"https://api.github.com/repos/sul-dlss/spotlight/milestones{/number}","notifications_url":"https://api.github.com/repos/sul-dlss/spotlight/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sul-dlss/spotlight/labels{/name}","releases_url":"https://api.github.com/repos/sul-dlss/spotlight/releases{/id}","created_at":"2013-11-19T19:49:19Z","updated_at":"2014-12-12T06:05:38Z","pushed_at":"2014-12-12T07:36:37Z","git_url":"git://github.com/sul-dlss/spotlight.git","ssh_url":"git@github.com:sul-dlss/spotlight.git","clone_url":"https://github.com/sul-dlss/spotlight.git","svn_url":"https://github.com/sul-dlss/spotlight","homepage":"http://library.stanford.edu/blogs/digital-library-blog/2014/06/stanford-university-libraries-completes-first-phase-development","size":5655,"stargazers_count":35,"watchers_count":35,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":10,"mirror_url":null,"open_issues_count":79,"forks":10,"open_issues":79,"watchers":35,"default_branch":"master"}},"base":{"label":"sul-dlss:master","ref":"master","sha":"3b9df75b810ec8178f45e125818fef9b5cd49753","user":{"login":"sul-dlss","id":230583,"avatar_url":"https://avatars.githubusercontent.com/u/230583?v=3","gravatar_id":"","url":"https://api.github.com/users/sul-dlss","html_url":"https://github.com/sul-dlss","followers_url":"https://api.github.com/users/sul-dlss/followers","following_url":"https://api.github.com/users/sul-dlss/following{/other_user}","gists_url":"https://api.github.com/users/sul-dlss/gists{/gist_id}","starred_url":"https://api.github.com/users/sul-dlss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sul-dlss/subscriptions","organizations_url":"https://api.github.com/users/sul-dlss/orgs","repos_url":"https://api.github.com/users/sul-dlss/repos","events_url":"https://api.github.com/users/sul-dlss/events{/privacy}","received_events_url":"https://api.github.com/users/sul-dlss/received_events","type":"Organization","site_admin":false},"repo":{"id":14536054,"name":"spotlight","full_name":"sul-dlss/spotlight","owner":{"login":"sul-dlss","id":230583,"avatar_url":"https://avatars.githubusercontent.com/u/230583?v=3","gravatar_id":"","url":"https://api.github.com/users/sul-dlss","html_url":"https://github.com/sul-dlss","followers_url":"https://api.github.com/users/sul-dlss/followers","following_url":"https://api.github.com/users/sul-dlss/following{/other_user}","gists_url":"https://api.github.com/users/sul-dlss/gists{/gist_id}","starred_url":"https://api.github.com/users/sul-dlss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sul-dlss/subscriptions","organizations_url":"https://api.github.com/users/sul-dlss/orgs","repos_url":"https://api.github.com/users/sul-dlss/repos","events_url":"https://api.github.com/users/sul-dlss/events{/privacy}","received_events_url":"https://api.github.com/users/sul-dlss/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/sul-dlss/spotlight","description":"Enable librarians, curators, and others who are responsible for digital collections to create   attractive, feature-rich websites that highlight these collections.","fork":false,"url":"https://api.github.com/repos/sul-dlss/spotlight","forks_url":"https://api.github.com/repos/sul-dlss/spotlight/forks","keys_url":"https://api.github.com/repos/sul-dlss/spotlight/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sul-dlss/spotlight/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sul-dlss/spotlight/teams","hooks_url":"https://api.github.com/repos/sul-dlss/spotlight/hooks","issue_events_url":"https://api.github.com/repos/sul-dlss/spotlight/issues/events{/number}","events_url":"https://api.github.com/repos/sul-dlss/spotlight/events","assignees_url":"https://api.github.com/repos/sul-dlss/spotlight/assignees{/user}","branches_url":"https://api.github.com/repos/sul-dlss/spotlight/branches{/branch}","tags_url":"https://api.github.com/repos/sul-dlss/spotlight/tags","blobs_url":"https://api.github.com/repos/sul-dlss/spotlight/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sul-dlss/spotlight/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sul-dlss/spotlight/git/refs{/sha}","trees_url":"https://api.github.com/repos/sul-dlss/spotlight/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sul-dlss/spotlight/statuses/{sha}","languages_url":"https://api.github.com/repos/sul-dlss/spotlight/languages","stargazers_url":"https://api.github.com/repos/sul-dlss/spotlight/stargazers","contributors_url":"https://api.github.com/repos/sul-dlss/spotlight/contributors","subscribers_url":"https://api.github.com/repos/sul-dlss/spotlight/subscribers","subscription_url":"https://api.github.com/repos/sul-dlss/spotlight/subscription","commits_url":"https://api.github.com/repos/sul-dlss/spotlight/commits{/sha}","git_commits_url":"https://api.github.com/repos/sul-dlss/spotlight/git/commits{/sha}","comments_url":"https://api.github.com/repos/sul-dlss/spotlight/comments{/number}","issue_comment_url":"https://api.github.com/repos/sul-dlss/spotlight/issues/comments/{number}","contents_url":"https://api.github.com/repos/sul-dlss/spotlight/contents/{+path}","compare_url":"https://api.github.com/repos/sul-dlss/spotlight/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sul-dlss/spotlight/merges","archive_url":"https://api.github.com/repos/sul-dlss/spotlight/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sul-dlss/spotlight/downloads","issues_url":"https://api.github.com/repos/sul-dlss/spotlight/issues{/number}","pulls_url":"https://api.github.com/repos/sul-dlss/spotlight/pulls{/number}","milestones_url":"https://api.github.com/repos/sul-dlss/spotlight/milestones{/number}","notifications_url":"https://api.github.com/repos/sul-dlss/spotlight/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sul-dlss/spotlight/labels{/name}","releases_url":"https://api.github.com/repos/sul-dlss/spotlight/releases{/id}","created_at":"2013-11-19T19:49:19Z","updated_at":"2014-12-12T06:05:38Z","pushed_at":"2014-12-12T07:36:37Z","git_url":"git://github.com/sul-dlss/spotlight.git","ssh_url":"git@github.com:sul-dlss/spotlight.git","clone_url":"https://github.com/sul-dlss/spotlight.git","svn_url":"https://github.com/sul-dlss/spotlight","homepage":"http://library.stanford.edu/blogs/digital-library-blog/2014/06/stanford-university-libraries-completes-first-phase-development","size":5655,"stargazers_count":35,"watchers_count":35,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":10,"mirror_url":null,"open_issues_count":79,"forks":10,"open_issues":79,"watchers":35,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/sul-dlss/spotlight/pulls/817"},"html":{"href":"https://github.com/sul-dlss/spotlight/pull/817"},"issue":{"href":"https://api.github.com/repos/sul-dlss/spotlight/issues/817"},"comments":{"href":"https://api.github.com/repos/sul-dlss/spotlight/issues/817/comments"},"review_comments":{"href":"https://api.github.com/repos/sul-dlss/spotlight/pulls/817/comments"},"review_comment":{"href":"https://api.github.com/repos/sul-dlss/spotlight/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/sul-dlss/spotlight/pulls/817/commits"},"statuses":{"href":"https://api.github.com/repos/sul-dlss/spotlight/statuses/69f62ba08275fc23b507292f78fb97e38be3af38"}}}}