diff --git a/app/controllers/templates_controller.rb b/app/controllers/templates_controller.rb index 57cbabc..c5a2f7d 100644 --- a/app/controllers/templates_controller.rb +++ b/app/controllers/templates_controller.rb @@ -45,11 +45,7 @@ # GET /dmptemplates/new def admin_new - @dmptemplate = Dmptemplate.new - authorize @dmptemplate - respond_to do |format| - format.html # new.html.erb - end + authorize Template end # POST /dmptemplates diff --git a/app/views/templates/admin_new.html.erb b/app/views/templates/admin_new.html.erb index 798f855..61566b7 100644 --- a/app/views/templates/admin_new.html.erb +++ b/app/views/templates/admin_new.html.erb @@ -2,47 +2,46 @@ <% javascript "admin.js" %>

- <%= t("org_admin.templates.new_label") %> - -
- <%= link_to t("org_admin.templates.view_all_templates"), - admin_index_dmptemplate_path, - :class => "btn btn-primary" %> -
+ <%= t("org_admin.templates.new_label") %> + +
+ <%= link_to t("org_admin.templates.view_all_templates"), + admin_index_template_path, class: "btn btn-primary" %> +

- -
- <%= raw t("org_admin.templates.create_new_template_text_html")%> -
- <%= form_for :dmptemplate, :url => {:action => "admin_create"} do |f| %> - - - - - - - - - - -
<%= t("org_admin.templates.title_label") %><%= f.text_field :title, :as => :string, - :class => "text_field has-tooltip", "data-toggle" => "tooltip", "title" => t("org_admin.templates.title_help_text") %>
<%= t("org_admin.templates.desc_label") %>
- <%= text_area_tag("template-desc", "", class: "tinymce") %> -
-
- <%= link_to( image_tag("help_button.png"), "#", :class => "template_desc_popover", :rel => "popover", "data-html" => "true", "data-content" => t("org_admin.template_desc_help_text_html"))%> -
-
- -
- <%= f.submit t("helpers.submit.save"), :class => "btn btn-primary" %> - <%= link_to t("helpers.submit.cancel"), admin_index_dmptemplate_path, :class => "btn cancel" %> -
-
- <%end%> -
+ +
+ <%= raw t("org_admin.templates.create_new_template_text_html")%> +
+ <%= form_for :template, url: {action: "admin_create"} do |f| %> + + + + + + + + + + +
<%= t("org_admin.templates.title_label") %><%= f.text_field :title, as: :string, + class: "text_field has-tooltip", "data-toggle" => "tooltip", "title" => t("org_admin.templates.title_help_text") %>
<%= t("org_admin.templates.desc_label") %>
+ <%= text_area_tag("template-desc", "", class: "tinymce") %> +
+
+ <%= link_to( image_tag("help_button.png"), "#", class: "template_desc_popover", rel: "popover", "data-html" => "true", "data-content" => t("org_admin.template_desc_help_text_html"))%> +
+
+ +
+ <%= f.submit t("helpers.submit.save"), class: "btn btn-primary" %> + <%= link_to t("helpers.submit.cancel"), admin_index_template_path, class: "btn cancel" %> +
+
+ <% end %> +
-<%= tinymce :content_css => asset_path("application.css") %> \ No newline at end of file +<%= tinymce content_css: asset_path("application.css") %> \ No newline at end of file