diff --git a/app/views/orgs/admin_edit.html.erb b/app/views/orgs/admin_edit.html.erb index 6bdb7fd..ed62b68 100644 --- a/app/views/orgs/admin_edit.html.erb +++ b/app/views/orgs/admin_edit.html.erb @@ -33,10 +33,8 @@
- -
- <%= text_area_tag("org_banner_text", @org.banner_text, class: "tinymce left-indent top-indent") %> -
+ <%= f.label _('Top banner text'), for: @org.banner_text %> + <%= text_area_tag("org_banner_text", @org.banner_text, class: "tinymce left-indent top-indent") %>
diff --git a/app/views/plans/_show_details.html.erb b/app/views/plans/_show_details.html.erb index 3f4e681..67195d0 100644 --- a/app/views/plans/_show_details.html.erb +++ b/app/views/plans/_show_details.html.erb @@ -1,39 +1,19 @@ -
-
-
- -
<%= plan.title %>
-
- -
- -
<%= plan.grant_number %>
-
- -
- -
<%= plan.principal_investigator %>
-
- -
- -
<%= raw plan.description %>
-
- -
- -
- -
<%= plan.identifier %>
-
- -
-
- -
-
- -
<%= plan.data_contact %>
-
-
-
\ No newline at end of file +
+
<%= _('Project Title') %>
+
<%= plan.title %>
+
<%= _('Grant Number') %>
+
<%= plan.grant_number %>
+
<%= _('Principal Investigator') %>
+
<%= plan.principal_investigator %>
+
<%= _('Project Abstract') %>
+
<%= raw plan.description %>
+
+
+
+
<%= _('Plan ID') %>
+
<%= plan.identifier %>
+
<%= _('Data Contact Person') %>
+
+
<%= _('Name') %>
+
<%= plan.data_contact %>
+
diff --git a/app/views/templates/_edit_template.html.erb b/app/views/templates/_edit_template.html.erb index dab4241..8eb53e8 100644 --- a/app/views/templates/_edit_template.html.erb +++ b/app/views/templates/_edit_template.html.erb @@ -1,59 +1,54 @@ -<%= form_for(template, url: admin_update_template_path(template), html: { method: :put}) do |f| %> -
- - - - - - - - - - - - - - - - - - - - - -
<%= _('Title') %><%= f.text_field :title, as: :string, - class: 'text_field has-tooltip', 'data-toggle' => "tooltip", title: _('Please enter a title for your template.') %>
<%= _('Description') %> -
- <%= text_area_tag("template-desc", template.description, class: "tinymce") %> -
-
- <%= link_to( image_tag('help_button.png'), '#', "data-toggle": "popover", rel: "popover", 'data-html' => "true", 'data-content' => _('Enter a description that helps you to differentiate between templates e.g. if you have ones for different audiences'))%> -
-
-
<%= _('Status') %> +<%= form_for(template, url: admin_update_template_path(template), html: { method: :put, class: 'roadmap-form'}) do |f| %> +
+
+ <%= f.label :title, class: 'required' %> + <%= f.text_field :title, as: :string, class: 'input-large has-tooltip', + 'data-toggle': "tooltip", + title: _('Please enter a title for your template.') %> +
+
+ <%= f.label _('Description'), for: template.description %> + <%= text_area_tag("template-desc", template.description, class: "input-large tinymce") %> +
+ + +
+
+
+ +
<% if hash[:live].nil? %> <%= _('Unpublished') %> - + <% elsif hash[:current].dirty? %> <%= _('You have un-published changes') %> - + <% else %> <%= _('Published') %> <% end %> -
<%= _('Created at') %> - <%= l template.created_at.to_date, formats: :short %> -
<%= _('Last updated') %> - <%= l template.updated_at.to_date, formats: :short %> -
- - -
- <%= f.submit _('Save'), class: 'btn btn-primary' %> - <%= link_to _('Cancel'), admin_template_template_path(template), class: 'btn cancel' %> +
- -
- +
+ +
+ <%= l template.created_at.to_date, formats: :short %> +
+
+
+ +
+ <%= l template.updated_at.to_date, formats: :short %> +
+
+ +
+
+
 
+ <%= f.submit _('Save'), class: 'form-submit' %> + <%= link_to _('Cancel'), admin_template_template_path(template) %> +
+ <% end %> \ No newline at end of file diff --git a/app/views/templates/_show_template.html.erb b/app/views/templates/_show_template.html.erb index e84fe6d..5f4411a 100644 --- a/app/views/templates/_show_template.html.erb +++ b/app/views/templates/_show_template.html.erb @@ -1,39 +1,35 @@ -
-
-
-
<%= _('Title') %>
-
<%= template.title %>
-
<%= _('Description') %>
-
- <%= (!template.description.nil? && template.description != "" ? raw( template.description) : '-') %> -
-
<%= _('Status') %>
-
- <% if hash[:live].nil? %> - <%= _('Unpublished') %> - - <% elsif hash[:current].dirty? %> - <%= _('You have un-published changes') %> - - <% else %> - <%= _('Published') %> - <% end %> -
-
<%= _('Created at') %>
-
<%= l template.created_at.to_date, formats: :short %>
-
<%= _('Last updated') %>
-
<%= l template.updated_at.to_date, formats: :short %>
- -
-
- <% if template == current then %> - - <% if template.customization_of.nil? %> - <%= _('Edit template details') %> - <% end %> - <% end %> -
-
-
-
+
+
<%= _('Title') %>
+
<%= template.title %>
+
<%= _('Description') %>
+
+ <%= (!template.description.nil? && template.description != "" ? raw( template.description) : '-') %> +
+
<%= _('Status') %>
+
+ <% if hash[:live].nil? %> + <%= _('Unpublished') %> + + <% elsif hash[:current].dirty? %> + <%= _('You have un-published changes') %> + + <% else %> + <%= _('Published') %> + <% end %> +
+
<%= _('Created at') %>
+
<%= l template.created_at.to_date, formats: :short %>
+
<%= _('Last updated') %>
+
<%= l template.updated_at.to_date, formats: :short %>
+ +
+
+ <% if template == current then %> + + <% if template.customization_of.nil? %> + <%= _('Edit template details') %> + <% end %> + <% end %> +
+
diff --git a/lib/assets/javascripts/dmproadmap/utils.js b/lib/assets/javascripts/dmproadmap/utils.js index d5f0fd4..8aff27d 100644 --- a/lib/assets/javascripts/dmproadmap/utils.js +++ b/lib/assets/javascripts/dmproadmap/utils.js @@ -28,4 +28,20 @@ }).on('blur', function(e){ $(this).parent().find('div.tooltip-message').remove(); }); + + // Display tooltips when the item has focus or hover + $("[data-toggle='popover']").on('click', function(e){ + e.preventDefault(); + + if($(this).attr('data-content') != undefined){ + if($(this).parent().find(".popover-message").length > 0){ + $(this).parent().find(".popover-message").remove(); + }else{ + var y = $(this).width() + 35; + $(this).parent().append('
' + $(this).attr('data-content') + '
'); + } + } + }).on('blur', function(e){ + $(this).parent().find('div.popover-message').remove(); + }); }); diff --git a/lib/assets/stylesheets/application.scss b/lib/assets/stylesheets/application.scss index 5a1ab6d..7e33cf1 100644 --- a/lib/assets/stylesheets/application.scss +++ b/lib/assets/stylesheets/application.scss @@ -17,8 +17,8 @@ @import "dmproadmap"; @import "dmproadmap/base"; +@import "dmproadmap/tabs"; @import "dmproadmap/accordions"; -@import "dmproadmap/forms"; @import "dmproadmap/modals"; @import "dmproadmap/tables"; -@import "dmproadmap/tabs"; \ No newline at end of file +@import "dmproadmap/forms"; \ No newline at end of file diff --git a/lib/assets/stylesheets/dmproadmap/base.scss b/lib/assets/stylesheets/dmproadmap/base.scss index f7c7a2a..7b23471 100644 --- a/lib/assets/stylesheets/dmproadmap/base.scss +++ b/lib/assets/stylesheets/dmproadmap/base.scss @@ -109,6 +109,10 @@ [data-toggle='popover']{ position: relative; + + .fa { + font-size: 18px; + } } div.popover-message { position: absolute; @@ -366,7 +370,7 @@ font-weight: bold; } dt:not(.dl-buttons):after { - content: ":"; + content: " :"; } dd { diff --git a/lib/assets/stylesheets/dmproadmap/forms.scss b/lib/assets/stylesheets/dmproadmap/forms.scss index 2efe9d6..44561fa 100644 --- a/lib/assets/stylesheets/dmproadmap/forms.scss +++ b/lib/assets/stylesheets/dmproadmap/forms.scss @@ -18,10 +18,12 @@ input[type="checkbox"], input[type="radio"], select { border: 1px solid $medium-grey; } -div.wysiwyg-textarea { - display: inline-block; - margin: 10px 10px 10px 15px; + +/* Tinymce control hover (e.g. bold, italic, etc.) */ +.mce-btn button:hover { + background-color: $white; } + textarea:focus, select:focus, input[type="text"]:focus, input[type="email"]:focus, input[type="password"]:focus, input[type="search"]:focus, input[type="checkbox"]:focus, input[type="radio"]:focus { @@ -114,10 +116,13 @@ .mce-tinymce { display: inline-block; + margin-bottom: 15px; + width: 51%; } div { label, + .button-spacer, div.read-only, input[type="checkbox"], .combobox-container, @@ -129,7 +134,7 @@ margin-left: -5px; } - label { + label, .button-spacer { width: 25%; text-align: right; margin-right: 10px; @@ -144,11 +149,9 @@ font-size: 10pt; text-decoration:none; } - } - - .button-spacer { - display: inline-block; - width: 21%; + div.read-only{ + margin-bottom: 15px; + } } } @@ -166,7 +169,17 @@ float: left; /* positions the legend within the fieldset box */ border-bottom: none; } - + + label { + font-weight: bold; + } + label:not(.no-colon):after { + content: " :"; + } + label.required:after { + content: " * :"; + } + .form-input { clear: both; }