diff options
| -rw-r--r-- | app/views/admin/search_results.html.erb | 11 | ||||
| -rw-r--r-- | app/views/layouts/admin.html.erb | 17 | ||||
| -rw-r--r-- | app/views/menu_items/new.html.erb | 42 | ||||
| -rw-r--r-- | app/views/nodes/new.html.erb | 2 | ||||
| -rw-r--r-- | app/views/sessions/new.html.erb | 31 | ||||
| -rw-r--r-- | public/stylesheets/admin.css | 21 |
6 files changed, 61 insertions, 63 deletions
diff --git a/app/views/admin/search_results.html.erb b/app/views/admin/search_results.html.erb index f8aece0..a757197 100644 --- a/app/views/admin/search_results.html.erb +++ b/app/views/admin/search_results.html.erb | |||
| @@ -1,7 +1,10 @@ | |||
| 1 | <h1>Search Results</h1> | 1 | <h1>Search Results</h1> |
| 2 | 2 | ||
| 3 | <ul> | 3 | <ul class="search_results_list"> |
| 4 | <%- @results.each do |result| %> | 4 | <% @results.each do |result| %> |
| 5 | <li><%= link_to "#{result.title} (#{result.unique_name})", edit_node_path(result) %></li> | 5 | <li> |
| 6 | <% end %> | 6 | <%= link_to title_for_node(result), node_path(result) %> |
| 7 | <span class="field_hint"><%= link_to_path("#{result.unique_name} ↗", result.unique_name) %></span> | ||
| 8 | </li> | ||
| 9 | <% end %> | ||
| 7 | </ul> | 10 | </ul> |
diff --git a/app/views/layouts/admin.html.erb b/app/views/layouts/admin.html.erb index 00d7075..61bb5c3 100644 --- a/app/views/layouts/admin.html.erb +++ b/app/views/layouts/admin.html.erb | |||
| @@ -27,6 +27,14 @@ | |||
| 27 | <div id="main_navigation"> | 27 | <div id="main_navigation"> |
| 28 | <%= render :partial => 'admin/menu' if current_user %> | 28 | <%= render :partial => 'admin/menu' if current_user %> |
| 29 | </div> | 29 | </div> |
| 30 | <div id="search_widget" style="display: none;"> | ||
| 31 | <div> | ||
| 32 | <%= form_tag admin_search_path, method: :get do %> | ||
| 33 | <span>Search: </span><%= text_field_tag :search_term, nil, autocomplete: "off" %> | ||
| 34 | <% end %> | ||
| 35 | </div> | ||
| 36 | <div id="menu_search_results" class="search_results" style="display: none"></div> | ||
| 37 | </div> | ||
| 30 | </div> | 38 | </div> |
| 31 | <div class="admin_content_spacer"></div> | 39 | <div class="admin_content_spacer"></div> |
| 32 | <% if flash[:notice].present? || flash[:error].present? %> | 40 | <% if flash[:notice].present? || flash[:error].present? %> |
| @@ -50,14 +58,5 @@ | |||
| 50 | 58 | ||
| 51 | <div id="results"></div> | 59 | <div id="results"></div> |
| 52 | </div> | 60 | </div> |
| 53 | |||
| 54 | <div id="search_widget" style="display: none;"> | ||
| 55 | <div> | ||
| 56 | <%= form_tag admin_search_path, method: :get do %> | ||
| 57 | <span>Search: </span><%= text_field_tag :search_term, nil, autocomplete: "off" %> | ||
| 58 | <% end %> | ||
| 59 | </div> | ||
| 60 | <div id="menu_search_results" class="search_results" style="display: none"></div> | ||
| 61 | </div> | ||
| 62 | </body> | 61 | </body> |
| 63 | </html> | 62 | </html> |
diff --git a/app/views/menu_items/new.html.erb b/app/views/menu_items/new.html.erb index 223cb8e..8957293 100644 --- a/app/views/menu_items/new.html.erb +++ b/app/views/menu_items/new.html.erb | |||
| @@ -1,30 +1,20 @@ | |||
| 1 | <h1>Add Menu Item</h1> | 1 | <h1>Add Menu Item</h1> |
| 2 | 2 | ||
| 3 | <%= form_for @menu_item do |f| %> | 3 | <%= form_for @menu_item do |f| %> |
| 4 | <table> | 4 | <div class="node_description">Search</div> |
| 5 | 5 | <div class="node_content"> | |
| 6 | <tr> | 6 | <%= text_field_tag :menu_search_term %> |
| 7 | <td class="description">Search</td> | 7 | <div id="menu_item_search_results" class="search_results"></div> |
| 8 | <td> | 8 | </div> |
| 9 | <%= text_field_tag :menu_search_term %> | 9 | |
| 10 | <div id="menu_item_search_results" class="search_results"></div> | 10 | <div class="node_description">Node Id</div> |
| 11 | </td> | 11 | <div class="node_content"><%= f.text_field :node_id %></div> |
| 12 | </tr> | 12 | |
| 13 | <tr> | 13 | <div class="node_description">Path</div> |
| 14 | <td class="description">Node Id</td> | 14 | <div class="node_content"><%= f.text_field :path %></div> |
| 15 | <td><%= f.text_field :node_id %></td> | 15 | |
| 16 | </tr> | 16 | <div class="node_description">Title</div> |
| 17 | <tr> | 17 | <div class="node_content"><%= f.text_field :title %></div> |
| 18 | <td class="description">Path</td> | 18 | |
| 19 | <td><%= f.text_field :path %></td> | 19 | <div class="node_content"><%= f.submit 'Create' %></div> |
| 20 | </tr> | ||
| 21 | <tr> | ||
| 22 | <td class="description">Title</td> | ||
| 23 | <td><%= f.text_field :title %></td> | ||
| 24 | </tr> | ||
| 25 | <tr> | ||
| 26 | <td></td> | ||
| 27 | <td class="right"><%= f.submit 'Create' %></td> | ||
| 28 | </tr> | ||
| 29 | </table> | ||
| 30 | <% end %> | 20 | <% end %> |
diff --git a/app/views/nodes/new.html.erb b/app/views/nodes/new.html.erb index bb7e078..b63a606 100644 --- a/app/views/nodes/new.html.erb +++ b/app/views/nodes/new.html.erb | |||
| @@ -46,7 +46,7 @@ | |||
| 46 | </div> | 46 | </div> |
| 47 | 47 | ||
| 48 | <div class="node_description"></div> | 48 | <div class="node_description"></div> |
| 49 | <div class="node_content right"><%= submit_tag "Create" %></div> | 49 | <div class="node_content"><%= submit_tag "Create" %></div> |
| 50 | 50 | ||
| 51 | </div> | 51 | </div> |
| 52 | <% end %> | 52 | <% end %> |
diff --git a/app/views/sessions/new.html.erb b/app/views/sessions/new.html.erb index 3c10303..23952b7 100644 --- a/app/views/sessions/new.html.erb +++ b/app/views/sessions/new.html.erb | |||
| @@ -1,24 +1,15 @@ | |||
| 1 | <div id="login_form"> | 1 | <div id="login_form"> |
| 2 | <%= form_tag session_path do -%> | 2 | <%= form_tag session_path do -%> |
| 3 | <table> | 3 | <% if flash[:error] %> |
| 4 | <tr> | 4 | <div class="error_messages"><%= flash[:error] %></div> |
| 5 | <td></td> | 5 | <% end %> |
| 6 | <td> | 6 | |
| 7 | <%= flash[:error] %> | 7 | <div class="node_description">Login</div> |
| 8 | </td> | 8 | <div class="node_content"><%= text_field_tag 'login', @login %></div> |
| 9 | </tr> | 9 | |
| 10 | <tr> | 10 | <div class="node_description">Password</div> |
| 11 | <td class="description">Login</td> | 11 | <div class="node_content"><%= password_field_tag 'password', nil %></div> |
| 12 | <td><%= text_field_tag 'login', @login %></td> | 12 | |
| 13 | </tr> | 13 | <div class="node_content"><%= submit_tag 'log in' %></div> |
| 14 | <tr> | ||
| 15 | <td class="description">Password</td> | ||
| 16 | <td><%= password_field_tag 'password', nil %></td> | ||
| 17 | </tr> | ||
| 18 | <tr> | ||
| 19 | <td></td> | ||
| 20 | <td class="right"><%= submit_tag 'log in' %></td> | ||
| 21 | </tr> | ||
| 22 | </table> | ||
| 23 | <% end -%> | 14 | <% end -%> |
| 24 | </div> | 15 | </div> |
diff --git a/public/stylesheets/admin.css b/public/stylesheets/admin.css index c1cc456..2044ab0 100644 --- a/public/stylesheets/admin.css +++ b/public/stylesheets/admin.css | |||
| @@ -26,6 +26,7 @@ a:hover { | |||
| 26 | nodes#show, and the dashboard draft list's Show/Revisions links. */ | 26 | nodes#show, and the dashboard draft list's Show/Revisions links. */ |
| 27 | #page_editor a, | 27 | #page_editor a, |
| 28 | .dashboard_widget a, | 28 | .dashboard_widget a, |
| 29 | .search_results_list a, | ||
| 29 | #sitemap a, | 30 | #sitemap a, |
| 30 | #flash a, | 31 | #flash a, |
| 31 | div.pagination a, | 32 | div.pagination a, |
| @@ -941,6 +942,10 @@ div#page_editor { | |||
| 941 | 942 | ||
| 942 | @media(min-width:1016px) { | 943 | @media(min-width:1016px) { |
| 943 | input#tag_list, | 944 | input#tag_list, |
| 945 | input#menu_search_term, | ||
| 946 | input#menu_item_node_id, | ||
| 947 | input#menu_item_path, | ||
| 948 | input#menu_item_title, | ||
| 944 | input#node_staged_slug, | 949 | input#node_staged_slug, |
| 945 | input#move_to_search_term { | 950 | input#move_to_search_term { |
| 946 | width: 690px; | 951 | width: 690px; |
| @@ -1073,15 +1078,25 @@ div#draft_list table td.actions a { | |||
| 1073 | padding-right: 5px; | 1078 | padding-right: 5px; |
| 1074 | } | 1079 | } |
| 1075 | 1080 | ||
| 1081 | .search_results_list { | ||
| 1082 | list-style: none; | ||
| 1083 | margin: 0; | ||
| 1084 | padding: 0; | ||
| 1085 | } | ||
| 1086 | |||
| 1087 | .search_results_list li { | ||
| 1088 | padding: 0.5rem 0; | ||
| 1089 | border-bottom: 1px solid #f1f1f1; | ||
| 1090 | } | ||
| 1091 | |||
| 1076 | /* ============================================================ | 1092 | /* ============================================================ |
| 1077 | Search widgets | 1093 | Search widgets |
| 1078 | ============================================================ */ | 1094 | ============================================================ */ |
| 1079 | 1095 | ||
| 1080 | #search_widget { | 1096 | #search_widget { |
| 1081 | position: absolute; | 1097 | position: absolute; |
| 1082 | top: 20px; | 1098 | top: 2.75rem; |
| 1083 | left: 50%; | 1099 | left: 0; |
| 1084 | transform: translateX(-50%); | ||
| 1085 | width: min(520px, 90vw); | 1100 | width: min(520px, 90vw); |
| 1086 | border: 1px solid #000000; | 1101 | border: 1px solid #000000; |
| 1087 | -webkit-box-shadow: 3px 3px 5px #b1b1b1; | 1102 | -webkit-box-shadow: 3px 3px 5px #b1b1b1; |
