WIP
parent
0e667baaa9
commit
d046773328
@ -0,0 +1,5 @@
|
||||
<%= if @current_tab == @this_tab do %>
|
||||
<a href="/<%= URI.encode_www_form(@site.domain) %>/settings/<%= @this_tab %>" class="flex items-center px-3 py-2 text-sm leading-5 font-medium text-gray-900 rounded-md bg-gray-100 hover:text-gray-900 hover:bg-gray-100 focus:outline-none focus:bg-gray-200 transition ease-in-out duration-150 <%= if @this_tab != "general", do: "mt-1" %>"><%= @text %></a>
|
||||
<% else %>
|
||||
<a href="/<%= URI.encode_www_form(@site.domain) %>/settings/<%= @this_tab %>" class="flex items-center px-3 py-2 text-sm leading-5 font-medium text-gray-600 rounded-md hover:text-gray-900 hover:bg-gray-50 focus:outline-none focus:text-gray-900 focus:bg-gray-50 transition ease-in-out duration-150 <%= if @this_tab != "general", do: "mt-1" %>"><%= @text %></a>
|
||||
<% end %>
|
||||
@ -0,0 +1,31 @@
|
||||
<div class="container">
|
||||
<div class="lg:grid lg:grid-cols-12 lg:gap-x-5 mt-6">
|
||||
<%= render("settings_header.html", tab: "goals", site: @site) %>
|
||||
|
||||
<div class="space-y-6 sm:px-6 lg:px-0 lg:col-span-9">
|
||||
<div class="shadow bg-white sm:rounded-md sm:overflow-hidden py-6 px-4 sm:p-6">
|
||||
<header>
|
||||
<h2 class="text-lg leading-6 font-medium text-gray-900">Goals</h2>
|
||||
<p class="mt-1 text-sm leading-5 text-gray-500">Define actions that you want your users to take like visiting a certain page, submitting a form, etc.</p>
|
||||
</header>
|
||||
|
||||
<%= if Enum.count(@goals) > 0 do %>
|
||||
<div class="mt-4">
|
||||
<%= for goal <- @goals do %>
|
||||
<div class="border-b border-gray-300 py-3 flex justify-between">
|
||||
<span class="text-sm font-medium text-gray-900"><%= goal_name(goal) %></span>
|
||||
<%= button(to: "/#{URI.encode_www_form(@site.domain)}/goals/#{goal.id}", method: :delete, class: "text-sm text-red-600", data: [confirm: "Are you sure you want to remove goal #{goal_name(goal)}? This will just affect the UI, all of your analytics data will stay intact."]) do %>
|
||||
<svg class="feather feather-sm" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="3 6 5 6 21 6"></polyline><path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"></path><line x1="10" y1="11" x2="10" y2="17"></line><line x1="14" y1="11" x2="14" y2="17"></line></svg>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<% else %>
|
||||
<div class="mt-4">No goals configured for this site yet</div>
|
||||
<% end %>
|
||||
|
||||
<%= link("+ Add goal", to: "/#{URI.encode_www_form(@site.domain)}/goals/new", class: "button mt-6") %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -0,0 +1,25 @@
|
||||
<div class="py-6 px-2 sm:px-6 lg:py-0 lg:px-0 lg:col-span-3">
|
||||
<div class="lg:hidden">
|
||||
<select class="mt-1 form-select block w-full pl-3 pr-10 py-2 text-base leading-6 border-gray-300 focus:outline-none focus:shadow-outline-blue focus:border-blue-300 sm:text-sm sm:leading-5 transition ease-in-out duration-150">
|
||||
<option selected>General</option>
|
||||
|
||||
<option>Password</option>
|
||||
|
||||
<option>Notifications</option>
|
||||
|
||||
<option>Plan</option>
|
||||
|
||||
<option>Billing</option>
|
||||
|
||||
<option>Team Members</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="hidden lg:block">
|
||||
<%= render("_settings_tab.html", current_tab: @tab, this_tab: "general", text: "General", site: @site) %>
|
||||
<%= render("_settings_tab.html", current_tab: @tab, this_tab: "goals", text: "Goals", site: @site) %>
|
||||
<%= render("_settings_tab.html", current_tab: @tab, this_tab: "search-console", text: "Search Console", site: @site) %>
|
||||
<%= render("_settings_tab.html", current_tab: @tab, this_tab: "email-reports", text: "Email reports", site: @site) %>
|
||||
<%= render("_settings_tab.html", current_tab: @tab, this_tab: "custom-domain", text: "Custom domain", site: @site) %>
|
||||
<%= render("_settings_tab.html", current_tab: @tab, this_tab: "js-snippet", text: "JS snippet", site: @site) %>
|
||||
</div>
|
||||
</div>
|
||||
Loading…
Reference in New Issue