-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
258 additions
and
258 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,44 @@ | ||
<% if SupportCategory.none? %> | ||
<div><%= t('search_not_found') %>. <%= link_to t('browse_categories'), help_center.support_categories_path %> <%= t('instead') %> </div> | ||
<% else %> | ||
<div class="px-4 py-10 mb-6 text-white bg-gray-100 text-4xl text-4xl md:px-20 lg:px-40 xl:px-56 font-bold"> | ||
<h1 class="text-gray-900">Documentation</h1> | ||
<p class="text-2xl text-gray-500 font-normal mt-4">Explore our guides and examples</p> | ||
</div> | ||
<div class="px-4 pt-4 md:px-20 lg:px-40 xl:px-56"> | ||
<div class="bg-white shadow overflow-hidden sm:rounded-md"> | ||
<ul role="list" class="divide-y divide-gray-200"> | ||
<% SupportCategory.sorted.each do |category| %> | ||
<li> | ||
<%= link_to help_center.support_category_path(category), class: "block hover:bg-gray-50" do %> | ||
<div class="flex items-center px-4 py-4 sm:px-6"> | ||
<div class="min-w-0 flex-1 flex items-center"> | ||
<div class="flex-shrink-0"> | ||
</div> | ||
<div class="min-w-0 flex-1 px-4 md:grid md:grid-cols-2 md:gap-4"> | ||
<div> | ||
<p class="text-base font-medium text-gray-600 truncate"><%= category.name %></p> | ||
<p class="mt-2 flex items-center text-sm text-gray-400"> | ||
<span class="truncate"><%= category.description %></span> | ||
</p> | ||
</div> | ||
|
||
</div> | ||
</div> | ||
<div> | ||
<!-- Heroicon name: solid/chevron-right --> | ||
<svg class="h-5 w-5 text-gray-400" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true"> | ||
<path fill-rule="evenodd" d="M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z" clip-rule="evenodd" /> | ||
</svg> | ||
</div> | ||
</div> | ||
<% end %> | ||
</li> | ||
<% end %> | ||
</ul> | ||
</div> | ||
</div> | ||
<% end %> | ||
|
||
|
||
|
||
<% if SupportCategory.none? %> | ||
<div><%= t('search_not_found') %>. <%= link_to t('browse_categories'), help_center.support_categories_path %> <%= t('instead') %> </div> | ||
<% else %> | ||
<div class="px-4 py-10 mb-6 text-white bg-gray-100 text-4xl text-4xl md:px-20 lg:px-40 xl:px-56 font-bold"> | ||
<h1 class="text-gray-900">Documentation</h1> | ||
<p class="text-2xl text-gray-500 font-normal mt-4">Explore our guides and examples</p> | ||
</div> | ||
<div class="px-4 pt-4 md:px-20 lg:px-40 xl:px-56"> | ||
<div class="bg-white shadow overflow-hidden sm:rounded-md"> | ||
<ul role="list" class="divide-y divide-gray-200"> | ||
<% SupportCategory.sorted.each do |category| %> | ||
<li> | ||
<%= link_to help_center.support_category_path(category), class: "block hover:bg-gray-50" do %> | ||
<div class="flex items-center px-4 py-4 sm:px-6"> | ||
<div class="min-w-0 flex-1 flex items-center"> | ||
<div class="flex-shrink-0"> | ||
</div> | ||
<div class="min-w-0 flex-1 px-4 md:grid md:grid-cols-2 md:gap-4"> | ||
<div> | ||
<p class="text-base font-medium text-gray-600 truncate"><%= category.name %></p> | ||
<p class="mt-2 flex items-center text-sm text-gray-400"> | ||
<span class="truncate"><%= category.description %></span> | ||
</p> | ||
</div> | ||
|
||
</div> | ||
</div> | ||
<div> | ||
<!-- Heroicon name: solid/chevron-right --> | ||
<svg class="h-5 w-5 text-gray-400" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true"> | ||
<path fill-rule="evenodd" d="M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z" clip-rule="evenodd" /> | ||
</svg> | ||
</div> | ||
</div> | ||
<% end %> | ||
</li> | ||
<% end %> | ||
</ul> | ||
</div> | ||
</div> | ||
<% end %> | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,50 +1,50 @@ | ||
<%= form_for @support_thread, | ||
url: (@support_thread.persisted? ? help_center.support_thread_path(@support_thread) : help_center.support_threads_path), | ||
html: { data: {behavior: "comment-form"} } do |f| %> | ||
<% if @support_thread.errors.any? %> | ||
<div id="error_explanation"> | ||
<h2><%= pluralize(@support_thread.errors.count, "error") %> prohibited this support_thread from being saved:</h2> | ||
<ul> | ||
<% @support_thread.errors.full_messages.each do |message| %> | ||
<li><%= message %></li> | ||
<% end %> | ||
</ul> | ||
</div> | ||
<% end %> | ||
<div class="mb-4"> | ||
<%= f.label :support_category_id, t('choose_a_category'), class: "block text-sm font-medium text-gray-700 sm:mt-px sm:pt-2 mb-2" %> | ||
<%= f.collection_select :support_category_id, SupportCategory.sorted, :id, :name, {include_blank: t('pick_a_category')}, {autofocus: true, class: "shadow-sm focus:ring-indigo-500 focus:border-indigo-500 block w-full sm:text-sm border border-gray-300 rounded-md p-2"} %> | ||
</div> | ||
<div class="mb-4"> | ||
<%= f.label t('title'), class: "block text-sm font-medium text-gray-700 sm:mt-px sm:pt-2 mb-2" %> | ||
<%= f.text_field :title, placeholder: t('how_do_i'), class: "shadow-sm focus:ring-blue-500 focus:border-blue-500 block w-full sm:text-sm border border-gray-300 rounded-md p-2" %> | ||
</div> | ||
<div class="mb-4"> | ||
<%= f.label t('position'), class: "block text-sm font-medium text-gray-700 sm:mt-px sm:pt-2 mb-2" %> | ||
<%= f.text_field :position, type: "number", step: "1", min: "0", class: "shadow-sm focus:ring-blue-500 focus:border-blue-500 block w-full sm:text-sm border border-gray-300 rounded-md p-2" %> | ||
</div> | ||
<div class="mb-4"> | ||
<%= f.label t('content'), class: "block text-sm font-medium text-gray-700 sm:mt-px sm:pt-2 mb-2" %> | ||
<%= f.rich_text_area :content, class: "shadow-sm block w-full focus:ring-blue-500 focus:border-blue-500 sm:text-sm border border-gray-300 rounded-md" %> | ||
</div> | ||
<% if local_assigns.fetch(:posts, true) %> | ||
<% if !f.object.new_record? %> | ||
<%= f.fields_for :support_posts do |p| %> | ||
<div class="mb-4"> | ||
<%= p.label :body, t('what_help_needed'), class: "block text-sm font-medium text-gray-700 sm:mt-px sm:pt-2" %> | ||
<%= p.text_area :body, placeholder: t('add_a_comment'), rows: 10, class: "form-control simplemde", data: { behavior: "comment-body" } %> | ||
</div> | ||
<% end %> | ||
<% end %> | ||
<% end %> | ||
<div class="flex justify-between mb-4 text-right"> | ||
<% if f.object.new_record? %> | ||
<%= f.button t('add'), class: "inline-flex items-center px-4 py-2 border border-transparent text-sm font-medium rounded-md shadow-sm text-white bg-blue-600 hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500", data: {disable_with: "<i class='fa fa-spinner fa-spin'></i> #{t('saving')}"} %> | ||
<% else %> | ||
<%= f.button t('update'), class: "inline-flex items-center px-4 py-2 border border-transparent text-sm font-medium rounded-md shadow-sm text-white bg-blue-600 hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500", data: {disable_with: "<i class='fa fa-spinner fa-spin'></i> #{t('saving')}"} %> | ||
<% end %> | ||
|
||
<%= link_to "Cancel", :back, class: "inline-flex items-center px-4 py-2 border border-transparent text-sm font-medium rounded-md shadow-sm text-white bg-red-600 hover:bg-red-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-red-500" %> | ||
</div> | ||
<% end %> | ||
<%= form_for @support_thread, | ||
url: (@support_thread.persisted? ? help_center.support_thread_path(@support_thread) : help_center.support_threads_path), | ||
html: { data: {behavior: "comment-form"} } do |f| %> | ||
<% if @support_thread.errors.any? %> | ||
<div id="error_explanation"> | ||
<h2><%= pluralize(@support_thread.errors.count, "error") %> prohibited this support_thread from being saved:</h2> | ||
<ul> | ||
<% @support_thread.errors.full_messages.each do |message| %> | ||
<li><%= message %></li> | ||
<% end %> | ||
</ul> | ||
</div> | ||
<% end %> | ||
<div class="mb-4"> | ||
<%= f.label :support_category_id, t('choose_a_category'), class: "block text-sm font-medium text-gray-700 sm:mt-px sm:pt-2 mb-2" %> | ||
<%= f.collection_select :support_category_id, SupportCategory.sorted, :id, :name, {include_blank: t('pick_a_category')}, {autofocus: true, class: "shadow-sm focus:ring-indigo-500 focus:border-indigo-500 block w-full sm:text-sm border border-gray-300 rounded-md p-2"} %> | ||
</div> | ||
<div class="mb-4"> | ||
<%= f.label t('title'), class: "block text-sm font-medium text-gray-700 sm:mt-px sm:pt-2 mb-2" %> | ||
<%= f.text_field :title, placeholder: t('how_do_i'), class: "shadow-sm focus:ring-blue-500 focus:border-blue-500 block w-full sm:text-sm border border-gray-300 rounded-md p-2" %> | ||
</div> | ||
<div class="mb-4"> | ||
<%= f.label t('position'), class: "block text-sm font-medium text-gray-700 sm:mt-px sm:pt-2 mb-2" %> | ||
<%= f.text_field :position, type: "number", step: "1", min: "0", class: "shadow-sm focus:ring-blue-500 focus:border-blue-500 block w-full sm:text-sm border border-gray-300 rounded-md p-2" %> | ||
</div> | ||
<div class="mb-4"> | ||
<%= f.label t('content'), class: "block text-sm font-medium text-gray-700 sm:mt-px sm:pt-2 mb-2" %> | ||
<%= f.rich_text_area :content, class: "shadow-sm block w-full focus:ring-blue-500 focus:border-blue-500 sm:text-sm border border-gray-300 rounded-md" %> | ||
</div> | ||
<% if local_assigns.fetch(:posts, true) %> | ||
<% if !f.object.new_record? %> | ||
<%= f.fields_for :support_posts do |p| %> | ||
<div class="mb-4"> | ||
<%= p.label :body, t('what_help_needed'), class: "block text-sm font-medium text-gray-700 sm:mt-px sm:pt-2" %> | ||
<%= p.text_area :body, placeholder: t('add_a_comment'), rows: 10, class: "form-control simplemde", data: { behavior: "comment-body" } %> | ||
</div> | ||
<% end %> | ||
<% end %> | ||
<% end %> | ||
<div class="flex justify-between mb-4 text-right"> | ||
<% if f.object.new_record? %> | ||
<%= f.button t('add'), class: "inline-flex items-center px-4 py-2 border border-transparent text-sm font-medium rounded-md shadow-sm text-white bg-blue-600 hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500", data: {disable_with: "<i class='fa fa-spinner fa-spin'></i> #{t('saving')}"} %> | ||
<% else %> | ||
<%= f.button t('update'), class: "inline-flex items-center px-4 py-2 border border-transparent text-sm font-medium rounded-md shadow-sm text-white bg-blue-600 hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500", data: {disable_with: "<i class='fa fa-spinner fa-spin'></i> #{t('saving')}"} %> | ||
<% end %> | ||
|
||
<%= link_to "Cancel", :back, class: "inline-flex items-center px-4 py-2 border border-transparent text-sm font-medium rounded-md shadow-sm text-white bg-red-600 hover:bg-red-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-red-500" %> | ||
</div> | ||
<% end %> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
<div class="px-4 py-10 mb-6 text-white bg-gray-100 text-4xl text-4xl md:px-20 lg:px-40 xl:px-56 font-bold"> | ||
<h1 class="text-gray-900"><%= t('add_article') %></h1> | ||
</div> | ||
|
||
<div class="px-4 pt-4 md:px-20 lg:px-40 xl:px-56"> | ||
<div class="max-w-5xl text-gray-700"> | ||
<%= render 'form' %> | ||
</div> | ||
</div> | ||
<div class="px-4 py-10 mb-6 text-white bg-gray-100 text-4xl text-4xl md:px-20 lg:px-40 xl:px-56 font-bold"> | ||
<h1 class="text-gray-900"><%= t('add_article') %></h1> | ||
</div> | ||
|
||
<div class="px-4 pt-4 md:px-20 lg:px-40 xl:px-56"> | ||
<div class="max-w-5xl text-gray-700"> | ||
<%= render 'form' %> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
|
||
<%= render partial: "shared/thread_actions" if is_moderator_or_owner?(@support_thread)%> | ||
|
||
<div class="px-4 py-10 mb-6 text-white bg-gray-100 text-4xl text-4xl md:px-20 lg:px-40 xl:px-56 font-bold"> | ||
<p class="text-sm font-normal text-gray-400 mb-4"><%= link_to @support_thread.support_category.name, help_center.support_category_path(@support_thread.support_category) %> / <%= @support_thread.title %></p> | ||
<h1 class="text-gray-900"><%= @support_thread.title %></h1> | ||
</div> | ||
<div class="px-4 pt-4 md:px-20 lg:px-40 xl:px-56"> | ||
<div class="max-w-5xl text-gray-700"> | ||
<div class="mb-10"> | ||
<p class="leading-normal mb-4"><%= @support_thread.content %></p> | ||
</div> | ||
</div> | ||
|
||
<%= render partial: "shared/thread_actions" if is_moderator_or_owner?(@support_thread)%> | ||
|
||
<div class="px-4 py-10 mb-6 text-white bg-gray-100 text-4xl text-4xl md:px-20 lg:px-40 xl:px-56 font-bold"> | ||
<p class="text-sm font-normal text-gray-400 mb-4"><%= link_to @support_thread.support_category.name, help_center.support_category_path(@support_thread.support_category) %> / <%= @support_thread.title %></p> | ||
<h1 class="text-gray-900"><%= @support_thread.title %></h1> | ||
</div> | ||
<div class="px-4 pt-4 md:px-20 lg:px-40 xl:px-56"> | ||
<div class="max-w-5xl text-gray-700"> | ||
<div class="mb-10"> | ||
<p class="leading-normal mb-4"><%= @support_thread.content %></p> | ||
</div> | ||
</div> | ||
</div> |
Oops, something went wrong.