From 2b5bdbe4dc1322f21ca29a1a75ce0c0a222737de Mon Sep 17 00:00:00 2001 From: Alex Turchyn Date: Sun, 11 Jun 2023 17:40:08 +0300 Subject: [PATCH] add a welcome message to the home page --- app/views/dashboard/index.html.erb | 63 +++++++++++++++++++----------- 1 file changed, 40 insertions(+), 23 deletions(-) diff --git a/app/views/dashboard/index.html.erb b/app/views/dashboard/index.html.erb index 64a49cbf..59e3ce78 100644 --- a/app/views/dashboard/index.html.erb +++ b/app/views/dashboard/index.html.erb @@ -1,26 +1,43 @@ -
-

Dashboard

- <%= link_to new_template_path, class: 'btn btn-primary btn-md gap-2', data: { turbo_frame: :modal } do %> - <%= svg_icon('plus', class: 'w-6 h-6') %> - - <% end %> -
-
- <% @templates.each do |template| %> -
-
-

- <%= link_to template.name, template_submissions_path(template) %> - <%= link_to 'Edit', template_path(template), class: 'btn btn-outline btn-xs' %> -

-
-

Created by <%= template.author.full_name %>

-

- <%= svg_icon('calendar', class: 'w-4 h-4') %> - <%= l(template.created_at, format: :long) %> -

+<%- if @templates.any? %> +
+

Templates

+ <%= link_to new_template_path, class: 'btn btn-primary btn-md gap-2', data: { turbo_frame: :modal } do %> + <%= svg_icon('plus', class: 'w-6 h-6') %> + + <% end %> +
+
+ <% @templates.each do |template| %> +
+
+

+ <%= link_to template.name, template_submissions_path(template) %> + <%= link_to 'Edit', template_path(template), class: 'btn btn-outline btn-xs' %> +

+
+

Created by <%= template.author.full_name %>

+

+ <%= svg_icon('calendar', class: 'w-4 h-4') %> + <%= l(template.created_at, format: :long) %> +

+
+
+
+ <% end %> +
+<% else %> +
+
+
+
+

Welcome to DocuSeal

+

Streamline document workflows, from creating customizable templates to filling and signing document forms, with DocuSeal

+ <%= link_to new_template_path, class: 'btn btn-neutral', data: { turbo_frame: :modal } do %> + <%= svg_icon('plus', class: 'w-6 h-6') %> + Create Template + <% end %>
- <% end %> -
+
+<% end %>