From f8130c15a56ee53ea95a37b5d6e1a1977903d829 Mon Sep 17 00:00:00 2001 From: Brennan Novak Date: Tue, 2 Jul 2019 09:11:09 -0400 Subject: [PATCH] normalize UI Add Entities list #66 and form (temp fix) for #67 --- app/views/entities/create.html.erb | 146 ++++++++++++++--------------- app/views/entities/index.html.erb | 56 +++++------ 2 files changed, 96 insertions(+), 106 deletions(-) diff --git a/app/views/entities/create.html.erb b/app/views/entities/create.html.erb index 34ddb8c..9b8b122 100644 --- a/app/views/entities/create.html.erb +++ b/app/views/entities/create.html.erb @@ -1,84 +1,74 @@ - -
- -
-

<%= @entity["name"] %>

-
-
"> - <% entity_fields = @entity["source_fields"].select{|k,v| v["display_type"] != "None" && v["display_type"] != "Category"} %> - <% entity_fields.each do |name, field| %> -

- - <%= field["human_readable"] %> - -

- <% if field["display_type"] == "Title" or field["display_type"] == "Description" %> - ]]" class="form-control add-bottom" value=""> - <% elsif field["display_type"] == "Short Text" %> - - <% elsif field["display_type"] == "Long Text" %> - - <% elsif field["display_type"] =="Date" %> -
-
"> - ]]" class="form-control" value=""> - - Choose Date - +
+
+ +
+

<%= @entity["name"] %>

+ +
"> + <% entity_fields = @entity["source_fields"].select{|k,v| v["display_type"] != "None" && v["display_type"] != "Category"} %> + <% entity_fields.each do |name, field| %> +

+ + <%= field["human_readable"] %> + +

+ <% if field["display_type"] == "Title" or field["display_type"] == "Description" %> + ]]" class="form-control add-bottom" value=""> + <% elsif field["display_type"] == "Short Text" %> + + <% elsif field["display_type"] == "Long Text" %> + + <% elsif field["display_type"] =="Date" %> +
+
"> + ]]" class="form-control" value=""> + + Choose Date + +
-
- - <% elsif field["display_type"] == "Related Link" %> - ]]" class="url-validate form-control" value=""> + + <% elsif field["display_type"] == "Related Link" %> + ]]" class="url-validate form-control" value=""> + <% end %> <% end %> - <% end %> -
- - "> -
-
-
- - - Cancel - + + "> +
+
+
+
+ + + Cancel + +
-
- + +
-<%= render partial: 'shared/modals_editor' %> diff --git a/app/views/entities/index.html.erb b/app/views/entities/index.html.erb index b85ceb5..fa3c4de 100644 --- a/app/views/entities/index.html.erb +++ b/app/views/entities/index.html.erb @@ -1,32 +1,32 @@
-
- -
- <% @entity_specs.each_with_index do |entity, index| %> -
" class="row"> -
-

- <%= entity["name"] %> -

- <%= entity["description"] %> +
+ +
+ <% @entity_specs.each_with_index do |entity, index| %> +
" class="row"> +
+

+ <%= entity["name"] %> +

+ <%= entity["description"] %> +
+ + ">
- - "> -
-
- <% end %> +
+ <% end %> +
-