first load
Some checks failed
Build, Push, Publish / Build & Release (push) Failing after 2s
Sync Repo / sync (push) Failing after 2s

This commit is contained in:
2025-12-16 04:40:00 -03:00
parent 9f33a94e0e
commit 6fa41a771d
856 changed files with 70411 additions and 1 deletions

View File

@@ -0,0 +1,20 @@
<div class="container-divider"></div>
<div class="container">
<div id="main-content">
<div id="approval-request-list"></div>
</div>
</div>
<script type="module">
import { renderApprovalRequestList } from "approval-requests";
const settings = {{json settings}};
const helpCenterPath ={{json (page_path "help_center")}};
const container = document.getElementById("approval-request-list");
const props = {
baseLocale: {{json help_center.base_locale}},
}
renderApprovalRequestList(container, settings, props, helpCenterPath);
</script>

View File

@@ -0,0 +1,27 @@
<div class="container-divider"></div>
<div class="container">
<div id="main-content">
<div id="approval-request"></div>
</div>
</div>
<script type="module">
import { renderApprovalRequest } from "approval-requests";
const settings = {{json settings}};
const helpCenterPath ={{json (page_path "help_center")}};
const container = document.getElementById("approval-request");
// Extract the ID from the URL
const id = window.location.pathname.split("/").pop()
const props = {
baseLocale: {{json help_center.base_locale}},
approvalWorkflowInstanceId: id,
approvalRequestId: id,
organizations: {{json user.organizations}},
userId: {{json user.id}},
}
renderApprovalRequest(container, settings, props, helpCenterPath);
</script>

329
templates/article_page.hbs Normal file
View File

@@ -0,0 +1,329 @@
<div class="container-divider"></div>
<div class="container">
<div class="sub-nav">
{{breadcrumbs}}
<div class="search-container">
<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" focusable="false" viewBox="0 0 12 12" class="search-icon" aria-hidden="true">
<circle cx="4.5" cy="4.5" r="4" fill="none" stroke="currentColor"/>
<path stroke="currentColor" stroke-linecap="round" d="M11 11L7.5 7.5"/>
</svg>
{{search scoped=settings.scoped_kb_search submit=false}}
</div>
</div>
<div class="article-container" id="article-container">
<aside class="article-sidebar" aria-labelledby="section-articles-title">
{{#if settings.show_articles_in_section}}
<div class="collapsible-sidebar">
<button type="button" class="collapsible-sidebar-toggle" aria-labelledby="section-articles-title" aria-expanded="false">
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" focusable="false" viewBox="0 0 12 12" aria-hidden="true" class="collapsible-sidebar-toggle-icon chevron-icon">
<path fill="none" stroke="currentColor" stroke-linecap="round" d="M3 4.5l2.6 2.6c.2.2.5.2.7 0L9 4.5"/>
</svg>
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" focusable="false" viewBox="0 0 12 12" aria-hidden="true" class="collapsible-sidebar-toggle-icon x-icon">
<path stroke="currentColor" stroke-linecap="round" d="M3 9l6-6m0 6L3 3"/>
</svg>
</button>
<span id="section-articles-title" class="collapsible-sidebar-title sidenav-title">
{{t 'articles_in_section'}}
</span>
<div class="collapsible-sidebar-body">
<ul>
{{#each section.articles}}
<li>
<a href="{{url}}"
class="sidenav-item {{#is id ../article.id}}current-article{{/is}}"
{{#is id ../article.id}}aria-current="page"{{/is}}>
{{title}}
</a>
</li>
{{/each}}
</ul>
{{#if section.more_articles}}
<a href="{{section.url}}" class="article-sidebar-item">{{t 'see_more'}}</a>
{{/if}}
</div>
</div>
{{/if}}
</aside>
<article id="main-content" class="article">
<header class="article-header">
<h1 title="{{article.title}}" class="article-title">
{{article.title}}
{{#if article.internal}}
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" focusable="false" viewBox="0 0 16 16" class="icon-lock" title="{{t 'internal'}}">
<rect width="12" height="9" x="2" y="7" fill="currentColor" rx="1" ry="1"/>
<path fill="none" stroke="currentColor" d="M4.5 7.5V4a3.5 3.5 0 017 0v3.5"/>
</svg>
{{/if}}
</h1>
<div class="article-author">
{{#if settings.show_article_author}}
<div class="avatar article-avatar">
{{#if article.author.agent}}
<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" focusable="false" aria-hidden="true" viewBox="0 0 12 12" class="icon-agent" aria-label="{{t 'team_member' name=article.author.name}}">
<path fill="currentColor" d="M6 0C2.7 0 0 2.7 0 6s2.7 6 6 6 6-2.7 6-6-2.7-6-6-6zm0 2c1.1 0 2 .9 2 2s-.9 2-2 2-2-.9-2-2 .9-2 2-2zm2.3 7H3.7c-.3 0-.4-.3-.3-.5C3.9 7.6 4.9 7 6 7s2.1.6 2.6 1.5c.1.2 0 .5-.3.5z"/>
</svg>
{{/if}}
<img src="{{article.author.avatar_url}}" alt="" class="user-avatar"/>
</div>
{{/if}}
<div class="article-meta">
{{#if settings.show_article_author}}
{{#link 'user_profile' id=article.author.id}}
{{article.author.name}}
{{/link}}
{{/if}}
<div class="meta-group">
{{#is article.created_at article.edited_at}}
<span class="meta-data">{{date article.created_at timeago=true}}</span>
{{else}}
<span class="meta-data">{{date article.edited_at timeago=true}}</span>
<span class="meta-data">{{t 'updated'}}</span>
{{/is}}
</div>
</div>
</div>
{{#if settings.show_follow_article}}
<div class="article-subscribe">{{subscribe}}</div>
{{/if}}
</header>
<section class="article-info">
<div class="article-content">
<div class="article-body">{{article.body}}</div>
{{#if (compare article.content_tags.length ">" 0)}}
<section class="content-tags">
<p>{{t 'content_tags_label'}}</p>
<ul class="content-tag-list">
{{#each article.content_tags}}
<li class="content-tag-item" data-content-tag-id="{{id}}">
{{#link "search_result" content_tag_id=id}}
{{name}}
{{/link}}
</li>
{{/each}}
</ul>
</section>
{{/if}}
{{#if attachments}}
<div class="article-attachments">
<ul class="attachments">
{{#each attachments}}
<li class="attachment-item">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" focusable="false" viewBox="0 0 16 16" class="attachment-icon">
<path fill="none" stroke="currentColor" stroke-linecap="round" d="M9.5 4v7.7c0 .8-.7 1.5-1.5 1.5s-1.5-.7-1.5-1.5V3C6.5 1.6 7.6.5 9 .5s2.5 1.1 2.5 2.5v9c0 1.9-1.6 3.5-3.5 3.5S4.5 13.9 4.5 12V4"/>
</svg>
<a href="{{url}}" target="_blank">{{name}}</a>
<div class="attachment-meta meta-group">
<span class="attachment-meta-item meta-data">{{size}}</span>
<a href="{{url}}" target="_blank" class="attachment-meta-item meta-data">{{t 'download'}}</a>
</div>
</li>
{{/each}}
</ul>
</div>
{{/if}}
</div>
</section>
<footer>
<div class="article-footer">
{{#if settings.show_article_sharing}}
<div class="article-share">{{share}}</div>
{{/if}}
{{#if settings.show_article_comments}}
{{#if comments}}
<a href="#article-comments" class="article-comment-count">
<svg role="img" aria-labelledby="article-comments-title article-comments-desc" xmlns="http://www.w3.org/2000/svg" width="12" height="12" focusable="false" viewBox="0 0 12 12" class="article-comment-count-icon">
<title id="article-comments-title">{{t 'go_to_comments'}}</title>
<desc id="article-comments-desc">{{t 'comments_count' count=article.comment_count}}</desc>
<path fill="none" stroke="currentColor" d="M1 .5h10c.3 0 .5.2.5.5v7c0 .3-.2.5-.5.5H6l-2.6 2.6c-.3.3-.9.1-.9-.4V8.5H1C.7 8.5.5 8.3.5 8V1C.5.7.7.5 1 .5z"/>
</svg>
<span aria-hidden="true">{{article.comment_count}}</span>
</a>
{{/if}}
{{/if}}
</div>
{{#with article}}
<div class="article-votes">
<h2 class="article-votes-question" id="article-votes-label">{{t 'was_this_article_helpful'}}</h2>
<div class="article-votes-controls" role="group" aria-labelledby="article-votes-label">
{{vote 'up' class='button article-vote article-vote-up' selected_class="button-primary"}}
{{vote 'down' class='button article-vote article-vote-down' selected_class="button-primary"}}
</div>
<small class="article-votes-count">
{{vote 'label' class='article-vote-label'}}
</small>
</div>
{{/with}}
<div class="article-more-questions">
{{request_callout}}
</div>
<div class="article-return-to-top">
<a href="#article-container">
{{t 'return_to_top'}}
<svg xmlns="http://www.w3.org/2000/svg" class="article-return-to-top-icon" width="20" height="20" focusable="false" viewBox="0 0 12 12" aria-hidden="true">
<path fill="none" stroke="currentColor" stroke-linecap="round" d="M3 4.5l2.6 2.6c.2.2.5.2.7 0L9 4.5"/>
</svg>
</a>
</div>
</footer>
<div class="article-relatives">
{{#if settings.show_recently_viewed_articles}}
{{recent_articles}}
{{/if}}
{{#if settings.show_related_articles}}
{{related_articles}}
{{/if}}
</div>
{{#if settings.show_article_comments}}
<div class="article-comments" id="article-comments">
<section class="comments">
<header class="comment-overview">
<h2 class="comment-heading">
{{t 'comments'}}
</h2>
<p class="comment-callout">{{t 'comments_count' count=article.comment_count}}</p>
{{#if comments}}
<div class="dropdown comment-sorter">
<button class="dropdown-toggle" aria-haspopup="true" aria-expanded="false">
{{t 'sort_by'}}
<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" focusable="false" viewBox="0 0 12 12" class="dropdown-chevron-icon" aria-hidden="true">
<path fill="none" stroke="currentColor" stroke-linecap="round" d="M3 4.5l2.6 2.6c.2.2.5.2.7 0L9 4.5"/>
</svg>
</button>
<span class="dropdown-menu" role="menu">
{{#each comment_sorters}}
<a aria-checked="{{selected}}" href="{{url}}" role="menuitemradio">{{name}}</a>
{{/each}}
</span>
</div>
{{/if}}
</header>
<ul id="comments" class="comment-list">
{{#each comments}}
<li id="{{anchor}}" class="comment">
<div class="comment-wrapper">
<div class="comment-info">
<div class="comment-author">
<div class="avatar comment-avatar">
{{#if author.agent}}
<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" focusable="false" aria-hidden="true" viewBox="0 0 12 12" class="icon-agent" aria-label="{{t 'team_member' name=author.name}}">
<path fill="currentColor" d="M6 0C2.7 0 0 2.7 0 6s2.7 6 6 6 6-2.7 6-6-2.7-6-6-6zm0 2c1.1 0 2 .9 2 2s-.9 2-2 2-2-.9-2-2 .9-2 2-2zm2.3 7H3.7c-.3 0-.4-.3-.3-.5C3.9 7.6 4.9 7 6 7s2.1.6 2.6 1.5c.1.2 0 .5-.3.5z"/>
</svg>
{{/if}}
<img src="{{author.avatar_url}}" alt="" class="user-avatar"/>
</div>
<div class="comment-meta">
<span title="{{author.name}}" id="{{anchor}}-author">
{{#link 'user_profile' id=author.id}}
{{author.name}}
{{/link}}
</span>
<ul aria-label="{{t 'badges'}}" class="community-badge-titles">
{{#each (filter author.badges on="category_slug" equals="titles")}}
<li class="community-badge community-badge-title" title="{{description}}" aria-label="{{name}}">
{{name}}
</li>
{{/each}}
</ul>
<div class="meta-group meta-group-opposite">
{{#if editor}}
<span class="meta-data">{{date edited_at timeago=true}}</span>
<span class="meta-data">{{t 'edited'}}</span>
{{else}}
<span class="meta-data">{{date created_at timeago=true}}</span>
{{/if}}
</div>
<ul aria-label="{{t 'badges'}}" class="community-badge-achievements">
{{#each (slice (filter author.badges on="category_slug" equals="achievements") 0 4)}}
<li class="community-badge community-badge-achievement">
<img src="{{icon_url}}" alt="{{name}}" title="{{name}} | {{description}}" />
</li>
{{/each}}
{{#if (compare (calc author.badges.length "-" 4) ">" 0)}}
<li class="community-badge community-badge-achievement">
<a href="{{page_path "user_profile" id=author.id filter_by="badges"}}" class="community-badge-achievements-rest" aria-label="{{t 'more_awards_to' count=(calc author.badges.length "-" 4) name=author.name}}">
{{t 'plus_more' count=(calc author.badges.length "-" 4)}}
</a>
</li>
{{/if}}
</ul>
</div>
<div class="comment-labels">
{{#with ticket}}
<a href="{{url}}" target="_zendesk_lotus" class="status-label escalation-badge">
{{t 'request'}}{{id}}
</a>
{{/with}}
{{#if pending}}
<span class="comment-pending status-label status-label-pending-moderation">{{t 'pending_approval'}}</span>
{{/if}}
</div>
</div>
<section class="comment-body" id="{{anchor}}-body">{{body}}</section>
</div>
<div class="comment-actions-container">
<div class="comment-vote vote" role="group">
{{#vote 'up' role='radio' class='vote-up' selected_class='vote-voted' aria-describedby=(concat anchor "-author " anchor "-body")}}
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" focusable="false" viewBox="0 0 16 16">
<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M4 6.5l3.6 3.6c.2.2.5.2.7 0L12 6.5"/>
</svg>
{{/vote}}
{{vote 'sum' class='vote-sum'}}
{{#vote 'down' role='radio' class='vote-down' selected_class='vote-voted' aria-describedby=(concat anchor "-author " anchor "-body")}}
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" focusable="false" viewBox="0 0 16 16">
<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M4 6.5l3.6 3.6c.2.2.5.2.7 0L12 6.5"/>
</svg>
{{/vote}}
</div>
<div class="comment-actions actions">
{{#actions}}
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" focusable="false" viewBox="0 0 16 16">
<path fill="none" stroke="currentColor" d="M13.17 3.07l-1.64.71c-.48-.4-1.03-.72-1.63-.94l-.22-1.79a.511.511 0 00-.4-.44C8.86.54 8.44.5 8 .5c-.44 0-.86.04-1.28.11-.22.04-.38.22-.4.44l-.21 1.79c-.6.22-1.15.54-1.63.94l-1.65-.71a.491.491 0 00-.58.13c-.55.65-.99 1.4-1.29 2.21-.08.21 0 .44.18.58l1.45 1.08a4.91 4.91 0 000 1.87l-1.45 1.08c-.18.13-.25.37-.18.58.3.81.74 1.55 1.28 2.2.14.17.38.22.58.13l1.65-.71c.48.4 1.03.72 1.63.94l.21 1.79c.03.22.19.4.4.44.43.07.85.11 1.29.11.44 0 .86-.04 1.28-.11.22-.04.38-.22.4-.44l.21-1.79c.6-.22 1.15-.54 1.63-.94l1.65.71c.2.09.44.04.58-.13.54-.65.98-1.39 1.28-2.2.08-.21 0-.44-.18-.57L13.4 8.95c.07-.32.1-.63.1-.95s-.03-.63-.09-.94l1.45-1.08c.18-.13.25-.37.18-.58-.3-.81-.74-1.55-1.28-2.2a.51.51 0 00-.59-.13z"/>
<circle cx="8" cy="8" r="2.5" fill="none" stroke="currentColor"/>
</svg>
{{/actions}}
</div>
</div>
</div>
</li>
{{/each}}
</ul>
{{pagination}}
{{#form 'comment' class='comment-form hbs-form'}}
<div class="avatar comment-avatar">
{{user_avatar class='user-avatar'}}
</div>
<div class="comment-container">
{{wysiwyg 'body'}}
<div class="comment-form-controls">
{{input type='submit' class="button button-large"}}
</div>
</div>
{{/form}}
<p class="comment-callout">{{comment_callout}}</p>
</section>
</div>
{{/if}}
</article>
</div>
</div>

View File

@@ -0,0 +1,63 @@
<div class="container-divider"></div>
<div class="container">
<div class="sub-nav">
{{breadcrumbs}}
<div class="search-container">
<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" focusable="false" viewBox="0 0 12 12" class="search-icon" aria-hidden="true">
<circle cx="4.5" cy="4.5" r="4" fill="none" stroke="currentColor"/>
<path stroke="currentColor" stroke-linecap="round" d="M11 11L7.5 7.5"/>
</svg>
{{search scoped=settings.scoped_kb_search submit=false}}
</div>
</div>
<div class="category-container">
<div class="category-content">
<header class="page-header">
<h1>{{category.name}}</h1>
{{#if category.description}}
<p class="page-header-description">{{category.description}}</p>
{{/if}}
</header>
<div id="main-content" class="section-tree">
{{#each sections}}
<section class="section">
<h2 class="section-tree-title">
<a href="{{url}}">{{name}}</a>
</h2>
{{#if articles}}
<ul class="article-list">
{{#each articles}}
<li class="article-list-item{{#if promoted}} article-promoted{{/if}}">
{{#if promoted}}
<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" focusable="false" viewBox="0 0 12 12" class="icon-star" title="{{t 'promoted'}}">
<path fill="currentColor" d="M2.88 11.73c-.19 0-.39-.06-.55-.18a.938.938 0 01-.37-1.01l.8-3L.35 5.57a.938.938 0 01-.3-1.03c.12-.37.45-.63.85-.65L4 3.73 5.12.83c.14-.37.49-.61.88-.61s.74.24.88.6L8 3.73l3.11.17a.946.946 0 01.55 1.68L9.24 7.53l.8 3a.95.95 0 01-1.43 1.04L6 9.88l-2.61 1.69c-.16.1-.34.16-.51.16z"/>
</svg>
{{/if}}
<a href="{{url}}" class="article-list-link">{{title}}</a>
{{#if internal}}
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" focusable="false" viewBox="0 0 16 16" class="icon-lock" title="{{t 'internal'}}">
<rect width="12" height="9" x="2" y="7" fill="currentColor" rx="1" ry="1"/>
<path fill="none" stroke="currentColor" d="M4.5 7.5V4a3.5 3.5 0 017 0v3.5"/>
</svg>
{{/if}}
</li>
{{/each}}
</ul>
{{#if more_articles}}
<a href="{{url}}" class="see-all-articles">
{{t 'show_all_articles' count=article_count}}
</a>
{{/if}}
{{/if}}
</section>
{{else}}
<i class="category-empty">
<a href="{{category.url}}">{{t 'empty'}}</a>
</i>
{{/each}}
</div>
</div>
</div>
</div>

View File

@@ -0,0 +1,158 @@
<h1 class="visibility-hidden">{{ t 'community'}}</h1>
<section class="section hero community-hero">
<h2 class="visibility-hidden">{{ t 'search'}}</h2>
<div class="hero-inner">
<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" focusable="false" viewBox="0 0 12 12" class="search-icon" aria-hidden="true">
<circle cx="4.5" cy="4.5" r="4" fill="none" stroke="currentColor"/>
<path stroke="currentColor" stroke-linecap="round" d="M11 11L7.5 7.5"/>
</svg>
{{search submit=false class='search search-full' scoped=settings.scoped_community_search}}
</div>
</section>
<div class="container">
<div class="sub-nav">
{{breadcrumbs}}
</div>
<header class="page-header community-header">
<span class="dropdown">
<button class="dropdown-toggle" aria-haspopup="true" aria-expanded="false">
<h2 class="title">
{{t 'all_posts'}}
</h2>
<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" focusable="false" viewBox="0 0 12 12" class="dropdown-chevron-icon" aria-hidden="true">
<path fill="none" stroke="currentColor" stroke-linecap="round" d="M3 4.5l2.6 2.6c.2.2.5.2.7 0L9 4.5"/>
</svg>
</button>
<span class="dropdown-menu" role="menu">
{{#link 'topics' role='menuitemradio'}}
{{t 'show_topics'}}
{{/link}}
{{#link 'posts' role='menuitemradio' aria-checked='true'}}
{{t 'show_all_posts'}}
{{/link}}
</span>
</span>
<span class="post-to-community">
{{link 'new_post' class='button button-large'}}
</span>
</header>
<div class="topic-header">
<span class="topic-filters">
<span class="dropdown">
<button class="dropdown-toggle" aria-haspopup="true" aria-expanded="false">
{{current_filter.label}}
<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" focusable="false" viewBox="0 0 12 12" class="dropdown-chevron-icon" aria-hidden="true">
<path fill="none" stroke="currentColor" stroke-linecap="round" d="M3 4.5l2.6 2.6c.2.2.5.2.7 0L9 4.5"/>
</svg>
</button>
<span class="dropdown-menu" role="menu">
{{#each filters}}
<a href="{{url}}" aria-checked="{{selected}}" role="menuitemradio">
{{name}}
</a>
{{/each}}
</span>
</span>
<span class="dropdown">
<button class="dropdown-toggle" aria-haspopup="true" aria-expanded="false">
{{current_sorter.label}}
<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" focusable="false" viewBox="0 0 12 12" class="dropdown-chevron-icon" aria-hidden="true">
<path fill="none" stroke="currentColor" stroke-linecap="round" d="M3 4.5l2.6 2.6c.2.2.5.2.7 0L9 4.5"/>
</svg>
</button>
<span class="dropdown-menu" role="menu">
{{#each sorters}}
<a href="{{url}}" aria-checked="{{selected}}" role="menuitemradio">
{{name}}
</a>
{{/each}}
</span>
</span>
</span>
</div>
<div id="main-content" class="posts-list striped-list">
{{#if posts}}
<ul>
{{#each posts}}
<li>
<section role="region" aria-labelledby="title-{{id}}" class="striped-list-item {{#if featured}}post-featured{{/if}}">
<span class="striped-list-info">
<a href="{{url}}" id="title-{{id}}" class="striped-list-title">{{title}}</a>
<span class="post-overview-item">
{{#if pinned}}
<span class="status-label status-label-pinned">{{t 'pinned'}}</span>
{{/if}}
{{#if featured}}
<span class="status-label status-label-featured">{{t 'featured'}}</span>
{{/if}}
{{#is status 'none'}}
{{else}}
<span class="status-label-{{status_dasherized}} status-label striped-list-status">{{status_name}}</span>
{{/is}}
</span>
<div class="meta-group">
<span class="meta-data">{{author.name}}</span>
{{#if editor}}
<span class="meta-data">{{date edited_at timeago=true}}</span>
<span class="meta-data">{{t 'edited'}}</span>
{{else}}
<span class="meta-data">{{date created_at timeago=true}}</span>
{{/if}}
</div>
</span>
<div class="post-overview-count striped-list-count">
<span class="striped-list-count-item">
<span class="striped-list-number">{{vote_sum}}</span>
{{t 'vote' count=vote_sum}}
</span>
<span class="striped-list-count-item">
<span class="striped-list-number">{{comment_count}}</span>
{{t 'comment' count=comment_count}}
</span>
</div>
</section>
</li>
{{/each}}
</ul>
{{else}}
<div class="no-posts-with-filter">{{t 'no_posts_with_filter'}}</div>
{{/if}}
</div>
{{pagination}}
{{#if featured_posts}}
<section class="section community-featured-posts">
<h2 class="title">{{t 'featured_posts'}}</h2>
<ul class="promoted-articles">
{{#each featured_posts}}
<li class="promoted-articles-item">
<a href="{{url}}">
{{title}}
</a>
</li>
{{/each}}
</ul>
</section>
{{/if}}
<section class="community-activity activity">
{{#if help_center.community_enabled}}
{{recent_activity scope='community'}}
{{/if}}
</section>
<section class="container community-footer">
<h2 class="community-footer-title">{{t 'suggest_new_post'}}</h2>
{{link 'new_post' class='button button-large'}}
</section>
</div>

View File

@@ -0,0 +1,331 @@
<div class="container-divider"></div>
<div class="container">
<div class="sub-nav">
{{breadcrumbs}}
<div class="search-container">
<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" focusable="false" viewBox="0 0 12 12" class="search-icon" aria-hidden="true">
<circle cx="4.5" cy="4.5" r="4" fill="none" stroke="currentColor"/>
<path stroke="currentColor" stroke-linecap="round" d="M11 11L7.5 7.5"/>
</svg>
{{search scoped=settings.scoped_community_search submit=false}}
</div>
</div>
<div class="post-container">
<div class="post">
<article id="main-content">
<div class="post-header">
<div class="post-title">
<h1 title="{{post.title}}">
{{post.title}}
{{#if post.internal}}
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" focusable="false" viewBox="0 0 16 16" class="icon-lock" title="{{t 'internal'}}">
<rect width="12" height="9" x="2" y="7" fill="currentColor" rx="1" ry="1"/>
<path fill="none" stroke="currentColor" d="M4.5 7.5V4a3.5 3.5 0 017 0v3.5"/>
</svg>
{{/if}}
</h1>
{{#if post.pinned}}
<span class="status-label status-label-pinned">{{t 'pinned'}}</span>
{{/if}}
{{#if post.featured}}
<span class="status-label status-label-featured">{{t 'featured'}}</span>
{{/if}}
{{#is post.status 'none'}}
{{else}}
<span class="status-label-{{post.status_dasherized}} status-label">{{post.status_name}}</span>
{{/is}}
</div>
{{#if settings.show_follow_post}}
<div class="community-follow">
{{subscribe}}
</div>
{{/if}}
</div>
<section class="post-info-container">
<div class="post-info">
<div class="post-author">
<div class="avatar post-avatar">
{{#if post.author.agent}}
<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" focusable="false" aria-hidden="true" viewBox="0 0 12 12" class="icon-agent" aria-label="{{t 'team_member' name=post.author.name}}">
<path fill="currentColor" d="M6 0C2.7 0 0 2.7 0 6s2.7 6 6 6 6-2.7 6-6-2.7-6-6-6zm0 2c1.1 0 2 .9 2 2s-.9 2-2 2-2-.9-2-2 .9-2 2-2zm2.3 7H3.7c-.3 0-.4-.3-.3-.5C3.9 7.6 4.9 7 6 7s2.1.6 2.6 1.5c.1.2 0 .5-.3.5z"/>
</svg>
{{/if}}
<img src="{{post.author.avatar_url}}" alt="" class="user-avatar"/>
</div>
<div class="post-meta">
<span title="{{post.author.name}}">
{{#link 'user_profile' id=post.author.id}}
{{post.author.name}}
{{/link}}
</span>
<ul aria-label="{{t 'badges'}}" class="community-badge-titles">
{{#each (filter post.author.badges on="category_slug" equals="titles")}}
<li class="community-badge community-badge-title" title="{{description}}" aria-label="{{name}}">
{{name}}
</li>
{{/each}}
</ul>
<div class="meta-group meta-group-opposite">
{{#if post.editor}}
<span class="meta-data">{{date post.edited_at timeago=true}}</span>
<span class="meta-data">{{t 'edited'}}</span>
{{else}}
<span class="meta-data">{{date post.created_at timeago=true}}</span>
{{/if}}
</div>
<ul aria-label="{{t 'badges'}}" class="community-badge-achievements">
{{#each (slice (filter post.author.badges on="category_slug" equals="achievements") 0 4)}}
<li class="community-badge community-badge-achievement">
<img src="{{icon_url}}" alt="{{name}}" title="{{name}} | {{description}}" />
</li>
{{/each}}
{{#if (compare (calc post.author.badges.length "-" 4) ">" 0)}}
<li class="community-badge community-badge-achievement">
<a href="{{page_path "user_profile" id=post.author.id filter_by="badges"}}" class="community-badge-achievements-rest" aria-label="{{t 'more_awards_to' count=(calc post.author.badges.length "-" 4) name=post.author.name}}">
{{t 'plus_more' count=(calc post.author.badges.length "-" 4)}}
</a>
</li>
{{/if}}
</ul>
</div>
{{#if post.pending}}
<span class="status-label status-label-pending-moderation">{{t 'pending_approval'}}</span>
{{/if}}
{{#with post.ticket}}
<a href="{{url}}" target="_zendesk_lotus" class="status-label escalation-badge">
{{t 'request'}}{{id}}
</a>
{{/with}}
</div>
<div class="post-content">
<div class="post-body">{{post.details}}</div>
</div>
{{#if (compare post.content_tags.length ">" 0)}}
<section class="content-tags">
<p>{{t 'content_tags_label'}}</p>
<ul class="content-tag-list">
{{#each post.content_tags}}
<li class="content-tag-item" data-content-tag-id="{{id}}">
{{#link "search_result" content_tag_id=id}}
{{name}}
{{/link}}
</li>
{{/each}}
</ul>
</section>
{{/if}}
</div>
<div class="post-actions-wrapper">
<div class="post-vote vote" role="group">
{{#with post}}
{{#vote 'up' role='radio' class='vote-up' selected_class='vote-voted'}}
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" focusable="false" viewBox="0 0 16 16">
<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M4 6.5l3.6 3.6c.2.2.5.2.7 0L12 6.5"/>
</svg>
{{/vote}}
{{vote 'sum' class='vote-sum'}}
{{#vote 'down' role='radio' class='vote-down' selected_class='vote-voted'}}
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" focusable="false" viewBox="0 0 16 16">
<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M4 6.5l3.6 3.6c.2.2.5.2.7 0L12 6.5"/>
</svg>
{{/vote}}
{{/with}}
</div>
<div class="post-actions actions">
{{#post.actions}}
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" focusable="false" viewBox="0 0 16 16">
<path fill="none" stroke="currentColor" d="M13.17 3.07l-1.64.71c-.48-.4-1.03-.72-1.63-.94l-.22-1.79a.511.511 0 00-.4-.44C8.86.54 8.44.5 8 .5c-.44 0-.86.04-1.28.11-.22.04-.38.22-.4.44l-.21 1.79c-.6.22-1.15.54-1.63.94l-1.65-.71a.491.491 0 00-.58.13c-.55.65-.99 1.4-1.29 2.21-.08.21 0 .44.18.58l1.45 1.08a4.91 4.91 0 000 1.87l-1.45 1.08c-.18.13-.25.37-.18.58.3.81.74 1.55 1.28 2.2.14.17.38.22.58.13l1.65-.71c.48.4 1.03.72 1.63.94l.21 1.79c.03.22.19.4.4.44.43.07.85.11 1.29.11.44 0 .86-.04 1.28-.11.22-.04.38-.22.4-.44l.21-1.79c.6-.22 1.15-.54 1.63-.94l1.65.71c.2.09.44.04.58-.13.54-.65.98-1.39 1.28-2.2.08-.21 0-.44-.18-.57L13.4 8.95c.07-.32.1-.63.1-.95s-.03-.63-.09-.94l1.45-1.08c.18-.13.25-.37.18-.58-.3-.81-.74-1.55-1.28-2.2a.51.51 0 00-.59-.13z"/>
<circle cx="8" cy="8" r="2.5" fill="none" stroke="currentColor"/>
</svg>
{{/post.actions}}
</div>
</div>
</section>
{{#if settings.show_post_sharing}}
<footer class="post-footer">
<div class="post-share">{{share}}</div>
{{#if comments}}
<a href="#comment-overview" class="post-comment-count">
<svg role="img" aria-labelledby="post-comments-title post-comments-desc" xmlns="http://www.w3.org/2000/svg" width="12" height="12" focusable="false" viewBox="0 0 12 12" class="icon-comments">
<title id="post-comments-title">{{t 'go_to_comments'}}</title>
<desc id="post-comments-desc">{{t 'comments_count' count=post.comment_count}}</desc>
<path fill="none" stroke="currentColor" d="M1 .5h10c.3 0 .5.2.5.5v7c0 .3-.2.5-.5.5H6l-2.6 2.6c-.3.3-.9.1-.9-.4V8.5H1C.7 8.5.5 8.3.5 8V1C.5.7.7.5 1 .5z"/>
</svg>
<span aria-hidden="true">{{post.comment_count}}</span>
</a>
{{/if}}
</footer>
{{/if}}
</article>
<section class="comment-overview" id="comment-overview">
<h2 class="comment-heading">
{{t 'comments'}}
</h2>
<p class="comment-callout">{{t 'comments_count' count=post.comment_count}}</p>
{{#if comments}}
<div class="dropdown comment-sorter">
<button class="dropdown-toggle" aria-haspopup="true" aria-expanded="false">
{{t 'sort_by'}}
<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" focusable="false" viewBox="0 0 12 12" class="dropdown-chevron-icon" aria-hidden="true">
<path fill="none" stroke="currentColor" stroke-linecap="round" d="M3 4.5l2.6 2.6c.2.2.5.2.7 0L9 4.5"/>
</svg>
</button>
<span class="dropdown-menu" role="menu">
{{#each comment_sorters}}
<a aria-checked="{{selected}}" href="{{url}}" role="menuitemradio">{{name}}</a>
{{/each}}
</span>
</div>
{{/if}}
</section>
<ul id="comments" class="comment-list">
{{#each comments}}
<li id="{{anchor}}" class="comment">
<div class="comment-wrapper {{#if official}} comment-official {{/if}}">
<div class="comment-info">
{{#if official}}
<span class="comment-official status-label status-label-official">{{t 'official_comment'}}</span>
{{/if}}
<div class="comment-author">
<div class="avatar comment-avatar">
{{#if author.agent}}
<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" focusable="false" aria-hidden="true" viewBox="0 0 12 12" class="icon-agent" aria-label="{{t 'team_member' name=author.name}}">
<path fill="currentColor" d="M6 0C2.7 0 0 2.7 0 6s2.7 6 6 6 6-2.7 6-6-2.7-6-6-6zm0 2c1.1 0 2 .9 2 2s-.9 2-2 2-2-.9-2-2 .9-2 2-2zm2.3 7H3.7c-.3 0-.4-.3-.3-.5C3.9 7.6 4.9 7 6 7s2.1.6 2.6 1.5c.1.2 0 .5-.3.5z"/>
</svg>
{{/if}}
<img src="{{author.avatar_url}}" alt="" class="user-avatar"/>
</div>
<div class="comment-meta">
<span title="{{author.name}}" id="{{anchor}}-author">
{{#link 'user_profile' id=author.id}}
{{author.name}}
{{/link}}
</span>
<ul aria-label="{{t 'badges'}}" class="community-badge-titles">
{{#each (filter author.badges on="category_slug" equals="titles")}}
<li class="community-badge community-badge-title" title="{{description}}" aria-label="{{name}}">
{{name}}
</li>
{{/each}}
</ul>
<div class="meta-group meta-group-opposite">
{{#if editor}}
<span class="meta-data">{{date edited_at timeago=true}}</span>
<span class="meta-data">{{t 'edited'}}</span>
{{else}}
<span class="meta-data">{{date created_at timeago=true}}</span>
{{/if}}
</div>
<ul aria-label="{{t 'badges'}}" class="community-badge-achievements">
{{#each (slice (filter author.badges on="category_slug" equals="achievements") 0 4)}}
<li class="community-badge community-badge-achievement">
<img src="{{icon_url}}" alt="{{name}}" title="{{name}} | {{description}}" />
</li>
{{/each}}
{{#if (compare (calc author.badges.length "-" 4) ">" 0)}}
<li class="community-badge community-badge-achievement">
<a href="{{page_path "user_profile" id=author.id filter_by="badges"}}" class="community-badge-achievements-rest" aria-label="{{t 'more_awards_to' count=(calc author.badges.length "-" 4) name=author.name}}">
{{t 'plus_more' count=(calc author.badges.length "-" 4)}}
</a>
</li>
{{/if}}
</ul>
</div>
<div class="comment-labels">
{{#with ticket}}
<a href="{{url}}" target="_zendesk_lotus" class="status-label escalation-badge">
{{t 'request'}} {{id}}
</a>
{{/with}}
{{#if pending}}
<span class="comment-pending status-label status-label-pending-moderation">{{t 'pending_approval'}}</span>
{{/if}}
</div>
</div>
<section class="comment-body" id="{{anchor}}-body">{{body}}</section>
</div>
<div class="comment-actions-container">
{{#unless official}}
<div class="comment-vote vote" role="group">
{{#vote 'up' class='vote-up' selected_class='vote-voted' aria-describedby=(concat anchor "-author " anchor "-body")}}
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" focusable="false" viewBox="0 0 16 16">
<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M4 6.5l3.6 3.6c.2.2.5.2.7 0L12 6.5"/>
</svg>
{{/vote}}
{{vote 'sum' class='vote-sum'}}
{{#vote 'down' class='vote-down' selected_class='vote-voted' aria-describedby=(concat anchor "-author " anchor "-body")}}
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" focusable="false" viewBox="0 0 16 16">
<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M4 6.5l3.6 3.6c.2.2.5.2.7 0L12 6.5"/>
</svg>
{{/vote}}
</div>
{{/unless}}
<div class="comment-actions actions">
{{#actions}}
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" focusable="false" viewBox="0 0 16 16">
<path fill="none" stroke="currentColor" d="M13.17 3.07l-1.64.71c-.48-.4-1.03-.72-1.63-.94l-.22-1.79a.511.511 0 00-.4-.44C8.86.54 8.44.5 8 .5c-.44 0-.86.04-1.28.11-.22.04-.38.22-.4.44l-.21 1.79c-.6.22-1.15.54-1.63.94l-1.65-.71a.491.491 0 00-.58.13c-.55.65-.99 1.4-1.29 2.21-.08.21 0 .44.18.58l1.45 1.08a4.91 4.91 0 000 1.87l-1.45 1.08c-.18.13-.25.37-.18.58.3.81.74 1.55 1.28 2.2.14.17.38.22.58.13l1.65-.71c.48.4 1.03.72 1.63.94l.21 1.79c.03.22.19.4.4.44.43.07.85.11 1.29.11.44 0 .86-.04 1.28-.11.22-.04.38-.22.4-.44l.21-1.79c.6-.22 1.15-.54 1.63-.94l1.65.71c.2.09.44.04.58-.13.54-.65.98-1.39 1.28-2.2.08-.21 0-.44-.18-.57L13.4 8.95c.07-.32.1-.63.1-.95s-.03-.63-.09-.94l1.45-1.08c.18-.13.25-.37.18-.58-.3-.81-.74-1.55-1.28-2.2a.51.51 0 00-.59-.13z"/>
<circle cx="8" cy="8" r="2.5" fill="none" stroke="currentColor"/>
</svg>
{{/actions}}
</div>
</div>
</div>
</li>
{{/each}}
</ul>
{{pagination}}
<section class="post-comments">
{{#form 'comment' class='comment-form hbs-form'}}
<div class="avatar comment-avatar">
{{user_avatar class='user-avatar'}}
</div>
<div class="comment-container">
{{wysiwyg 'body'}}
<div class="comment-form-controls">
{{checkbox 'official'}}
{{label 'official'}}
{{input type='submit' class="button button-large"}}
</div>
</div>
{{/form}}
</section>
<p class="comment-callout">{{comment_callout}}</p>
</div>
<section class="post-sidebar">
<h2 class="post-sidebar-title">{{t 'suggest_new_post'}}</h2>
<span class="post-to-community">
{{link 'new_post' class='button button-large'}}
</span>
</section>
</div>
</div>

View File

@@ -0,0 +1,100 @@
<h1 class="visibility-hidden">{{ t 'community'}}</h1>
<section class="section hero community-hero">
<h2 class="visibility-hidden">{{ t 'search'}}</h2>
<div class="hero-inner">
<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" focusable="false" viewBox="0 0 12 12" class="search-icon" aria-hidden="true">
<circle cx="4.5" cy="4.5" r="4" fill="none" stroke="currentColor"/>
<path stroke="currentColor" stroke-linecap="round" d="M11 11L7.5 7.5"/>
</svg>
{{search submit=false class='search search-full' scoped=settings.scoped_community_search}}
</div>
</section>
<div class="container">
<div class="sub-nav">
{{breadcrumbs}}
</div>
<header class="page-header community-header">
<span class="dropdown">
<button class="dropdown-toggle" aria-haspopup="true" aria-expanded="false">
<h2 class="title">
{{t 'community_topics'}}
</h2>
<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" focusable="false" viewBox="0 0 12 12" class="dropdown-chevron-icon" aria-hidden="true">
<path fill="none" stroke="currentColor" stroke-linecap="round" d="M3 4.5l2.6 2.6c.2.2.5.2.7 0L9 4.5"/>
</svg>
</button>
<span class="dropdown-menu" role="menu">
{{#link 'topics' role='menuitemradio' aria-checked='true'}}
{{t 'show_topics'}}
{{/link}}
{{#link 'posts' role='menuitemradio'}}
{{t 'show_all_posts'}}
{{/link}}
</span>
</span>
<span class="post-to-community">
{{link 'new_post' class='button button-large'}}
</span>
</header>
{{#unless topics}}
<p>{{t 'no_content'}}</p>
{{/unless}}
<div id="main-content" class="blocks topics">
<ul class="blocks-list topics-list">
{{#each topics}}
<li class="blocks-item topics-item {{#if internal}}blocks-item-internal{{/if}}">
<a href="{{url}}" class="blocks-item-link">
<span class="blocks-item-title">
{{name}}
{{#if internal}}
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" focusable="false" viewBox="0 0 16 16" class="icon-lock" title="{{t 'internal'}}">
<rect width="12" height="9" x="2" y="7" fill="currentColor" rx="1" ry="1"/>
<path fill="none" stroke="currentColor" d="M4.5 7.5V4a3.5 3.5 0 017 0v3.5"/>
</svg>
{{/if}}
</span>
<span class="blocks-item-description">{{excerpt description}}</span>
<ul class="meta-group">
<li class="meta-data">{{t 'post_count' count=post_count}}</li>
<li class="meta-data">{{t 'follower_count' count=follower_count}}</li>
</ul>
</a>
</li>
{{/each}}
</ul>
</div>
{{pagination}}
{{#if featured_posts}}
<section class="section community-featured-posts">
<h2 class="title">{{t 'featured_posts'}}</h2>
<ul class="promoted-articles">
{{#each featured_posts}}
<li class="promoted-articles-item">
<a href="{{url}}">
{{title}}
</a>
</li>
{{/each}}
</ul>
</section>
{{/if}}
<section class="community-activity activity">
{{#if help_center.community_enabled}}
{{recent_activity scope='community'}}
{{/if}}
</section>
<section class="container community-footer">
<h2 class="community-footer-title">{{t 'suggest_new_post'}}</h2>
{{link 'new_post' class='button button-large'}}
</section>
</div>

View File

@@ -0,0 +1,132 @@
<div class="container-divider"></div>
<div class="container">
<div class="sub-nav">
{{breadcrumbs}}
<div class="search-container">
<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" focusable="false" viewBox="0 0 12 12" class="search-icon" aria-hidden="true">
<circle cx="4.5" cy="4.5" r="4" fill="none" stroke="currentColor"/>
<path stroke="currentColor" stroke-linecap="round" d="M11 11L7.5 7.5"/>
</svg>
{{search scoped=settings.scoped_community_search submit=false}}
</div>
</div>
<header class="page-header">
<h1>
{{topic.name}}
{{#if topic.internal}}
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" focusable="false" viewBox="0 0 16 16" class="icon-lock" title="{{t 'internal'}}">
<rect width="12" height="9" x="2" y="7" fill="currentColor" rx="1" ry="1"/>
<path fill="none" stroke="currentColor" d="M4.5 7.5V4a3.5 3.5 0 017 0v3.5"/>
</svg>
{{/if}}
</h1>
<span class="post-to-community">
{{link 'new_post' topic_id=topic.id class='button button-large'}}
</span>
</header>
<div class="community-header">
<p class="page-header-description">{{topic.description}}</p>
{{#if settings.show_follow_topic}}
<div class="community-follow">
{{subscribe}}
</div>
{{/if}}
</div>
<div class="topic-header">
<span class="topic-filters">
<span class="dropdown">
<button class="dropdown-toggle" aria-haspopup="true" aria-expanded="false">
{{current_filter.label}}
<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" focusable="false" viewBox="0 0 12 12" class="dropdown-chevron-icon" aria-hidden="true">
<path fill="none" stroke="currentColor" stroke-linecap="round" d="M3 4.5l2.6 2.6c.2.2.5.2.7 0L9 4.5"/>
</svg>
</button>
<span class="dropdown-menu" role="menu">
{{#each filters}}
<a href="{{url}}" aria-checked="{{selected}}" role="menuitemradio">
{{name}}
</a>
{{/each}}
</span>
</span>
<span class="dropdown">
<button class="dropdown-toggle" aria-haspopup="true" aria-expanded="false">
{{current_sorter.label}}
<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" focusable="false" viewBox="0 0 12 12" class="dropdown-chevron-icon" aria-hidden="true">
<path fill="none" stroke="currentColor" stroke-linecap="round" d="M3 4.5l2.6 2.6c.2.2.5.2.7 0L9 4.5"/>
</svg>
</button>
<span class="dropdown-menu" role="menu">
{{#each sorters}}
<a href="{{url}}" aria-checked="{{selected}}" role="menuitemradio">
{{name}}
</a>
{{/each}}
</span>
</span>
</span>
</div>
<div id="main-content" class="posts-list striped-list">
{{#if posts}}
<ul>
{{#each posts}}
<li>
<section role="region" aria-labelledby="title-{{id}}" class="striped-list-item {{#if featured}}post-featured{{/if}}">
<span class="striped-list-info">
<a href="{{url}}" id="title-{{id}}" class="striped-list-title">{{title}}</a>
<span class="post-overview-item">
{{#if pinned}}
<span class="status-label status-label-pinned">{{t 'pinned'}}</span>
{{/if}}
{{#if featured}}
<span class="status-label status-label-featured">{{t 'featured'}}</span>
{{/if}}
{{#is status 'none'}}
{{else}}
<span class="status-label-{{status_dasherized}} status-label striped-list-status">{{status_name}}</span>
{{/is}}
</span>
<div class="meta-group">
<span class="meta-data">{{author.name}}</span>
{{#if editor}}
<span class="meta-data">{{date edited_at timeago=true}}</span>
<span class="meta-data">{{t 'edited'}}</span>
{{else}}
<span class="meta-data">{{date created_at timeago=true}}</span>
{{/if}}
</div>
</span>
<div class="post-overview-count striped-list-count">
<span class="striped-list-count-item">
<span class="striped-list-number">{{vote_sum}}</span>
{{t 'vote' count=vote_sum}}
</span>
<span class="striped-list-count-item">
<span class="striped-list-number">{{comment_count}}</span>
{{t 'comment' count=comment_count}}
</span>
</div>
</section>
</li>
{{/each}}
</ul>
{{else}}
<div class="no-posts-with-filter">{{t 'no_posts_with_filter'}}</div>
{{/if}}
</div>
{{pagination}}
</div>
<section class="container community-footer">
<h2 class="community-footer-title">{{t 'suggest_new_post'}}</h2>
{{link 'new_post' topic_id=topic.id class='button button-large'}}
</section>

View File

@@ -0,0 +1,88 @@
<div class="my-activities-nav">
<div class="container">
<nav class="collapsible-nav">
<button type="button" class="collapsible-nav-toggle" aria-label="{{t 'toggle_navigation'}}" aria-expanded="false">
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" focusable="false" viewBox="0 0 12 12" aria-hidden="true" class="collapsible-nav-toggle-icon chevron-icon">
<path fill="none" stroke="currentColor" stroke-linecap="round" d="M3 4.5l2.6 2.6c.2.2.5.2.7 0L9 4.5"/>
</svg>
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" focusable="false" viewBox="0 0 12 12" aria-hidden="true" class="collapsible-nav-toggle-icon x-icon">
<path stroke="currentColor" stroke-linecap="round" d="M3 9l6-6m0 6L3 3"/>
</svg>
</button>
<ul class="collapsible-nav-list">
<li class="current">
<a href="{{page_path 'contributions'}}" aria-current="page">{{ t 'contributions' }}</a>
</li>
<li>{{link 'subscriptions'}}</li>
</ul>
</nav>
</div>
</div>
<div class="container">
<header class="my-activities-header">
<h1>{{t 'contributions'}}</h1>
<div class="my-activities-sub-nav">
<nav class="collapsible-nav collapsible-nav-border">
<button type="button" class="collapsible-nav-toggle" aria-label="{{t 'toggle_navigation'}}" aria-expanded="false">
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" focusable="false" viewBox="0 0 12 12" aria-hidden="true" class="collapsible-nav-toggle-icon chevron-icon">
<path fill="none" stroke="currentColor" stroke-linecap="round" d="M3 4.5l2.6 2.6c.2.2.5.2.7 0L9 4.5"/>
</svg>
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" focusable="false" viewBox="0 0 12 12" aria-hidden="true" class="collapsible-nav-toggle-icon x-icon">
<path stroke="currentColor" stroke-linecap="round" d="M3 9l6-6m0 6L3 3"/>
</svg>
</button>
<ul class="collapsible-nav-list">
{{#each filters}}
{{#if selected}}
<li class="current">
<a href="{{url}}" aria-current="page">{{name}}</a>
</li>
{{else}}
<li>
<a href="{{url}}">{{name}}</a>
</li>
{{/if}}
{{/each}}
</ul>
</nav>
</div>
</header>
<div id="main-content" class="requests">
{{#if contributions}}
<table class="table my-activities-table contributions-table">
<thead>
<tr>
<th>{{t 'title'}}</th>
<th>{{t 'type'}}</th>
<th>{{t 'vote_sum'}}</th>
<th>{{t 'last_activity'}}</th>
<th>{{t 'created'}}</th>
</tr>
</thead>
<tbody>
{{#each contributions}}
<tr>
<td>
<a href="{{url}}" class="striped-list-title" title="{{title}}">
{{excerpt title characters=60}}
</a>
</td>
<td>{{type}}</td>
<td>{{vote_sum}}</td>
<td>{{date last_activity_at}}</td>
<td>{{date created_at}}</td>
</tr>
{{/each}}
</tbody>
</table>
{{else}}
<p class="no-activities">{{t 'no_contributions'}}</p>
{{/if}}
</div>
{{pagination}}
</div>

View File

@@ -0,0 +1,34 @@
<meta content="width=device-width, initial-scale=1.0" name="viewport" />
<!-- Make the translated search clear button label available for use in JS -->
<!-- See buildClearSearchButton() in script.js -->
<script type="text/javascript">window.searchClearButtonLabelLocalized = "{{t 'search_clear'}}";</script>
<script type="text/javascript">
// Load ES module polyfill only for browsers that don't support ES modules
if (!(HTMLScriptElement.supports && HTMLScriptElement.supports('importmap'))) {
document.write('<script async src="{{asset 'es-module-shims.js'}}"><\/script>');
}
</script>
<script type="importmap">
{
"imports": {
"new-request-form": "{{asset 'new-request-form-bundle.js'}}",
"flash-notifications": "{{asset 'flash-notifications-bundle.js'}}",
"service-catalog": "{{asset 'service-catalog-bundle.js'}}",
"approval-requests": "{{asset 'approval-requests-bundle.js'}}",
"approval-requests-translations": "{{asset 'approval-requests-translations-bundle.js'}}",
"new-request-form-translations": "{{asset 'new-request-form-translations-bundle.js'}}",
"service-catalog-translations": "{{asset 'service-catalog-translations-bundle.js'}}",
"shared": "{{asset 'shared-bundle.js'}}",
"ticket-fields": "{{asset 'ticket-fields-bundle.js'}}",
"wysiwyg": "{{asset 'wysiwyg-bundle.js'}}"
}
}
</script>
<script type="module">
import { renderFlashNotifications } from "flash-notifications";
const settings = {{json settings}};
const baseLocale = {{json help_center.base_locale}};
renderFlashNotifications(settings, baseLocale);
</script>

21
templates/error_page.hbs Normal file
View File

@@ -0,0 +1,21 @@
<div class="container-divider"></div>
<div id="main-content" class="error-page">
<h1>{{t 'oops'}}</h1>
{{#is error 'unauthorized'}}
<h2>{{link 'sign_in'}}</h2>
{{/is}}
{{#is error 'forbidden'}}
<h2>{{t 'not_authorized'}}</h2>
{{/is}}
{{#is error 'not_found'}}
<h2>{{t 'nonexistent_page'}}</h2>
<p>{{t 'mistyped_address_or_moved_page'}}</p>
{{/is}}
{{#link 'help_center'}}
{{t 'back_to_homepage'}}
{{/link}}
</div>

25
templates/footer.hbs Normal file
View File

@@ -0,0 +1,25 @@
<footer class="footer">
<div class="footer-inner">
{{#link 'help_center'}}{{help_center.name}}{{/link}}
<div class="footer-language-selector">
{{#if alternative_locales}}
<div class="dropdown language-selector">
<button class="dropdown-toggle" aria-haspopup="true" aria-expanded="false">
{{current_locale.name}}
<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" focusable="false" viewBox="0 0 12 12" class="dropdown-chevron-icon" aria-hidden="true">
<path fill="none" stroke="currentColor" stroke-linecap="round" d="M3 4.5l2.6 2.6c.2.2.5.2.7 0L9 4.5"/>
</svg>
</button>
<span class="dropdown-menu dropdown-menu-end" role="menu">
{{#each alternative_locales}}
<a href="{{url}}" dir="{{direction}}" rel="nofollow" role="menuitem">
{{name}}
</a>
{{/each}}
</span>
</div>
{{/if}}
</div>
</div>
</footer>

101
templates/header.hbs Normal file
View File

@@ -0,0 +1,101 @@
<a class="skip-navigation" tabindex="1" href="#main-content">{{t 'skip_navigation' }}</a>
<header class="header">
<div class="logo">
{{#link 'help_center'}}
<img src="{{settings.logo}}" alt="{{t 'home_page' name=help_center.name}}" />
{{#if settings.show_brand_name}}
<span aria-hidden="true">{{help_center.name}}</span>
{{/if}}
{{/link}}
</div>
<div class="nav-wrapper-desktop">
<nav class="user-nav" id="user-nav" aria-label="{{t 'user_navigation'}}">
<ul class="user-nav-list">
<li>{{link 'community'}}</li>
<li>{{link 'service_catalog'}}</li>
<li>{{link 'new_request' class='submit-a-request'}}</li>
{{#unless signed_in}}
<li>
{{#link "sign_in" class="sign-in"}}
{{t 'sign_in'}}
{{/link}}
</li>
{{/unless}}
</ul>
</nav>
{{#if signed_in}}
<div class="user-info dropdown">
<button class="dropdown-toggle" aria-haspopup="true" aria-expanded="false">
{{user_avatar class="user-avatar"}}
<span>
{{user_name}}
<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" focusable="false" viewBox="0 0 12 12" class="dropdown-chevron-icon" aria-hidden="true">
<path fill="none" stroke="currentColor" stroke-linecap="round" d="M3 4.5l2.6 2.6c.2.2.5.2.7 0L9 4.5"/>
</svg>
</span>
</button>
<div class="dropdown-menu" role="menu">
{{#my_profile role="menuitem"}}{{t 'profile'}}{{/my_profile}}
{{link "requests" role="menuitem"}}
{{#link "contributions" role="menuitem"}}{{t "activities"}}{{/link}}
{{link "approval_requests" role="menuitem"}}
{{contact_details role="menuitem"}}
{{change_password role="menuitem"}}
<div class="separator" role="separator"></div>
{{link "sign_out" role="menuitem"}}
</div>
</div>
{{/if}}
</div>
<div class="nav-wrapper-mobile">
<button class="menu-button-mobile" aria-controls="user-nav-mobile" aria-expanded="false" aria-label="{{t 'toggle_navigation'}}">
{{#if signed_in}}
{{user_avatar class="user-avatar"}}
{{/if}}
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" focusable="false" viewBox="0 0 16 16" class="icon-menu">
<path fill="none" stroke="currentColor" stroke-linecap="round" d="M1.5 3.5h13m-13 4h13m-13 4h13"/>
</svg>
</button>
<nav class="menu-list-mobile" id="user-nav-mobile" aria-expanded="false">
<ul class="menu-list-mobile-items">
{{#if signed_in}}
<li class="user-avatar-item item">
{{#my_profile class="my-profile"}}
{{user_avatar class="menu-profile-avatar"}}
<div class="menu-profile-name">
<div>{{user_name}}</div>
<div class="my-profile-tooltip">{{t 'profile'}}</div>
</div>
{{/my_profile}}
</li>
<li class="item">{{link "requests"}}</li>
<li class="item">{{#link "contributions"}}{{t "activities"}}{{/link}}</li>
<li class="item">{{link "approval_requests"}}</li>
<li class="item">{{contact_details}}</li>
<li class="item">{{change_password class='change-password'}}</li>
<li class="nav-divider"></li>
{{else}}
<li class="item">
{{#link "sign_in"}}
{{t 'sign_in'}}
{{/link}}
</li>
<li class="nav-divider"></li>
{{/if}}
<li class="item">{{link 'community'}}</li>
<li class="item">{{link 'new_request' class='submit-a-request'}}</li>
<li class="item">{{link 'service_catalog'}}</li>
<li class="nav-divider"></li>
{{#if signed_in}}
<li class="item">
{{link "sign_out"}}
</li>
{{/if}}
</ul>
</nav>
</div>
</header>

83
templates/home_page.hbs Normal file
View File

@@ -0,0 +1,83 @@
<h1 class="visibility-hidden">{{ help_center.name }}</h1>
<section id="main-content" class="section hero">
<div class="hero-inner">
<h2 class="visibility-hidden">{{ t 'search' }}</h2>
<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" focusable="false" viewBox="0 0 12 12" class="search-icon" aria-hidden="true">
<circle cx="4.5" cy="4.5" r="4" fill="none" stroke="currentColor"/>
<path stroke="currentColor" stroke-linecap="round" d="M11 11L7.5 7.5"/>
</svg>
{{search submit=false instant=settings.instant_search class='search search-full'}}
</div>
</section>
<div class="container">
<section class="section knowledge-base">
<h2 class="visibility-hidden">{{ t 'categories' }}</h2>
<section class="categories blocks">
<ul class="blocks-list">
{{#each categories}}
{{#if ../has_multiple_categories}}
<li class="blocks-item">
<a href='{{url}}' class="blocks-item-link">
<span class="blocks-item-title">{{name}}</span>
<span class="blocks-item-description">{{excerpt description}}</span>
</a>
</li>
{{else}}
{{#each sections}}
<li class="blocks-item">
<a href='{{url}}' class="blocks-item-link">
<span class="blocks-item-title">
{{name}}
</span>
<span class="blocks-item-description">{{excerpt description}}</span>
</a>
</li>
{{/each}}
{{/if}}
{{/each}}
</ul>
{{pagination}}
</section>
{{#if promoted_articles}}
<section class="articles">
<h2>{{t 'promoted_articles'}}</h2>
<ul class="article-list promoted-articles">
{{#each promoted_articles}}
<li class="promoted-articles-item">
<a href="{{url}}">
{{title}}
{{#if internal}}
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" focusable="false" viewBox="0 0 16 16" class="icon-lock" title="{{t 'internal'}}">
<rect width="12" height="9" x="2" y="7" fill="currentColor" rx="1" ry="1"/>
<path fill="none" stroke="currentColor" d="M4.5 7.5V4a3.5 3.5 0 017 0v3.5"/>
</svg>
{{/if}}
</a>
</li>
{{/each}}
</ul>
</section>
{{/if}}
</section>
{{#if help_center.community_enabled}}
<section class="section home-section community">
<h2>{{t 'community'}}</h2>
{{#link 'community' class='community-link'}}
{{t 'join_conversation'}}
{{/link}}
<div class="community-image"></div>
</section>
{{/if}}
<section class="section home-section activity">
{{#if settings.show_recent_activity}}
{{recent_activity}}
{{/if}}
</section>
</div>

View File

@@ -0,0 +1,90 @@
<div class="container-divider"></div>
<div class="container">
<div class="sub-nav">
{{breadcrumbs}}
<div class="search-container">
<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" focusable="false" viewBox="0 0 12 12" class="search-icon" aria-hidden="true">
<circle cx="4.5" cy="4.5" r="4" fill="none" stroke="currentColor"/>
<path stroke="currentColor" stroke-linecap="round" d="M11 11L7.5 7.5"/>
</svg>
{{search submit=false}}
</div>
</div>
<h1 class="form-header">
{{t 'what_is_your_post_about'}}
</h1>
<div id="main-content" class="form">
{{#form 'post' class='new_community_post hbs-form'}}
<div class="form-field">
{{#required 'title'}}
{{label 'title'}}
{{else}}
{{#label 'title'}}
{{t 'title_label'}}<span class="optional">({{t 'optional'}})</span>
{{/label}}
{{/required}}
{{input 'title' autofocus=true aria-describedby='title-error-notification'}}
{{#validate 'title'}}
<div id="title-error-notification" class="notification notification-error notification-inline">
{{error 'title'}}
</div>
{{/validate}}
</div>
{{suggestion_list class='suggestion-list'}}
<div class="form-field">
{{#required 'details'}}
{{label 'details'}}
{{else}}
{{#label 'details'}}
{{t 'details_label'}}<span class="optional">({{t 'optional'}})</span>
{{/label}}
{{/required}}
{{wysiwyg 'details' aria-describedby="details-error-notification"}}
{{#validate 'details'}}
<div id="details-error-notification" class="notification notification-error notification-inline">
{{error 'details'}}
</div>
{{/validate}}
</div>
<div class="form-field">
{{#required 'topic'}}
{{label 'topic'}}
{{else}}
{{#label 'topic'}}
{{t 'topic_label'}}<span class="optional">({{t 'optional'}})</span>
{{/label}}
{{/required}}
{{select 'topic' aria-describedby="topic-error-notification"}}
{{#validate 'topic'}}
<div id="topic-error-notification" class="notification notification-error notification-inline">
{{error 'topic'}}
</div>
{{/validate}}
</div>
<div class="form-field">
{{#required 'content_tags'}}
{{label 'content_tags'}}
{{else}}
{{#label 'content_tags'}}
{{t 'content_tags_label'}}<span class="optional">({{t 'optional'}})</span>
{{/label}}
{{/required}}
<span class="content-tags-add-hint">{{t 'content_tags_description'}}</span>
{{multiselect 'content_tags' aria-describedby='content-tags-error-notification'}}
{{#validate 'content_tags'}}
<div id="content-tags-error-notification" class="notification notification-error notification-inline">
{{error 'content_tags'}}
</div>
{{/validate}}
</div>
<footer>{{input type='submit'}}</footer>
{{/form}}
</div>
</div>

View File

@@ -0,0 +1,54 @@
<div class="container-divider"></div>
<div class="container">
<div class="sub-nav">
{{breadcrumbs}}
<div class="search-container">
<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" focusable="false" viewBox="0 0 12 12" class="search-icon" aria-hidden="true">
<circle cx="4.5" cy="4.5" r="4" fill="none" stroke="currentColor"/>
<path stroke="currentColor" stroke-linecap="round" d="M11 11L7.5 7.5"/>
</svg>
{{search submit=false}}
</div>
</div>
<h1>
{{t 'submit_a_request'}}
</h1>
<div id="main-content" class="form">
<div id="new-request-form"></div>
</div>
</div>
<script type="module">
import { renderNewRequestForm } from "new-request-form";
const container = document.getElementById("new-request-form");
const settings = {{json settings}};
const props = {
requestForm: {{json new_request_form}},
newRequestPath: {{json (page_path 'new_request')}},
parentId: {{json parent.id}},
parentIdPath: {{json parent.url}},
locale: {{json help_center.locale}},
baseLocale: {{json help_center.base_locale}},
hasAtMentions: {{json help_center.at_mentions_enabled}},
userRole: {{json user.role}},
userId: {{json user.id}},
brandId: {{json brand.id}},
organizations: {{json user.organizations}},
wysiwyg: true,
answerBotModal: {
answerBot: {{json answer_bot}},
hasRequestManagement: {{json help_center.request_management_enabled}},
isSignedIn: {{json signed_in}},
helpCenterPath: {{json (page_path 'help_center')}},
requestsPath: {{json (page_path 'requests')}},
requestPath: {{json (page_path 'request' id=answer_bot.request_id)}}
},
};
renderNewRequestForm(settings, props, container);
</script>

267
templates/request_page.hbs Normal file
View File

@@ -0,0 +1,267 @@
<div class="container">
<div class="request-breadcrumbs">{{breadcrumbs}}</div>
<h1 class="request-title">{{request.subject}}</h1>
<div id="main-content" class="request-container">
<section class="request-main">
{{satisfaction}}
<ul class="comment-list">
{{#each comments}}
<li id="{{anchor}}" class="comment">
<div class="comment-wrapper">
<div class="comment-info">
<div class="comment-author">
<div class="avatar comment-avatar">
{{#if author.agent}}
<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" focusable="false" aria-hidden="true" viewBox="0 0 12 12" class="icon-agent" aria-label="{{t 'team_member' name=author.name}}">
<path fill="currentColor" d="M6 0C2.7 0 0 2.7 0 6s2.7 6 6 6 6-2.7 6-6-2.7-6-6-6zm0 2c1.1 0 2 .9 2 2s-.9 2-2 2-2-.9-2-2 .9-2 2-2zm2.3 7H3.7c-.3 0-.4-.3-.3-.5C3.9 7.6 4.9 7 6 7s2.1.6 2.6 1.5c.1.2 0 .5-.3.5z"/>
</svg>
{{/if}}
<img src="{{author.avatar_url}}" alt="" class="user-avatar"/>
</div>
<div class="comment-meta">
<span title="{{author.name}}">
{{#link 'user_profile' id=author.id}}
{{author.name}}
{{/link}}
</span>
<div class="meta-group">
<span class="meta-data">{{date created_at timeago=true}}</span>
</div>
</div>
</div>
<section class="comment-body">{{body}}</section>
{{#if attachments}}
<ul class="attachments">
{{#each attachments}}
<li class="attachment-item">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" focusable="false" viewBox="0 0 16 16" class="attachment-icon">
<path fill="none" stroke="currentColor" stroke-linecap="round" d="M9.5 4v7.7c0 .8-.7 1.5-1.5 1.5s-1.5-.7-1.5-1.5V3C6.5 1.6 7.6.5 9 .5s2.5 1.1 2.5 2.5v9c0 1.9-1.6 3.5-3.5 3.5S4.5 13.9 4.5 12V4"/>
</svg>
<a href="{{url}}" target="_blank">{{name}}</a>
<div class="attachment-meta meta-group">
<span class="attachment-meta-item meta-data">{{size}}</span>
<a href="{{url}}" target="_blank" class="attachment-meta-item meta-data">{{t 'download'}}</a>
</div>
</li>
{{/each}}
</ul>
{{/if}}
</div>
</div>
</li>
{{/each}}
</ul>
{{pagination}}
<div class="request-follow-up">
{{comment_callout}}
</div>
{{#form 'comment' class='comment-form hbs-form'}}
<div class="avatar comment-avatar">
{{user_avatar class='user-avatar'}}
</div>
<div class="comment-container">
<button type="button" class="comment-show-container {{#validate 'body'}}hidden{{/validate}}">
{{t 'add_to_conversation'}}
</button>
<div class="comment-fields {{#validate 'body'}}shown{{/validate}}">
{{#if help_center.request_ccs_enabled}}
<div class="comment-ccs form-field">
{{token_field 'ccs' class='ccs-input'}}
</div>
{{/if}}
{{wysiwyg 'body' rows='7'}}
<div class="comment-attachments">
{{upload}}
</div>
</div>
<div class="comment-form-controls">
{{checkbox 'mark_as_solved'}}
{{#if request.can_be_marked_as_solved}}
<button type="button" class="button-large button-secondary mark-as-solved"
data-solve-translation="{{t 'mark_as_solved'}}"
data-solve-and-submit-translation="{{t 'mark_as_solved_and_submit'}}">
{{t 'mark_as_solved'}}
</button>
{{/if}}
<span class="request-submit-comment {{#validate 'body'}}shown{{/validate}}">
{{input type='submit' class="button button-large"}}
</span>
</div>
</div>
{{/form}}
</section>
<section class="request-sidebar collapsible-sidebar">
<button type="button" class="collapsible-sidebar-toggle" aria-labelledby="request-sidebar-title" aria-expanded="false">
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" focusable="false" viewBox="0 0 12 12" aria-hidden="true" class="collapsible-sidebar-toggle-icon chevron-icon">
<path fill="none" stroke="currentColor" stroke-linecap="round" d="M3 4.5l2.6 2.6c.2.2.5.2.7 0L9 4.5"/>
</svg>
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" focusable="false" viewBox="0 0 12 12" aria-hidden="true" class="collapsible-sidebar-toggle-icon x-icon">
<path stroke="currentColor" stroke-linecap="round" d="M3 9l6-6m0 6L3 3"/>
</svg>
</button>
<h2 id="request-sidebar-title" class="collapsible-sidebar-title">
{{t 'ticket_details'}}
</h2>
<div class="collapsible-sidebar-body">
{{#if request.followup_source_id}}
<dl class="request-details">
<dt>{{t 'followup'}}</dt>
<dd>{{link 'request' id=request.followup_source_id}}</dd>
</dl>
{{/if}}
{{#with satisfaction_response}}
{{#with rating}}
<dl class="request-details">
<dt>{{t 'rating'}}</dt>
<dd>
<div>
{{#is scale_type 'numeric'}}
{{t 'numerical_rating' value=value max_value=max_value}}
{{else}}
{{scale_value}}
{{/is}}
</div>
{{#link 'survey_response' id=../id}}
{{#if ../editable}}
{{t 'edit_feedback'}}
{{else}}
{{t 'view_feedback'}}
{{/if}}
{{/link}}
</dd>
</dl>
{{else}}
{{#if editable}}
<dl class="request-details">
<dt>{{t 'rating'}}</dt>
<dd>
{{#link 'survey_response' id=id}}
{{t 'add_feedback'}}
{{/link}}
</dd>
</dl>
{{/if}}
{{/with}}
{{/with}}
<dl class="request-details">
<dt>{{t 'requester'}}</dt>
<dd>{{request.requester.name}}</dd>
<dt>{{t 'created'}}</dt>
<dd>{{date request.created_at}}</dd>
<dt>{{t 'last_activity'}}</dt>
<dd>{{date request.updated_at}}</dd>
{{#if collaborators}}
<dt>{{t 'ccs'}}</dt>
<dd>
<ul class="request-collaborators">
{{#each collaborators}}
<li title="{{name}}">{{name}}</li>
{{/each}}
</ul>
</dd>
{{/if}}
</dl>
<dl class="request-details">
{{#if assignee}}
<dt>{{t 'assignee'}}</dt>
<dd>
{{assignee.name}}
</dd>
{{/if}}
<dt>{{t 'id'}}</dt>
<dd>#{{request.id}}</dd>
{{#form 'organization' id='request-organization' class='hbs-form'}}
<dt>{{t 'organization'}}</dt>
<dd>{{select 'organization'}}</dd>
{{/form}}
{{#if group}}
<dt>{{t 'group'}}</dt>
<dd>
{{group.name}}
</dd>
{{/if}}
<dt>{{t 'status'}}</dt>
<dd>
<span class="status-label status-label-request status-label-{{request.status}}" title="{{request.status_description}}">
{{request.status_name}}
</span>
</dd>
{{#if request.type}}
<dt>{{request.type_title}}</dt>
<dd>
{{request.type_name}}
{{#is request.type 'task'}}
{{t 'task_due_date' due_date=request.due_date}}
{{/is}}
</dd>
{{/if}}
{{#if request.priority}}
<dt>{{request.priority_title}}</dt>
<dd>
{{request.priority_name}}
</dd>
{{/if}}
{{#each custom_fields}}
<dt>{{title}}</dt>
<dd>
{{value}}
</dd>
{{/each}}
</dl>
{{#if attachments}}
<dl class="request-details request-attachments">
<dt>{{t 'attachments_heading'}}</dt>
<dd>
<ul class="attachments">
{{#each attachments}}
<li class="attachment-item">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" focusable="false" viewBox="0 0 16 16" class="attachment-icon">
<path fill="none" stroke="currentColor" stroke-linecap="round" d="M9.5 4v7.7c0 .8-.7 1.5-1.5 1.5s-1.5-.7-1.5-1.5V3C6.5 1.6 7.6.5 9 .5s2.5 1.1 2.5 2.5v9c0 1.9-1.6 3.5-3.5 3.5S4.5 13.9 4.5 12V4"/>
</svg>
<a href="{{url}}" target="_blank">{{name}}</a>
<div class="attachment-meta meta-group">
<span class="attachment-meta-item meta-data">{{size}}</span>
<a href="{{url}}" target="_blank" class="attachment-meta-item meta-data">{{t 'download'}}</a>
</div>
</li>
{{/each}}
</ul>
</dd>
</dl>
{{/if}}
</div>
</section>
</div>
</div>

140
templates/requests_page.hbs Normal file
View File

@@ -0,0 +1,140 @@
<div class="container">
{{#if settings.request_list_beta}}
<header class="my-activities-header">
<h1>{{t 'requests'}}</h1>
</header>
<div id="main-content">
{{request_list}}
</div>
{{else}}
<header class="my-activities-header">
<h1>{{t 'my_requests'}}</h1>
<div class="my-activities-sub-nav">
<nav class="collapsible-nav collapsible-nav-border">
<button type="button" class="collapsible-nav-toggle" aria-label="{{t 'toggle_navigation'}}" aria-expanded="false">
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" focusable="false" viewBox="0 0 12 12" aria-hidden="true" class="collapsible-nav-toggle-icon chevron-icon">
<path fill="none" stroke="currentColor" stroke-linecap="round" d="M3 4.5l2.6 2.6c.2.2.5.2.7 0L9 4.5"/>
</svg>
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" focusable="false" viewBox="0 0 12 12" aria-hidden="true" class="collapsible-nav-toggle-icon x-icon">
<path stroke="currentColor" stroke-linecap="round" d="M3 9l6-6m0 6L3 3"/>
</svg>
</button>
<ul class="collapsible-nav-list">
{{#each filters}}
{{#if selected}}
<li class="current">
<a href="{{url}}" aria-current="page">{{name}}</a>
</li>
{{else}}
<li><a href="{{url}}">{{name}}</a></li>
{{/if}}
{{/each}}
</ul>
</nav>
</div>
</header>
{{#form 'requests_filter' id="main-content" class='requests-table-toolbar hbs-form'}}
<div class="search">
<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" focusable="false" viewBox="0 0 12 12" class="search-icon" aria-hidden="true">
<circle cx="4.5" cy="4.5" r="4" fill="none" stroke="currentColor"/>
<path stroke="currentColor" stroke-linecap="round" d="M11 11L7.5 7.5"/>
</svg>
{{label 'query' for='quick-search' class='visibility-hidden'}}
{{input 'query' id='quick-search' type='search' class='requests-search'}}
</div>
{{#if help_center.multiple_organizations_enabled}}
<div class="request-table-filter">
{{label 'organization' for='request-organization-select' class='request-filter request-filter-label'}}
{{select 'organization' id='request-organization-select' class='request-filter'}}
</div>
{{/if}}
<div class="request-table-filter organization-subscribe">
{{subscribe}}
</div>
<div class="request-table-filter">
{{label 'status' for='request-status-select' class='request-filter request-filter-label'}}
{{select 'status' id='request-status-select' class='request-filter'}}
</div>
{{/form}}
{{#if query}}
<div class="requests-search-info meta-data">
{{t 'requests_search_results_info' count=requests.length query=query}}
</div>
{{else}}
{{#unless requests}}
<p class="no-activities">{{t 'no_requests'}}</p>
{{/unless}}
{{/if}}
<div class="requests">
{{#if requests}}
<table class="table my-activities-table requests-table {{current_filter.identifier}}-requests">
<thead>
<tr>
<th>{{t 'subject'}}</th>
<th>{{t 'id'}}</th>
<th>
{{#is current_filter.identifier 'my'}}
{{#link 'requests' sort_by='created_at'}}{{t 'created'}}{{/link}}
{{else}}
{{t 'requester'}}
{{/is}}
</th>
<th>{{#link 'requests' sort_by='updated_at'}}{{t 'last_activity'}}{{/link}}</th>
<th>
{{t 'status'}}
</th>
</tr>
</thead>
<tbody>
{{#each requests}}
<tr {{#is status 'closed'}} class="request-closed" {{/is}}>
<td class="request-info requests-table-info">
<a href="{{url}}" class="striped-list-title" title="{{subject}}">
{{#if subject}}
{{subject}}
{{else}}
{{excerpt description characters=50}}
{{/if}}
</a>
<!-- Visible on mobile -->
<div class="requests-table-meta">
<span class="meta-data">#{{id}}</span>
<span class="meta-data">{{date created_at timeago=true}}</span>
<span class="status-label status-label-request status-label-{{status}}" title="{{status_description}}">
{{status_name}}
</span>
</div>
</td>
<td>#{{id}}</td>
<td>
{{#is ../current_filter.identifier 'my'}}
{{date created_at timeago=true}}
{{else}}
{{requester.name}}
{{/is}}
</td>
<td>{{date updated_at timeago=true}}</td>
<td class="requests-table-status">
<span class="status-label status-label-request status-label-{{status}}" title="{{status_description}}">
{{status_name}}
</span>
</td>
</tr>
{{/each}}
</tbody>
</table>
{{/if}}
</div>
{{pagination}}
{{/if}}
</div>

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,72 @@
<div class="container-divider"></div>
<div class="container">
<div class="sub-nav">
{{breadcrumbs}}
<div class="search-container">
<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" focusable="false" viewBox="0 0 12 12" class="search-icon" aria-hidden="true">
<circle cx="4.5" cy="4.5" r="4" fill="none" stroke="currentColor"/>
<path stroke="currentColor" stroke-linecap="round" d="M11 11L7.5 7.5"/>
</svg>
{{search scoped=settings.scoped_kb_search submit=false}}
</div>
</div>
<div class="section-container">
<section id="main-content" class="section-content">
<header class="page-header">
<h1>{{section.name}}</h1>
{{#if settings.show_follow_section}}
<div class="section-subscribe">{{subscribe}}</div>
{{/if}}
{{#if section.description}}
<p class="page-header-description">{{section.description}}</p>
{{/if}}
</header>
{{#if section.sections}}
<ul class="section-list">
{{#each section.sections}}
<li class="section-list-item">
<a href="{{url}}">
<span>{{name}}</span>
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" focusable="false" viewBox="0 0 16 16" aria-hidden="true">
<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M5 14.5l6.1-6.1c.2-.2.2-.5 0-.7L5 1.5"/>
</svg>
</a>
</li>
{{/each}}
</ul>
{{/if}}
{{pagination "section.sections"}}
{{#if section.articles}}
<ul class="article-list">
{{#each section.articles}}
<li class="article-list-item {{#if promoted}} article-promoted{{/if}}">
{{#if promoted}}
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" focusable="false" viewBox="0 0 12 12" class="icon-star" title="{{t 'promoted'}}">
<path fill="currentColor" d="M2.88 11.73c-.19 0-.39-.06-.55-.18a.938.938 0 01-.37-1.01l.8-3L.35 5.57a.938.938 0 01-.3-1.03c.12-.37.45-.63.85-.65L4 3.73 5.12.83c.14-.37.49-.61.88-.61s.74.24.88.6L8 3.73l3.11.17a.946.946 0 01.55 1.68L9.24 7.53l.8 3a.95.95 0 01-1.43 1.04L6 9.88l-2.61 1.69c-.16.1-.34.16-.51.16z"/>
</svg>
{{/if}}
<a href="{{url}}" class="article-list-link">{{title}}</a>
{{#if internal}}
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" focusable="false" viewBox="0 0 16 16" class="icon-lock" title="{{t 'internal'}}">
<rect width="12" height="9" x="2" y="7" fill="currentColor" rx="1" ry="1"/>
<path fill="none" stroke="currentColor" d="M4.5 7.5V4a3.5 3.5 0 017 0v3.5"/>
</svg>
{{/if}}
</li>
{{/each}}
</ul>
{{else}}
<i class="section-empty">
<a href="{{section.url}}">{{t 'empty'}}</a>
</i>
{{/if}}
{{pagination "section.articles"}}
</section>
</div>
</div>

View File

@@ -0,0 +1,23 @@
<div class="container-divider"></div>
<div class="container">
<div class="sub-nav">
{{breadcrumbs}}
</div>
<h1>{{t 'services'}}</h1>
<div id="main-content">
<div id="service-catalog"></div>
</div>
</div>
<script type="module">
import { renderServiceCatalogList } from "service-catalog";
const settings = {{json settings}};
const helpCenterPath = {{json (page_path 'help_center')}};
const container = document.getElementById("service-catalog");
const baseLocale = {{json help_center.base_locale}};
renderServiceCatalogList(container, settings, helpCenterPath, baseLocale);
</script>

View File

@@ -0,0 +1,33 @@
<div class="container-divider"></div>
<div class="container">
<div class="sub-nav">
{{breadcrumbs}}
</div>
<div id="main-content">
<div id="service-catalog-item"></div>
</div>
</div>
<script type="module">
import { renderServiceCatalogItem } from "service-catalog";
const settings = {{json settings}};
const container = document.getElementById("service-catalog-item");
// Extract the ID from the URL
const id = window.location.pathname.split("/").pop()
const props = {
baseLocale: {{json help_center.base_locale}},
hasAtMentions: {{json help_center.at_mentions_enabled}},
userRole: {{json user.role}},
userId: {{json user.id}},
brandId: {{json brand.id}},
organizations: {{json user.organizations}},
serviceCatalogItemId: id,
helpCenterPath: {{json (page_path 'help_center')}},
}
renderServiceCatalogItem(container, settings, props);
</script>

View File

@@ -0,0 +1,82 @@
<div class="my-activities-nav">
<div class="container">
<nav class="collapsible-nav">
<button type="button" class="collapsible-nav-toggle" aria-label="{{t 'toggle_navigation'}}" aria-expanded="false">
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" focusable="false" viewBox="0 0 12 12" aria-hidden="true" class="collapsible-nav-toggle-icon chevron-icon">
<path fill="none" stroke="currentColor" stroke-linecap="round" d="M3 4.5l2.6 2.6c.2.2.5.2.7 0L9 4.5"/>
</svg>
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" focusable="false" viewBox="0 0 12 12" aria-hidden="true" class="collapsible-nav-toggle-icon x-icon">
<path stroke="currentColor" stroke-linecap="round" d="M3 9l6-6m0 6L3 3"/>
</svg>
</button>
<ul class="collapsible-nav-list">
<li>{{link 'contributions'}}</li>
<li class="current">
<a href="{{page_path 'following'}}" aria-current="page">{{ t 'following' }}</a>
</li>
</ul>
</nav>
</div>
</div>
<div class="container">
<header class="my-activities-header">
<h1 id="subscriptions-h1">{{t 'following'}}</h1>
</header>
<div class="my-activities-following-header">
<span class="dropdown">
<button class="dropdown-toggle" aria-haspopup="true" aria-expanded="false">
{{current_filter.label}}
<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" focusable="false" viewBox="0 0 12 12" class="dropdown-chevron-icon" aria-hidden="true">
<path fill="none" stroke="currentColor" stroke-linecap="round" d="M3 4.5l2.6 2.6c.2.2.5.2.7 0L9 4.5"/>
</svg>
</button>
<span class="dropdown-menu" role="menu">
{{#each filters}}
<a href="{{url}}" aria-checked="{{selected}}" role="menuitemradio">
{{name}}
</a>
{{/each}}
</span>
</span>
</div>
<div id="main-content" class="requests">
{{#if subscriptions}}
<table class="table my-activities-table subscriptions-table" aria-labelledby="subscriptions-h1">
<thead>
<tr>
<th>{{t 'title'}}</th>
<th>{{t 'type'}}</th>
<th>{{t 'subscription'}}</th>
<th scope="col"><span class="visibility-hidden">{{t 'actions'}}</span></th>
</tr>
</thead>
<tbody>
{{#each subscriptions}}
<tr>
<td>
{{#is type 'user'}}
<img class="user-avatar" src="{{avatar_url}}" alt="">
{{/is}}
<a href="{{url}}" title="{{title}}" class="striped-list-title">
{{excerpt title characters=60}}
</a>
</td>
<td>{{name}}</td>
<td>{{following}}</td>
<td class="subscriptions-subscribe">
{{subscribe}}
</td>
</tr>
{{/each}}
</tbody>
</table>
{{pagination}}
{{else}}
<p class="no-activities">{{t 'not_following'}}</p>
{{/if}}
</div>
</div>

View File

@@ -0,0 +1,443 @@
<header id="main-content" class="profile-header">
<div class="container">
<div class="profile-info">
<div class="avatar profile-avatar">
{{#if user.agent}}
<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" focusable="false" aria-hidden="true" viewBox="0 0 12 12" class="icon-agent" aria-label="{{t 'team_member' name=user.name}}">
<path fill="currentColor" d="M6 0C2.7 0 0 2.7 0 6s2.7 6 6 6 6-2.7 6-6-2.7-6-6-6zm0 2c1.1 0 2 .9 2 2s-.9 2-2 2-2-.9-2-2 .9-2 2-2zm2.3 7H3.7c-.3 0-.4-.3-.3-.5C3.9 7.6 4.9 7 6 7s2.1.6 2.6 1.5c.1.2 0 .5-.3.5z"/>
</svg>
{{/if}}
<img class="user-avatar" src="{{user.avatar_url}}" alt=""/>
</div>
<div class="basic-info">
<div class="community-name-and-title-badges">
<h1 class="name">
{{#if user.url}}
<a href="{{user.url}}" target="_zendesk_lotus" title="{{t 'open_user_in_support'}}">{{user.name}}</a>
{{else}}
{{user.name}}
{{/if}}
</h1>
<ul aria-label="{{t 'badges'}}" class="community-badge-titles">
{{#each (filter user.badges on="category_slug" equals="titles")}}
<li class="community-badge community-badge-title" title="{{description}}" aria-label="{{name}}">
{{name}}
</li>
{{/each}}
</ul>
</div>
<ul aria-label="{{t 'badges'}}" class="community-badge-achievements">
{{#each (slice (filter user.badges on="category_slug" equals="achievements") 0 4)}}
<li class="community-badge community-badge-achievement">
<img src="{{icon_url}}" alt="{{name}}" title="{{name}} | {{description}}" />
</li>
{{/each}}
{{#if (compare (calc user.badges.length "-" 4) ">" 0)}}
<li class="community-badge community-badge-achievement">
<a href="{{page_path "user_profile" id=user.id filter_by="badges"}}" class="community-badge-achievements-rest" aria-label="{{t 'more_awards_to' count=(calc user.badges.length "-" 4) name=user.name}}">
{{t 'plus_more' count=(calc user.badges.length "-" 4)}}
</a>
</li>
{{/if}}
</ul>
</div>
<div class="options">
{{#if private_profile}}
<span class="profile-private-badge">
{{t 'private'}}
<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" focusable="false" viewBox="0 0 12 12" class="profile-private-icon">
<path fill="none" stroke="currentColor" d="M3.5 5.5V3a2.5 2.5 0 015 0v2.5"/>
<rect width="10" height="7" x="1" y="5" fill="currentColor" rx="1" ry="1"/>
</svg>
</span>
{{/if}}
{{actions class='user-profile-actions split-button'}}
<div class="community-follow">
{{subscribe}}
</div>
</div>
{{#if description}}
<p class="description">{{description}}</p>
{{/if}}
<ul class="profile-stats profile-stats-activity">
<li class="stat">
<span class="stat-label">{{t 'total_activity'}}</span>
<span class="stat-value" id="total-activity">{{total_activity}}</span>
</li>
<li class="stat">
<span class="stat-label">{{t 'last_activity'}}</span>
<span class="stat-value">
{{#if last_activity_at}}
{{date last_activity_at timeago=true}}
{{else}}
{{t 'no_activity_yet'}}
{{/if}}
</span>
</li>
<li class="stat">
<span class="stat-label">{{t 'member_since'}}</span>
<span class="stat-value">
{{#if member_since}}
{{date member_since format='medium'}}
{{else}}
{{t 'no_activity_yet'}}
{{/if}}
</span>
</li>
</ul>
</div>
<ul class="profile-stats profile-stats-counters">
<li class="stat">
<span class="stat-label">{{t 'following_users'}}</span>
<span class="stat-value" id="following-count">{{t 'users_count' count=following_count}}</span>
</li>
<li class="stat">
<span class="stat-label">{{t 'followed_by'}}</span>
<span class="stat-value" id="follower-count">{{t 'users_count' count=follower_count}}</span>
</li>
<li class="stat">
<span class="stat-label">{{t 'votes'}}</span>
<span class="stat-value" id="vote-count">{{vote_count}}</span>
</li>
<li class="stat">
<span class="stat-label">{{t 'subscriptions'}}</span>
<span class="stat-value" id="subscription-count">{{subscription_count}}</span>
</li>
</ul>
</div>
</header>
{{#if visible}}
{{#if member_since}}
<div class="profile-nav">
<div class="container">
<nav class="collapsible-nav">
<button type="button" class="collapsible-nav-toggle" aria-label="{{t 'toggle_navigation'}}" aria-expanded="false">
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" focusable="false" viewBox="0 0 12 12" aria-hidden="true" class="collapsible-nav-toggle-icon chevron-icon">
<path fill="none" stroke="currentColor" stroke-linecap="round" d="M3 4.5l2.6 2.6c.2.2.5.2.7 0L9 4.5"/>
</svg>
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" focusable="false" viewBox="0 0 12 12" aria-hidden="true" class="collapsible-nav-toggle-icon x-icon">
<path stroke="currentColor" stroke-linecap="round" d="M3 9l6-6m0 6L3 3"/>
</svg>
</button>
<ul class="collapsible-nav-list">
{{#each filters}}
{{#if selected}}
<li class="current"><a href="{{url}}" aria-current="page">{{name}}</a></li>
{{else}}
<li><a href="{{url}}">{{name}}</a></li>
{{/if}}
{{/each}}
</ul>
</nav>
</div>
</div>
{{#is current_filter.identifier 'activities'}}
<div class="container">
<section class="profile-section">
{{#if activities}}
<header class="profile-section-header">
<h2 class="profile-section-title">{{t 'activity_overview'}}</h2>
<span class="profile-section-description">{{t 'latest_activity' name=user.name}}</span>
</header>
<ul class="profile-activity-list">
{{#each activities}}
<li class="profile-activity profile-activity-{{type}}">
<span aria-hidden="true" class="profile-activity-icon">
{{#contains type "article"}}
<svg xmlns="http://www.w3.org/2000/svg" width="15" height="15" focusable="false" viewBox="0 0 12 12">
<path fill="none" stroke="currentColor" stroke-linecap="round" d="M3.5 5.5h5m-5 2h5m-5 2h5m2-6.29V11c0 .28-.22.5-.5.5H2c-.28 0-.5-.22-.5-.5V1c0-.28.22-.5.5-.5h5.79c.13 0 .26.05.35.15l2.21 2.21c.1.09.15.21.15.35zM7.5.5V3c0 .28.22.5.5.5h2.5"/>
</svg>
{{/contains}}
{{#contains type "post"}}
<svg xmlns="http://www.w3.org/2000/svg" width="15" height="15" focusable="false" viewBox="0 0 12 12">
<path fill="none" stroke="currentColor" stroke-linecap="round" d="M1.5 6.5H1C.7 6.5.5 6.3.5 6V1C.5.7.7.5 1 .5h7c.3 0 .5.2.5.5v2.5m-6-1h4m-1 5h4m-4 2h4M4 5.5h7c.3 0 .5.2.5.5v5c0 .3-.2.5-.5.5H4c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5z"/>
</svg>
{{/contains}}
{{#contains type "comment"}}
<svg xmlns="http://www.w3.org/2000/svg" width="15" height="15" focusable="false" viewBox="0 0 12 12">
<path fill="none" stroke="currentColor" d="M1 .5h10c.3 0 .5.2.5.5v7c0 .3-.2.5-.5.5H6l-2.6 2.6c-.3.3-.9.1-.9-.4V8.5H1C.7 8.5.5 8.3.5 8V1C.5.7.7.5 1 .5z"/>
</svg>
{{/contains}}
</span>
<header class="profile-activity-header">
<img class="user-avatar" src="{{../user.avatar_url}}" alt=""/>
<p class="profile-activity-description">{{label}}</p>
</header>
{{#with contribution}}
<div class="profile-activity-contribution profile-contribution">
<header class="profile-contribution-header">
{{#isnt object_type 'comment'}}
<h3 class="profile-contribution-title"><a href="{{url}}">{{title}}</a></h3>
{{/isnt}}
{{#isnt status 'none'}}
<span class="status-label status-label-{{status_dasherized}}">{{status_name}}</span>
{{/isnt}}
{{#if pending}}
<span class="status-label status-label-pending-moderation">{{t 'pending_approval'}}</span>
{{/if}}
{{#if official}}
<span class="status-label status-label-official">{{t 'official_comment'}}</span>
{{/if}}
</header>
<nav
{{#is object_type 'article'}}aria-label='{{t 'article_location_with_title' title=title}}'{{/is}}
{{#is object_type 'post'}}aria-label='{{t 'post_location_with_title' title=title}}'{{/is}}
{{#is object_type 'comment'}}aria-label='{{t 'comment_location_with_author_name' author_name=author.name}}'{{/is}}
>
<ol class="breadcrumbs profile-contribution-breadcrumbs">
{{#each path_steps}}
<li><a href="{{url}}">{{name}}</a></li>
{{/each}}
</ol>
</nav>
<p class="profile-contribution-body">{{excerpt body characters=200}}</p>
<div class="meta-group">
{{#is object_type 'comment'}}
<span class="meta-data">
<a class="comment-link" href={{url}}>{{t 'view_comment'}}</a>
</span>
{{/is}}
<span class="meta-data">{{author.name}}</span>
{{#if editor}}
<span class="meta-data">{{date edited_at timeago=true}}</span>
<span class="meta-data">
{{#is object_type 'article'}}
{{t 'updated'}}
{{else}}
{{t 'edited'}}
{{/is}}
</span>
{{else}}
<span class="meta-data">{{date created_at timeago=true}}</span>
{{/if}}
{{#each stats}}
<span class="meta-data">{{label}}</span>
{{/each}}
</div>
</div>
{{/with}}
</li>
{{/each}}
</ul>
{{/if}}
{{#unless activities}}
<span class="no-activity">{{t 'no_contributions'}}</span>
{{/unless}}
</section>
</div>
{{/is}}
{{#is current_filter.identifier 'badges'}}
<div class="container">
<section class="profile-section">
{{#if user.badges}}
<header class="profile-section-header">
<h2 class="profile-section-title">{{t 'badges'}}</h2>
<span class="profile-section-description">{{t 'badges_description' name=user.name}}</span>
</header>
<ul class="profile-badges-items">
{{#each user.badges}}
<li role="region" class="profile-badges-item" aria-labelledby="title-{{id}}" aria-describedby="desc-{{id}}">
<div class="profile-badges-item-image">
{{#if icon_url}}
<img class="badge" src="{{icon_url}}" alt="">
{{/if}}
</div>
<div>
<div id="title-{{id}}" class="profile-badges-item-title">
{{name}}
</div>
<p id="desc-{{id}}" class="profile-badges-item-description">
{{description}}
</p>
</div>
<div class="profile-badges-item-metadata">
<div class="profile-badges-item-metadata-title">
{{t 'badges_awarded'}}
</div>
<p class="profile-badges-item-metadata-description">
{{date assigned_at format='medium'}}
</p>
</div>
</li>
{{/each}}
</ul>
{{else}}
<span class="no-activity">{{t 'no_badges'}}</span>
{{/if}}
</section>
</div>
{{/is}}
{{#isnt current_filter.identifier 'activities'}}
{{#isnt current_filter.identifier 'badges'}}
<div class="container">
<section class="profile-section">
{{#if contributions}}
<header class="profile-section-header">
<h2 class="profile-section-title">{{t current_filter.identifier}}</h2>
{{#if sorters}}
<span class="profile-section-description">{{sorter_description}}</span>
<span class="profile-section-sorter dropdown">
<button class="dropdown-toggle" aria-haspopup="true" aria-expanded="false">
{{current_sorter.label}}
<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" focusable="false" viewBox="0 0 12 12" class="dropdown-chevron-icon" aria-hidden="true">
<path fill="none" stroke="currentColor" stroke-linecap="round" d="M3 4.5l2.6 2.6c.2.2.5.2.7 0L9 4.5"/>
</svg>
</button>
<span class="dropdown-menu" role="menu">
{{#each sorters}}
<a href="{{url}}" aria-checked="{{selected}}" role="menuitemradio">
{{name}}
</a>
{{/each}}
</span>
</span>
{{/if}}
</header>
<ul class="profile-contribution-list profile-{{current_filter.identifier}}">
{{#each contributions}}
<li class="profile-contribution">
<span class="profile-contribution-icon" aria-hidden="true">
{{#is object_type "article"}}
<svg xmlns="http://www.w3.org/2000/svg" width="15" height="15" focusable="false" viewBox="0 0 12 12">
<path fill="none" stroke="currentColor" stroke-linecap="round" d="M3.5 5.5h5m-5 2h5m-5 2h5m2-6.29V11c0 .28-.22.5-.5.5H2c-.28 0-.5-.22-.5-.5V1c0-.28.22-.5.5-.5h5.79c.13 0 .26.05.35.15l2.21 2.21c.1.09.15.21.15.35zM7.5.5V3c0 .28.22.5.5.5h2.5"/>
</svg>
{{/is}}
{{#is object_type "post"}}
<svg xmlns="http://www.w3.org/2000/svg" width="15" height="15" focusable="false" viewBox="0 0 12 12">
<path fill="none" stroke="currentColor" stroke-linecap="round" d="M1.5 6.5H1C.7 6.5.5 6.3.5 6V1C.5.7.7.5 1 .5h7c.3 0 .5.2.5.5v2.5m-6-1h4m-1 5h4m-4 2h4M4 5.5h7c.3 0 .5.2.5.5v5c0 .3-.2.5-.5.5H4c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5z"/>
</svg>
{{/is}}
{{#is object_type "comment"}}
<svg xmlns="http://www.w3.org/2000/svg" width="15" height="15" focusable="false" viewBox="0 0 12 12">
<path fill="none" stroke="currentColor" d="M1 .5h10c.3 0 .5.2.5.5v7c0 .3-.2.5-.5.5H6l-2.6 2.6c-.3.3-.9.1-.9-.4V8.5H1C.7 8.5.5 8.3.5 8V1C.5.7.7.5 1 .5z"/>
</svg>
{{/is}}
</span>
<header class="profile-contribution-header">
{{#isnt object_type 'comment'}}
<h3 class="profile-contribution-title"><a href="{{url}}">{{title}}</a></h3>
{{/isnt}}
{{#isnt status 'none'}}
<span class="status-label status-label-{{status_dasherized}}">{{status_name}}</span>
{{/isnt}}
{{#if pending}}
<span class="status-label status-label-pending-moderation">{{t 'pending_approval'}}</span>
{{/if}}
{{#if official}}
<span class="status-label status-label-official">{{t 'official_comment'}}</span>
{{/if}}
</header>
<nav
{{#is object_type 'article'}}aria-label='{{t 'article_location_with_title' title=title}}'{{/is}}
{{#is object_type 'post'}}aria-label='{{t 'post_location_with_title' title=title}}'{{/is}}
{{#is object_type 'comment'}}aria-label='{{t 'comment_location_with_author_name' author_name=author.name}}'{{/is}}
>
<ol class="breadcrumbs profile-contribution-breadcrumbs">
{{#each path_steps}}
<li><a href="{{url}}">{{name}}</a></li>
{{/each}}
</ol>
</nav>
<p class="profile-contribution-body">{{excerpt body characters=200}}</p>
<div class="meta-group">
{{#is object_type 'comment'}}
<span class="meta-data">
<a class="comment-link" href={{url}}>{{t 'view_comment'}}</a>
</span>
{{/is}}
<span class="meta-data">{{author.name}}</span>
{{#if editor}}
<span class="meta-data">{{date edited_at timeago=true}}</span>
<span class="meta-data">
{{#is object_type 'article'}}
{{t 'updated'}}
{{else}}
{{t 'edited'}}
{{/is}}
</span>
{{else}}
<span class="meta-data">{{date created_at timeago=true}}</span>
{{/if}}
{{#each stats}}
<span class="meta-data">{{label}}</span>
{{/each}}
</div>
</li>
{{/each}}
</ul>
{{pagination}}
{{/if}}
{{#unless contributions}}
<span class="no-activity">{{t 'no_contributions'}}</span>
{{/unless}}
</section>
</div>
{{/isnt}}
{{/isnt}}
{{/if}}
{{#unless member_since}}
<div class="container">
<section class="profile-section">
<span class="no-activity">{{t 'no_content_yet'}}</span>
</section>
</div>
{{/unless}}
{{/if}}
{{#unless visible}}
<div class="container">
<section class="profile-section">
<span class="private-activity">
<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" focusable="false" viewBox="0 0 12 12" class="private-activity-icon">
<path fill="none" stroke="currentColor" d="M3.5 5.5V3a2.5 2.5 0 015 0v2.5"/>
<rect width="10" height="7" x="1" y="5" fill="currentColor" rx="1" ry="1"/>
</svg>
{{t 'private_activity'}}
</span>
</section>
</div>
{{/unless}}