diff options
Diffstat (limited to 'app/views/nodes')
| -rw-r--r-- | app/views/nodes/edit.html.erb | 14 | ||||
| -rw-r--r-- | app/views/nodes/new.html.erb | 5 |
2 files changed, 17 insertions, 2 deletions
diff --git a/app/views/nodes/edit.html.erb b/app/views/nodes/edit.html.erb index 25f15c2..da682f0 100644 --- a/app/views/nodes/edit.html.erb +++ b/app/views/nodes/edit.html.erb | |||
| @@ -82,17 +82,26 @@ | |||
| 82 | <ul id="related_asset_list" class="thumbnail_list"> | 82 | <ul id="related_asset_list" class="thumbnail_list"> |
| 83 | <% @page.related_assets.includes(:asset).each do |related| %> | 83 | <% @page.related_assets.includes(:asset).each do |related| %> |
| 84 | <li data-url="<%= node_related_asset_path(@node, related) %>" | 84 | <li data-url="<%= node_related_asset_path(@node, related) %>" |
| 85 | data-asset-id="<%= related.asset.id %>" | ||
| 85 | data-large-url="<%= related.asset.upload.url(:large) %>" | 86 | data-large-url="<%= related.asset.upload.url(:large) %>" |
| 86 | data-original-url="<%= related.asset.upload.url %>" | 87 | data-original-url="<%= related.asset.upload.url %>" |
| 87 | data-name="<%= related.asset.name %>"> | 88 | data-name="<%= related.asset.name %>" |
| 89 | data-headline="<%= related.headline? %>" | ||
| 90 | class="<%= "is_headline" if related.headline? %>"> | ||
| 88 | <span class="related_asset_handle"><%= icon("grip-vertical", library: "tabler", "aria-hidden": true) %></span> | 91 | <span class="related_asset_handle"><%= icon("grip-vertical", library: "tabler", "aria-hidden": true) %></span> |
| 89 | <%= image_tag related.asset.upload.url(:thumb) %> | 92 | <%= image_tag related.asset.upload.url(:thumb) %> |
| 93 | <button type="button" class="related_asset_set_headline" | ||
| 94 | aria-pressed="<%= related.headline? %>" aria-label="Set as headline image" | ||
| 95 | title="Use this photo as the page's headline image"> | ||
| 96 | <%= icon("star", library: "tabler", "aria-hidden": true) %> | ||
| 97 | </button> | ||
| 90 | <button type="button" class="related_asset_remove" aria-label="Remove image"> | 98 | <button type="button" class="related_asset_remove" aria-label="Remove image"> |
| 91 | <%= icon("x", library: "tabler", "aria-hidden": true) %> | 99 | <%= icon("x", library: "tabler", "aria-hidden": true) %> |
| 92 | </button> | 100 | </button> |
| 93 | </li> | 101 | </li> |
| 94 | <% end %> | 102 | <% end %> |
| 95 | </ul> | 103 | </ul> |
| 104 | <p class="field_hint">The starred photo becomes this page's headline image on the public site. If none is starred, visitors get a link to browse all attached images instead.</p> | ||
| 96 | <%= text_field_tag nil, nil, id: "related_asset_search_term", placeholder: "Search images to attach…", autocomplete: "off" %> | 105 | <%= text_field_tag nil, nil, id: "related_asset_search_term", placeholder: "Search images to attach…", autocomplete: "off" %> |
| 97 | <div id="related_asset_search_results" class="search_results"></div> | 106 | <div id="related_asset_search_results" class="search_results"></div> |
| 98 | </div> | 107 | </div> |
| @@ -102,6 +111,9 @@ | |||
| 102 | <li> | 111 | <li> |
| 103 | <span class="related_asset_handle"><%= icon("grip-vertical", library: "tabler", "aria-hidden": true) %></span> | 112 | <span class="related_asset_handle"><%= icon("grip-vertical", library: "tabler", "aria-hidden": true) %></span> |
| 104 | <img src=""> | 113 | <img src=""> |
| 114 | <button type="button" class="related_asset_set_headline" aria-pressed="false" aria-label="Set as headline image"> | ||
| 115 | <%= icon("star", library: "tabler", "aria-hidden": true) %> | ||
| 116 | </button> | ||
| 105 | <button type="button" class="related_asset_remove" aria-label="Remove image"> | 117 | <button type="button" class="related_asset_remove" aria-label="Remove image"> |
| 106 | <%= icon("x", library: "tabler", "aria-hidden": true) %> | 118 | <%= icon("x", library: "tabler", "aria-hidden": true) %> |
| 107 | </button> | 119 | </button> |
diff --git a/app/views/nodes/new.html.erb b/app/views/nodes/new.html.erb index 890d46e..805fbc9 100644 --- a/app/views/nodes/new.html.erb +++ b/app/views/nodes/new.html.erb | |||
| @@ -41,7 +41,10 @@ | |||
| 41 | <div class="node_description">Resulting path</div> | 41 | <div class="node_description">Resulting path</div> |
| 42 | <div class="node_content"> | 42 | <div class="node_content"> |
| 43 | <span id="resulting_path">—</span> | 43 | <span id="resulting_path">—</span> |
| 44 | <button type="button" id="copy_resulting_path" class="unselected">copy</button> | 44 | <button type="button" id="copy_resulting_path" class="unselected copy_button" data-copy-target="#resulting_path"> |
| 45 | <span class="copy_button_label">copy</span> | ||
| 46 | </button> | ||
| 47 | |||
| 45 | <span class="field_hint">This preview updates as you type. The final path can still be changed afterward by editing the title (for the last segment) or moving the node to a different parent (for everything before it).</span> | 48 | <span class="field_hint">This preview updates as you type. The final path can still be changed afterward by editing the title (for the last segment) or moving the node to a different parent (for everything before it).</span> |
| 46 | </div> | 49 | </div> |
| 47 | 50 | ||
