diff options
| author | erdgeist <erdgeist@erdgeist.org> | 2026-07-07 21:43:21 +0200 |
|---|---|---|
| committer | erdgeist <erdgeist@erdgeist.org> | 2026-07-07 21:43:21 +0200 |
| commit | 42f81016be8c55322e0dbb2c20b08812d5d2228b (patch) | |
| tree | 9dff0e0e365d0c6c663c1b081a0258d6a78d1a7b /app | |
| parent | ae29567bea75b28bd3f5655b6bf3e6444d51eb38 (diff) | |
Adopt button pills in views
Diffstat (limited to 'app')
| -rw-r--r-- | app/helpers/link_helper.rb | 2 | ||||
| -rw-r--r-- | app/views/admin/_drafts.html.erb | 2 | ||||
| -rw-r--r-- | app/views/nodes/edit.html.erb | 2 | ||||
| -rw-r--r-- | app/views/nodes/show.html.erb | 4 | ||||
| -rw-r--r-- | app/views/revisions/index.html.erb | 2 |
5 files changed, 6 insertions, 6 deletions
diff --git a/app/helpers/link_helper.rb b/app/helpers/link_helper.rb index 878e8e4..9b0b4e1 100644 --- a/app/helpers/link_helper.rb +++ b/app/helpers/link_helper.rb | |||
| @@ -44,7 +44,7 @@ module LinkHelper | |||
| 44 | "Last modified #{@page.updated_at.to_fs(:db)}" | 44 | "Last modified #{@page.updated_at.to_fs(:db)}" |
| 45 | button_to 'Unlock', unlock_node_path(@node), | 45 | button_to 'Unlock', unlock_node_path(@node), |
| 46 | method: :put, | 46 | method: :put, |
| 47 | form: { data: { confirm: message } } | 47 | form: { data: { confirm: message }, class: 'button_to state_changing' } |
| 48 | end | 48 | end |
| 49 | 49 | ||
| 50 | def content_path(page_path = nil, options = {}) | 50 | def content_path(page_path = nil, options = {}) |
diff --git a/app/views/admin/_drafts.html.erb b/app/views/admin/_drafts.html.erb index a35b0ab..4ef568f 100644 --- a/app/views/admin/_drafts.html.erb +++ b/app/views/admin/_drafts.html.erb | |||
| @@ -17,7 +17,7 @@ | |||
| 17 | <td class="actions"> | 17 | <td class="actions"> |
| 18 | <%= link_to 'Show', node_path(draft.node) %> | 18 | <%= link_to 'Show', node_path(draft.node) %> |
| 19 | <%= link_to "Revisions", revision_path(draft.node.id) %> | 19 | <%= link_to "Revisions", revision_path(draft.node.id) %> |
| 20 | <%= button_to "Publish", publish_node_path(draft.node), method: :put, form: { data: { confirm: "Do you really want to publish?" } } %> | 20 | <%= button_to "Publish", publish_node_path(draft.node), method: :put, form: { data: { confirm: "Do you really want to publish?" }, class: 'button_to state_changing' } %> |
| 21 | </td> | 21 | </td> |
| 22 | </tr> | 22 | </tr> |
| 23 | <% end %> | 23 | <% end %> |
diff --git a/app/views/nodes/edit.html.erb b/app/views/nodes/edit.html.erb index 2d0edc1..4cdb3ae 100644 --- a/app/views/nodes/edit.html.erb +++ b/app/views/nodes/edit.html.erb | |||
| @@ -2,7 +2,7 @@ | |||
| 2 | <%= link_to 'metadata', '#', :id => 'button', :class => "unselected" %> | 2 | <%= link_to 'metadata', '#', :id => 'button', :class => "unselected" %> |
| 3 | <%= link_to 'Show', @node %> | 3 | <%= link_to 'Show', @node %> |
| 4 | <%= link_to 'Preview', preview_page_path(@draft) %> | 4 | <%= link_to 'Preview', preview_page_path(@draft) %> |
| 5 | <%= button_to 'Publish', publish_node_path(@node), method: :put, form: { data: { confirm: "Publish this draft?" } } %> | 5 | <%= button_to 'Publish', publish_node_path(@node), method: :put, form: { data: { confirm: "Publish this draft?" }, class: 'button_to state_changing' } %> |
| 6 | <%= link_to 'Revisions', node_revisions_path(@node) %> | 6 | <%= link_to 'Revisions', node_revisions_path(@node) %> |
| 7 | <% end %> | 7 | <% end %> |
| 8 | 8 | ||
diff --git a/app/views/nodes/show.html.erb b/app/views/nodes/show.html.erb index 963bc37..71dbaa3 100644 --- a/app/views/nodes/show.html.erb +++ b/app/views/nodes/show.html.erb | |||
| @@ -59,9 +59,9 @@ | |||
| 59 | <span class="node_info_label">Public Preview</span> | 59 | <span class="node_info_label">Public Preview</span> |
| 60 | <% if @node.draft.preview_token.present? %> | 60 | <% if @node.draft.preview_token.present? %> |
| 61 | <%= link_to shared_preview_path(token: @node.draft.preview_token), shared_preview_url(token: @node.draft.preview_token), target: "_blank", rel: "noopener" %> | 61 | <%= link_to shared_preview_path(token: @node.draft.preview_token), shared_preview_url(token: @node.draft.preview_token), target: "_blank", rel: "noopener" %> |
| 62 | <%= button_to 'Revoke', revoke_shared_preview_node_path(@node), method: :put, form: { data: { confirm: "Revoke this preview link? Anyone currently using it will immediately lose access." } } %> | 62 | <%= button_to 'Revoke', revoke_shared_preview_node_path(@node), method: :put, form: { data: { confirm: "Revoke this preview link? Anyone currently using it will immediately lose access." }, class: 'button_to state_changing' } %> |
| 63 | <% else %> | 63 | <% else %> |
| 64 | <%= button_to 'Create public preview link', generate_shared_preview_node_path(@node), method: :put %> | 64 | <%= button_to 'Create public preview link', generate_shared_preview_node_path(@node), method: :put, form: { class: 'button_to state_changing' } %> |
| 65 | <% end %> | 65 | <% end %> |
| 66 | </div> | 66 | </div> |
| 67 | <% end %> | 67 | <% end %> |
diff --git a/app/views/revisions/index.html.erb b/app/views/revisions/index.html.erb index b875a4f..26a9ff4 100644 --- a/app/views/revisions/index.html.erb +++ b/app/views/revisions/index.html.erb | |||
| @@ -27,7 +27,7 @@ | |||
| 27 | <td> | 27 | <td> |
| 28 | <%= button_to 'restore', restore_node_revision_path(@node, page), | 28 | <%= button_to 'restore', restore_node_revision_path(@node, page), |
| 29 | method: :put, | 29 | method: :put, |
| 30 | form: { data: { confirm: "Restore this revision?" } } %> | 30 | form: { data: { confirm: "Restore this revision?" }, class: 'button_to state_changing' } %> |
| 31 | </td> | 31 | </td> |
| 32 | </tr> | 32 | </tr> |
| 33 | <% end %> | 33 | <% end %> |
