views/dashboards i18n (#15069)
* views/dashboards etc i18n * remove ja.yml * Update en.yml * Update fr.yml * Update index.html.erb * Update index.html.erb * Update _dashboard_article.html.erb * Update subscriptions.html.erb * Update dashboard_spec.rb * Update _actions.html.erb
This commit is contained in:
parent
413f2c21d9
commit
e88d1adb47
20 changed files with 446 additions and 181 deletions
|
|
@ -2,92 +2,91 @@
|
|||
<ul class="list-none p-0">
|
||||
<li>
|
||||
<a class="crayons-link crayons-link--block <%= "crayons-link--current" if params[:action] == "show" && (params[:which] == "organization" || params[:which].blank?) %>"
|
||||
href="<%= dashboard_path %>"
|
||||
<%= params[:action] == "show" && (params[:which] == "organization" || params[:which].blank?) ? ' aria-current="page"'.html_safe : "" %>>
|
||||
<%= t("core.posts") %>
|
||||
<span class="crayons-indicator"><%= @user.articles_count %></span>
|
||||
href="<%= dashboard_path %>"
|
||||
<%= params[:action] == "show" && (params[:which] == "organization" || params[:which].blank?) ? ' aria-current="page"'.html_safe : "" %>>
|
||||
<%= t("views.dashboard.actions.posts") %>
|
||||
<span class="crayons-indicator"><%= @user.articles_count %></span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a class="crayons-link crayons-link--block <%= "crayons-link--current" if params[:action] == "series" && (params[:which] == "organization" || params[:which].blank?) %>"
|
||||
href="<%= user_series_path(current_user.username) %>"
|
||||
<%= params[:action] == "series" && (params[:which] == "organization" || params[:which].blank?) ? ' aria-current="page"'.html_safe : "" %>>
|
||||
<%= t("core.series") %>
|
||||
<span class="crayons-indicator"><%= @user.collections.count %></span>
|
||||
href="<%= user_series_path(current_user.username) %>"
|
||||
<%= params[:action] == "series" && (params[:which] == "organization" || params[:which].blank?) ? ' aria-current="page"'.html_safe : "" %>>
|
||||
<%= t("views.dashboard.actions.series") %>
|
||||
<span class="crayons-indicator"><%= @user.collections.count %></span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a class="crayons-link crayons-link--block <%= "crayons-link--current" if params[:action] == "followers" %>"
|
||||
href="/dashboard/user_followers"
|
||||
<%= params[:action] == "followers" ? ' aria-current="page"'.html_safe : "" %>>
|
||||
<%= t("core.followers") %>
|
||||
<span class="crayons-indicator"><%= @user.followers_count %></span>
|
||||
href="/dashboard/user_followers"
|
||||
<%= params[:action] == "followers" ? ' aria-current="page"'.html_safe : "" %>>
|
||||
<%= t("views.dashboard.actions.followers") %>
|
||||
<span class="crayons-indicator"><%= @user.followers_count %></span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a class="crayons-link crayons-link--block <%= "crayons-link--current" if params[:action] == "following_tags" %>"
|
||||
href="<%= dashboard_following_tags_path %>"
|
||||
<%= params[:action] == "following_tags" ? ' aria-current="page"'.html_safe : "" %>>
|
||||
Following tags
|
||||
<span class="crayons-indicator"><%= @user.following_tags_count %></span>
|
||||
href="<%= dashboard_following_tags_path %>"
|
||||
<%= params[:action] == "following_tags" ? ' aria-current="page"'.html_safe : "" %>>
|
||||
<%= t("views.dashboard.actions.following_tags") %>
|
||||
<span class="crayons-indicator"><%= @user.following_tags_count %></span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a class="crayons-link crayons-link--block <%= "crayons-link--current" if params[:action] == "following_users" %>"
|
||||
href="<%= dashboard_following_users_path %>"
|
||||
<%= params[:action] == "following_users" ? ' aria-current="page"'.html_safe : "" %>>
|
||||
Following users
|
||||
<span class="crayons-indicator"><%= @user.following_users_count %></span>
|
||||
href="<%= dashboard_following_users_path %>"
|
||||
<%= params[:action] == "following_users" ? ' aria-current="page"'.html_safe : "" %>>
|
||||
<%= t("views.dashboard.actions.following_users") %>
|
||||
<span class="crayons-indicator"><%= @user.following_users_count %></span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a class="crayons-link crayons-link--block <%= "crayons-link--current" if params[:action] == "following_organizations" %>"
|
||||
href="<%= dashboard_following_organizations_path %>"
|
||||
<%= params[:action] == "following_organizations" ? ' aria-current="page"'.html_safe : "" %>>
|
||||
Following organizations
|
||||
<span class="crayons-indicator"><%= @user.following_organizations_count %></span>
|
||||
href="<%= dashboard_following_organizations_path %>"
|
||||
<%= params[:action] == "following_organizations" ? ' aria-current="page"'.html_safe : "" %>>
|
||||
<%= t("views.dashboard.actions.following_orgs") %>
|
||||
<span class="crayons-indicator"><%= @user.following_organizations_count %></span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a class="crayons-link crayons-link--block <%= "crayons-link--current" if params[:action] == "following_podcasts" %>"
|
||||
href="<%= dashboard_following_podcasts_path %>"
|
||||
<%= params[:action] == "following_podcasts" ? ' aria-current="page"'.html_safe : "" %>>
|
||||
Following podcasts
|
||||
<span class="crayons-indicator"><%= @user.following_podcasts_count %></span>
|
||||
href="<%= dashboard_following_podcasts_path %>"
|
||||
<%= params[:action] == "following_podcasts" ? ' aria-current="page"'.html_safe : "" %>>
|
||||
<%= t("views.dashboard.actions.following_pods") %>
|
||||
<span class="crayons-indicator"><%= @user.following_podcasts_count %></span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a class="crayons-link crayons-link--block" href="/listings/dashboard" data-no-instant>
|
||||
<%= t("core.listings") %>
|
||||
<%= inline_svg_tag("external-link.svg", aria_hidden: true, class: "crayons-icon ml-1") %>
|
||||
<%= t("views.dashboard.actions.listings") %>
|
||||
<%= inline_svg_tag("external-link.svg", aria_hidden: true, class: "crayons-icon ml-1") %>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a class="crayons-link crayons-link--block" href="<%= dashboard_analytics_path %>">
|
||||
<%= t("core.analytics") %>
|
||||
<%= t("views.dashboard.actions.analytics") %>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<% if @organizations && (params[:which].blank? || params[:which] == "organization") %>
|
||||
<% @organizations.each do |org| %>
|
||||
<li>
|
||||
<a class="crayons-link crayons-link--block" href="<%= dashboard_analytics_org_path(org.id) %>">Analytics for <%= org.name %></a>
|
||||
<a class="crayons-link crayons-link--block" href="<%= dashboard_analytics_org_path(org.id) %>"><%= t("views.dashboard.actions.for_org", org: org.name) %></a>
|
||||
</li>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<% if policy(:video).new? && policy(:video).enabled? %>
|
||||
<li>
|
||||
<a class="crayons-btn crayons-btn--secondary w-100 mt-4" href="<%= new_video_path %>" data-no-instant> <%= t("dashboard.upload_a_video") %></a>
|
||||
</li>
|
||||
<a class="crayons-btn crayons-btn--secondary w-100 mt-4" href="<%= new_video_path %>" data-no-instant><%= t("views.dashboard.actions.upload") %>
|
||||
</a>
|
||||
<% end %>
|
||||
</ul>
|
||||
</nav>
|
||||
|
|
|
|||
|
|
@ -1,24 +1,24 @@
|
|||
<div class="block m:hidden pt-3">
|
||||
<select id="mobile_nav_dashboard" class="crayons-select">
|
||||
<option value="/dashboard" <%= "selected" if params[:action] == "show" && (params[:which] == "organization" || params[:which].blank?) %>><%= t("core.posts") %> (<%= @user.articles_count %>)</option>
|
||||
<option value="/dashboard/user_followers" <%= "selected" if params[:action] == "followers" %>><%= t("core.followers") %>(<%= @user.followers_count %>)</option>
|
||||
<option value="/dashboard/following_tags" <%= "selected" if params[:action] == "following_tags" %>>Following tags (<%= @user.following_tags_count %>)</option>
|
||||
<option value="/dashboard/following_users" <%= "selected" if params[:action] == "following_users" %>>Following users (<%= @user.following_users_count %>)</option>
|
||||
<option value="/dashboard/following_organizations" <%= "selected" if params[:action] == "following_organizations" %>>Following organizations (<%= @user.following_organizations_count %>)</option>
|
||||
<option value="/dashboard/following_podcasts" <%= "selected" if params[:action] == "following_podcasts" %>>Following podcasts (<%= @user.following_podcasts_count %>)</option>
|
||||
<option value="/dashboard" <%= "selected" if params[:action] == "show" && (params[:which] == "organization" || params[:which].blank?) %>><%= t("views.dashboard.actions.mobile.posts", num: @user.articles_count) %></option>
|
||||
<option value="/dashboard/user_followers" <%= "selected" if params[:action] == "followers" %>><%= t("views.dashboard.actions.mobile.followers", num: @user.followers_count) %></option>
|
||||
<option value="/dashboard/following_tags" <%= "selected" if params[:action] == "following_tags" %>><%= t("views.dashboard.actions.mobile.following_tags", num: @user.following_tags_count) %></option>
|
||||
<option value="/dashboard/following_users" <%= "selected" if params[:action] == "following_users" %>><%= t("views.dashboard.actions.mobile.following_users", num: @user.following_users_count) %></option>
|
||||
<option value="/dashboard/following_organizations" <%= "selected" if params[:action] == "following_organizations" %>><%= t("views.dashboard.actions.mobile.following_orgs", num: @user.following_organizations_count) %></option>
|
||||
<option value="/dashboard/following_podcasts" <%= "selected" if params[:action] == "following_podcasts" %>><%= t("views.dashboard.actions.mobile.following_pods", num: @user.following_podcasts_count) %></option>
|
||||
|
||||
<option value="/listings/dashboard"><%= t("core.listings") %></option>
|
||||
<option value="/listings/dashboard"><%= t("views.dashboard.actions.listings") %></option>
|
||||
|
||||
<option value="<%= dashboard_analytics_path %>"><%= t("core.analytics") %></option>
|
||||
<option value="<%= dashboard_analytics_path %>"><%= t("views.dashboard.actions.analytics") %></option>
|
||||
|
||||
<% if @organizations && (params[:which].blank? || params[:which] == "organization") %>
|
||||
<% @organizations.each do |org| %>
|
||||
<option value="<%= dashboard_analytics_org_path(org.id) %>">Analytics for <%= org.name %></option>
|
||||
<option value="<%= dashboard_analytics_org_path(org.id) %>"><%= t("views.dashboard.actions.for_org", org: org.name) %></option>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<% if policy(:video).new? && policy(:video).enabled? %>
|
||||
<option value="<%= new_video_path %>"><%= t("dashboard.upload_a_video") %></option>
|
||||
<option value="<%= new_video_path %>"><%= t("views.dashboard.actions.upload") %></option>
|
||||
<% end %>
|
||||
</select>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -3,21 +3,21 @@
|
|||
<div class="grid grid-cols-2 m:grid-cols-4 gap-2 m:gap-4 pt-3">
|
||||
<div class="crayons-card crayons-card--secondary p-3 m:p-6">
|
||||
<strong class="fs-2xl m:fs-3xl lh-tight color-base-90"><%= number_with_delimiter(@reactions_count, delimeter: ",") %></strong>
|
||||
<span class="color-base-60 block fs-base">Total post reactions</span>
|
||||
<span class="color-base-60 block fs-base"><%= t("views.dashboard.summary.reactions") %></span>
|
||||
</div>
|
||||
|
||||
<div class="crayons-card crayons-card--secondary p-3 m:p-6">
|
||||
<strong class="fs-2xl m:fs-3xl lh-tight color-base-90"><%= num_views > 500 ? number_with_delimiter(num_views, delimeter: ",") : "< 500" %></strong>
|
||||
<span class="color-base-60 block fs-base">Total post views</span>
|
||||
<strong class="fs-2xl m:fs-3xl lh-tight color-base-90"><%= num_views > 500 ? number_with_delimiter(num_views, delimeter: ",") : t("views.dashboard.summary.lt_500") %></strong>
|
||||
<span class="color-base-60 block fs-base"><%= t("views.dashboard.summary.views") %></span>
|
||||
</div>
|
||||
|
||||
<div class="crayons-card crayons-card--secondary p-3 m:p-6">
|
||||
<strong class="fs-2xl m:fs-3xl lh-tight color-base-90"><%= @user.listings.size %></strong>
|
||||
<span class="color-base-60 block fs-base">Listings created</span>
|
||||
<span class="color-base-60 block fs-base"><%= t("views.dashboard.summary.listings") %></span>
|
||||
</div>
|
||||
|
||||
<div class="crayons-card crayons-card--secondary p-3 m:p-6">
|
||||
<strong class="fs-2xl m:fs-3xl lh-tight color-base-90"><%= @user.unspent_credits_count %></strong>
|
||||
<span class="color-base-60 block fs-base">Credits available</span>
|
||||
<span class="color-base-60 block fs-base"><%= t("views.dashboard.summary.credits") %></span>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -4,13 +4,13 @@
|
|||
<span class="dashboard-top-pill"><%= article.organization&.name %></span>
|
||||
<% end %>
|
||||
<% if article.collection_id %>
|
||||
<span class="dashboard-top-pill"><strong>Series:</strong> <%= article.series %></span>
|
||||
<span class="dashboard-top-pill"><%= t("views.dashboard.article.series_html", series: article.series) %></span>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<div class="js-ellipsis-menu relative inline-block float-right">
|
||||
<button id="ellipsis-menu-trigger-<%= article.id %>" aria-controls="ellipsis-menu-dropdown-<%= article.id %>" aria-expanded="false" aria-haspopup="true" class="crayons-btn crayons-btn--ghost crayons-btn--s crayons-btn--icon">
|
||||
<%= inline_svg_tag("overflow-horizontal.svg", aria: true, class: "crayons-icon", title: "More...") %>
|
||||
<%= inline_svg_tag("overflow-horizontal.svg", aria: true, class: "crayons-icon", title: t("views.dashboard.article.more.icon")) %>
|
||||
</button>
|
||||
|
||||
<div id="ellipsis-menu-dropdown-<%= article.id %>" class="crayons-dropdown top-100 right-0 z-10 align-left js-ellipsis-menu-dropdown">
|
||||
|
|
@ -18,22 +18,26 @@
|
|||
<%= f.hidden_field :archived, value: !article.archived %>
|
||||
|
||||
<button type="submit" class="crayons-link crayons-link--block w-100 border-0 bg-transparent">
|
||||
<%= article.archived ? "Unarchive post" : "Archive post" %>
|
||||
<%= t("views.dashboard.article.#{article.archived ? 'unarchive' : 'archive'}") %>
|
||||
</button>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<a href="<%= article.current_state_path %>"><h2><%= "[Archived] " if article.archived %><%= article.title %></h2></a>
|
||||
<a href="<%= article.current_state_path %>"><h2>
|
||||
<%= t("views.dashboard.article.heading.text_html",
|
||||
archived: article.archived ? t("views.dashboard.article.heading.archived") : "",
|
||||
title: article.title) %>
|
||||
</h2></a>
|
||||
<div class="dashboard-meta-details">
|
||||
<% if article.published %>
|
||||
<span>
|
||||
Published: <time datetime="<%= article.published_timestamp %>"><%= article.readable_publish_date %></time>
|
||||
<%= t("views.dashboard.article.published_html", date: tag.time(article.readable_publish_date, datetime: article.published_timestamp)) %>
|
||||
</span>
|
||||
|
||||
<% if article.edited? %>
|
||||
<span>
|
||||
· Edited: <time datetime="<%= article.edited_at.utc.iso8601 %>"><%= article.readable_edit_date %></time>
|
||||
· <%= t("views.dashboard.article.edited_html", date: tag.time(article.readable_edit_date, datetime: article.edited_at.utc.iso8601)) %>
|
||||
</span>
|
||||
<% end %>
|
||||
|
||||
|
|
@ -44,60 +48,50 @@
|
|||
</div>
|
||||
<div class="dashboard-actions">
|
||||
<% if !article.published %>
|
||||
<a href="<%= article.current_state_path %>" class="crayons-btn">Draft</a>
|
||||
<a href="<%= article.current_state_path %>" class="crayons-btn"><%= t("views.dashboard.article.draft") %></a>
|
||||
<% end %>
|
||||
<a href="<%= article.path %>/edit" class="crayons-btn">Edit</a>
|
||||
<a href="<%= article.path %>/edit" class="crayons-btn"><%= t("views.dashboard.article.edit.text") %></a>
|
||||
<% if manage_view %>
|
||||
<a href="<%= article.path %>/delete_confirm" data-no-instant class="crayons-btn crayons-btn--danger">Delete</a>
|
||||
<a href="<%= article.path %>/delete_confirm" data-no-instant class="crayons-btn crayons-btn--danger"><%= t("views.dashboard.article.delete") %></a>
|
||||
<% if article.profile_pins.any? %>
|
||||
<%= form_for(article.profile_pins.first) do |f| %>
|
||||
<button class="crayons-btn crayons-btn--secondary">UNPIN</button>
|
||||
<button class="crayons-btn crayons-btn--secondary"><%= t("views.dashboard.article.unpin") %></button>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<%= form_for(ProfilePin.new) do |f| %>
|
||||
<%= f.hidden_field :pinnable_id, value: article.id %>
|
||||
<button class="crayons-btn">Pin to profile</button>
|
||||
<button class="crayons-btn"><%= t("views.dashboard.article.pin.button") %></button>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% elsif article.published %>
|
||||
<a href="<%= article.path %>/manage" class="crayons-btn">Manage</a>
|
||||
<a href="<%= article.path %>/manage" class="crayons-btn"><%= t("views.dashboard.article.manage.text") %></a>
|
||||
<% elsif @user == article.user %>
|
||||
<a href="<%= article.path %>/delete_confirm" data-no-instant class="crayons-btn crayons-btn--danger">Delete</a>
|
||||
<a href="<%= article.path %>/delete_confirm" data-no-instant class="crayons-btn crayons-btn--danger"><%= t("views.dashboard.article.delete") %></a>
|
||||
<% end %>
|
||||
|
||||
<a href="<%= article.path %>/stats" data-no-instant class="crayons-btn">Stats</a>
|
||||
<a href="<%= article.path %>/stats" data-no-instant class="crayons-btn"><%= t("views.dashboard.article.stats") %></a>
|
||||
|
||||
<% if discussion_lock %>
|
||||
<a href="<%= article.path %>/discussion_unlock_confirm" data-no-instant class="crayons-btn">Unlock discussion</a>
|
||||
<a href="<%= article.path %>/discussion_unlock_confirm" data-no-instant class="crayons-btn"><%= t("views.dashboard.article.unlock") %></a>
|
||||
<% else %>
|
||||
<a href="<%= article.path %>/discussion_lock_confirm" data-no-instant class="crayons-btn">Lock discussion</a>
|
||||
<a href="<%= article.path %>/discussion_lock_confirm" data-no-instant class="crayons-btn"><%= t("views.dashboard.article.lock") %></a>
|
||||
<% end %>
|
||||
|
||||
<% if article.published %>
|
||||
<span id="pageviews-<%= article.id %>" class="crayons-btn dashboard-pageviews-indicator" data-analytics-pageviews data-article-id="<%= article.id %>">
|
||||
<span class="page-views-count">
|
||||
<span class="value">
|
||||
<% if article.page_views_count > 25 %>
|
||||
<span class="value"><%= article.page_views_count %></span>
|
||||
<% else %>
|
||||
under 25
|
||||
<% end %>
|
||||
</span>
|
||||
views
|
||||
<% pvs = article.page_views_count %>
|
||||
<%= t("views.dashboard.article.views.text_html", count: pvs, scale: tag.span(pvs > 25 ? tag.span(pvs, class: %w[value]) : t("views.dashboard.article.views.u_25"), class: %w[value])) %>
|
||||
</span>
|
||||
//
|
||||
<span class="reactions-count">
|
||||
<span class="value">
|
||||
<%= article.public_reactions_count %>
|
||||
</span>
|
||||
<%= "reaction".pluralize(count: article.public_reactions_count) %>
|
||||
<% prs = article.public_reactions_count %>
|
||||
<%= t("views.dashboard.article.reactions.text_html", count: prs, num: tag.span(prs, class: %w[value])) %>
|
||||
</span>
|
||||
//
|
||||
<span class="comments-count">
|
||||
<span class="value">
|
||||
<%= article.comments_count %>
|
||||
</span>
|
||||
<%= "comment".pluralize(count: article.comments_count) %>
|
||||
<% pcs = article.comments_count %>
|
||||
<%= t("views.dashboard.article.comments.text_html", count: pcs, num: tag.span(pcs, class: %w[value])) %>
|
||||
</span>
|
||||
</span>
|
||||
<% end %>
|
||||
|
|
@ -105,8 +99,8 @@
|
|||
<% if organization && org_admin %>
|
||||
<%= form_for(article) do |f| %>
|
||||
<input type="hidden" name="destination" value="/dashboard/organization/<%= organization.id %>" />
|
||||
AUTHOR: <%= f.select(:user_id, options_for_select(organization.users.pluck(:name, :id), article.user_id)) %>
|
||||
<%= f.submit "Submit author change", class: "crayons-btn crayons-btn--secondary" %>
|
||||
<%= t("views.dashboard.article.author_is") %><%= f.select(:user_id, options_for_select(organization.users.pluck(:name, :id), article.user_id)) %>
|
||||
<%= f.submit t("views.dashboard.article.submit"), class: "crayons-btn crayons-btn--secondary" %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
<div class="dashboard-story__title">
|
||||
<h3 class="flex items-center">
|
||||
<% if article.archived %>
|
||||
<span class="crayons-indicator crayons-indicator--critical mr-2 fw-normal whitespace-nowrap">Archived</span>
|
||||
<span class="crayons-indicator crayons-indicator--critical mr-2 fw-normal whitespace-nowrap"><%= t("views.dashboard.article.archived") %></span>
|
||||
<% end %>
|
||||
<a href="<%= article.current_state_path %>" class="inline-flex items-center">
|
||||
<% if article.organization_id %>
|
||||
|
|
@ -15,14 +15,14 @@
|
|||
</h3>
|
||||
<% if article.published %>
|
||||
<p class="fs-s color-base-60 js-dashboard-story-details">
|
||||
<strong class="fw-medium">Published:</strong>
|
||||
<strong class="fw-medium"><%= t("views.dashboard.article.published") %></strong>
|
||||
<%= local_date(article.published_timestamp, show_year: article.displayable_published_at.year != Time.current.year) %>
|
||||
<% if article.edited? %>
|
||||
<strong class="fw-medium pl-2">Edited:</strong>
|
||||
<strong class="fw-medium pl-2"><%= t("views.dashboard.article.edited") %></strong>
|
||||
<%= local_date(article.edited_at, show_year: article.edited_at.year != Time.current.year) %>
|
||||
<% end %>
|
||||
<% if article.collection_id %>
|
||||
<strong class="fw-medium pl-2">Series:</strong> <%= article.series %>
|
||||
<strong class="fw-medium pl-2"><%= t("views.dashboard.article.series") %></strong> <%= article.series %>
|
||||
<% end %>
|
||||
</p>
|
||||
<% end %>
|
||||
|
|
@ -30,11 +30,11 @@
|
|||
|
||||
<div class="fs-s color-base-60">
|
||||
<% if !article.published? %>
|
||||
<a href="<%= article.path %>/edit" class="crayons-indicator crayons-indicator--accent">Draft</a>
|
||||
<a href="<%= article.path %>/edit" class="crayons-indicator crayons-indicator--accent"><%= t("views.dashboard.article.draft") %></a>
|
||||
<% else %>
|
||||
<div class="flex flex-nowrap whitespace-nowrap" data-analytics-pageviews data-article-id="<%= article.id %>">
|
||||
<span class="flex items-center p-1" title="Reactions">
|
||||
<%= inline_svg_tag("small-heart.svg", aria: true, class: "crayons-icon mr-1", title: "Reactions") %>
|
||||
<span class="flex items-center p-1" title="<%= t("views.dashboard.article.reactions.title") %>">
|
||||
<%= inline_svg_tag("small-heart.svg", aria: true, class: "crayons-icon mr-1", title: t("views.dashboard.article.reactions.icon")) %>
|
||||
<% if article.published %>
|
||||
<%= article.public_reactions_count %>
|
||||
<% else %>
|
||||
|
|
@ -42,20 +42,20 @@
|
|||
<% end %>
|
||||
</span>
|
||||
|
||||
<span class="flex items-center p-1 ml-1" title="Comments">
|
||||
<%= inline_svg_tag("small-comment.svg", aria: true, class: "crayons-icon mr-1", title: "Comments") %>
|
||||
<span class="flex items-center p-1 ml-1" title="<%= t("views.dashboard.article.comments.title") %>">
|
||||
<%= inline_svg_tag("small-comment.svg", aria: true, class: "crayons-icon mr-1", title: t("views.dashboard.article.comments.icon")) %>
|
||||
<span class="spec__comments-count">
|
||||
<%= article.comments_count %>
|
||||
</span>
|
||||
</span>
|
||||
|
||||
<span class="flex items-center p-1 ml-1" title="Views">
|
||||
<%= inline_svg_tag("small-eye.svg", aria: true, class: "crayons-icon mr-1", title: "Views") %>
|
||||
<span class="flex items-center p-1 ml-1" title="<%= t("views.dashboard.article.views.title") %>">
|
||||
<%= inline_svg_tag("small-eye.svg", aria: true, class: "crayons-icon mr-1", title: t("views.dashboard.article.views.icon")) %>
|
||||
<% if article.published %>
|
||||
<% if article.page_views_count > 25 %>
|
||||
<%= article.page_views_count %>
|
||||
<% else %>
|
||||
< 25
|
||||
<%= t("views.dashboard.article.views.lt_25") %>
|
||||
<% end %>
|
||||
<% else %>
|
||||
0
|
||||
|
|
@ -63,8 +63,8 @@
|
|||
</span>
|
||||
|
||||
<% if article.user_subscriptions_count > 0 %>
|
||||
<a href="<%= dashboard_subscriptions_path(source_type: "Article", source_id: article.id) %>" class="flex items-center crayons-btn crayons-btn--ghost-dimmed crayons-btn--s" title="Subscriptions">
|
||||
<%= inline_svg_tag("small-data.svg", aria: true, class: "crayons-icon mr-1", title: "Data") %>
|
||||
<a href="<%= dashboard_subscriptions_path(source_type: "Article", source_id: article.id) %>" class="flex items-center crayons-btn crayons-btn--ghost-dimmed crayons-btn--s" title="<%= t("views.dashboard.article.subscriptions.title") %>">
|
||||
<%= inline_svg_tag("small-data.svg", aria: true, class: "crayons-icon mr-1", title: t("views.dashboard.article.subscriptions.icon")) %>
|
||||
<%= article.user_subscriptions_count %>
|
||||
</a>
|
||||
<% end %>
|
||||
|
|
@ -74,40 +74,40 @@
|
|||
|
||||
<div class="dashboard-story__actions">
|
||||
<% if manage_view %>
|
||||
<a href="<%= article.path %>/delete_confirm" data-no-instant class="crayons-btn crayons-btn--ghost-danger crayons-btn--s">Delete</a>
|
||||
<a href="<%= article.path %>/delete_confirm" data-no-instant class="crayons-btn crayons-btn--ghost-danger crayons-btn--s"><%= t("views.dashboard.article.delete") %></a>
|
||||
|
||||
<% if article.profile_pins.any? %>
|
||||
<%= form_for(article.profile_pins.first) do |f| %>
|
||||
<button class="crayons-btn crayons-btn--ghost crayons-btn--s">Unpin</button>
|
||||
<button class="crayons-btn crayons-btn--ghost crayons-btn--s"><%= t("views.dashboard.article.unpin") %></button>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<%= form_for(ProfilePin.new) do |f| %>
|
||||
<%= f.hidden_field :pinnable_id, value: article.id %>
|
||||
<button class="crayons-btn crayons-btn--ghost crayons-btn--s" title="Pin to profile">Pin</button>
|
||||
<button class="crayons-btn crayons-btn--ghost crayons-btn--s" title="<%= t("views.dashboard.article.pin.title") %>"><%= t("views.dashboard.article.pin.text") %></button>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% elsif article.published %>
|
||||
<a href="<%= article.path %>/manage" class="crayons-btn crayons-btn--ghost crayons-btn--s" aria-label="Manage post: <%= article.title %>">Manage</a>
|
||||
<a href="<%= article.path %>/manage" class="crayons-btn crayons-btn--ghost crayons-btn--s" aria-label="<%= t("views.dashboard.article.manage.aria_label", title: article.title) %>"><%= t("views.dashboard.article.manage.text") %></a>
|
||||
<% elsif @user == article.user %>
|
||||
<a href="<%= article.path %>/delete_confirm" data-no-instant class="crayons-btn crayons-btn--ghost-danger crayons-btn--s">Delete</a>
|
||||
<a href="<%= article.path %>/delete_confirm" data-no-instant class="crayons-btn crayons-btn--ghost-danger crayons-btn--s"><%= t("views.dashboard.article.delete") %></a>
|
||||
<% end %>
|
||||
<a href="<%= article.path %>/edit" class="crayons-btn crayons-btn--ghost crayons-btn--s" aria-label="Edit post: <%= article.title %>">Edit</a>
|
||||
<a href="<%= article.path %>/edit" class="crayons-btn crayons-btn--ghost crayons-btn--s" aria-label="<%= t("views.dashboard.article.edit.aria_label", title: article.title) %>"><%= t("views.dashboard.article.edit.text") %></a>
|
||||
|
||||
<div class="js-ellipsis-menu relative inline-block">
|
||||
<button id="ellipsis-menu-trigger-<%= article.id %>" aria-controls="ellipsis-menu-dropdown-<%= article.id %>" aria-expanded="false" aria-haspopup="true" class="crayons-btn crayons-btn--ghost crayons-btn--s crayons-btn--icon">
|
||||
<%= inline_svg_tag("overflow-horizontal.svg", aria: true, class: "crayons-icon", title: "More options for post: #{article.title}") %>
|
||||
<%= inline_svg_tag("overflow-horizontal.svg", aria: true, class: "crayons-icon", title: t("views.dashboard.article.more.title", title: article.title)) %>
|
||||
</button>
|
||||
|
||||
<div id="ellipsis-menu-dropdown-<%= article.id %>" class="crayons-dropdown top-100 right-0 align-left js-ellipsis-menu-dropdown">
|
||||
<% if article.user_subscriptions_count > 0 %>
|
||||
<a href="<%= dashboard_subscriptions_path(source_type: "Article", source_id: article.id) %>" class="crayons-link crayons-link--block w-100"><%= "Subscriptions (#{article.user_subscriptions_count})" %></a>
|
||||
<a href="<%= dashboard_subscriptions_path(source_type: "Article", source_id: article.id) %>" class="crayons-link crayons-link--block w-100"><%= t("views.dashboard.article.subscriptions.number", num: article.user_subscriptions_count) %></a>
|
||||
<% end %>
|
||||
<a href="<%= article.path %>/stats" class="crayons-link crayons-link--block w-100">Stats</a>
|
||||
<a href="<%= article.path %>/stats" class="crayons-link crayons-link--block w-100"><%= t("views.dashboard.article.stats") %></a>
|
||||
<%= form_for(article, method: :patch, remote: true, authenticity_token: true, html: { "data-type": "json", class: "js-archive-toggle" }) do |f| %>
|
||||
<%= f.hidden_field :archived, value: !article.archived, id: "article_archived_#{article.id}" %>
|
||||
|
||||
<button type="submit" class="crayons-link crayons-link--block w-100 border-0 bg-transparent">
|
||||
<%= article.archived ? "Unarchive post" : "Archive post" %>
|
||||
<%= t("views.dashboard.article.#{article.archived ? 'unarchive' : 'archive'}") %>
|
||||
</button>
|
||||
<% end %>
|
||||
|
||||
|
|
@ -115,11 +115,11 @@
|
|||
<%= form_for(article, html: { class: "mt-4 pt-4 border-0 border-t-1 border-color-base-10 border-solid" }) do |f| %>
|
||||
<input type="hidden" name="destination" value="/dashboard/organization/<%= organization.id %>" />
|
||||
<div class="crayons-field mb-4">
|
||||
<label for="user_id" class="crayons-field__label">Author</label>
|
||||
<label for="user_id" class="crayons-field__label"><%= t("views.dashboard.article.author") %></label>
|
||||
<%= f.select :user_id, options_for_select(organization.users.pluck(:name, :id), article.user_id), {}, { class: "crayons-select" } %>
|
||||
|
||||
</div>
|
||||
<button type="submit" class="crayons-btn">Save</button>
|
||||
<button type="submit" class="crayons-btn"><%= t("views.dashboard.article.save") %></button>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<div class="sublist"></div>
|
||||
<div class="loading" id="loading-articles">
|
||||
<%= t("dashboard.loading") %>
|
||||
<%= t("core.loading") %>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,17 +1,17 @@
|
|||
<% title "Analytics" %>
|
||||
<% title t("views.dashboard.analytics.meta.title") %>
|
||||
|
||||
<main class="dashboard-container analytics-container crayons-layout" id="main-content">
|
||||
<nav aria-label="Dashboards">
|
||||
<ul class="list-none">
|
||||
<li>
|
||||
<a href="<%= dashboard_path %>" class="rounded-btn crayons-link--block rounded-btn--transparent">👈 Back to Main Dashboard</a>
|
||||
<a href="<%= dashboard_path %>" class="rounded-btn crayons-link--block rounded-btn--transparent"><%= t("views.dashboard.analytics.back") %></a>
|
||||
</li>
|
||||
<% if @organizations.any? %>
|
||||
<li>
|
||||
<a class="rounded-btn crayons-link--block organization"
|
||||
href="<%= dashboard_analytics_path %>"
|
||||
<%= params[:org_id] ? "" : 'aria-current="page"'.html_safe %>>
|
||||
Your Dashboard
|
||||
<%= t("views.dashboard.analytics.your") %>
|
||||
</a>
|
||||
</li>
|
||||
<% @organizations.each do |org| %>
|
||||
|
|
@ -21,7 +21,7 @@
|
|||
href="<%= dashboard_analytics_org_path(org.id) %>"
|
||||
data-organization-id="<%= org.id %>"
|
||||
<%= params[:org_id].to_i == org.id ? 'aria-current="page"'.html_safe : "" %>>
|
||||
<%= org.name %> Analytics Dashboard
|
||||
<%= t("views.dashboard.analytics.org", org: org.name) %>
|
||||
</a>
|
||||
</li>
|
||||
<% end %>
|
||||
|
|
@ -31,9 +31,9 @@
|
|||
|
||||
|
||||
<div class="crayons-card p-3 mt-5">
|
||||
<h1 class="fs-4xl fw-medium">Analytics Dashboard for <%= @user_or_org.name %></h1>
|
||||
<p>Welcome to the Analytics Dashboard, the home of in-depth user metrics so that authors can make data-driven decisions about the <%= Settings::Community.member_label %> ecosystem.</p>
|
||||
<p>This dashboard highlights deep insights especially relevant to <%= Settings::Community.member_label %> relations, authors, and serious bloggers.</p>
|
||||
<h1 class="fs-4xl fw-medium"><%= t("views.dashboard.analytics.heading", name: @user_or_org.name) %></h1>
|
||||
<p><%= t("views.dashboard.analytics.desc_1", members: Settings::Community.member_label) %></p>
|
||||
<p><%= t("views.dashboard.analytics.desc_2", members: Settings::Community.member_label) %></p>
|
||||
</div>
|
||||
|
||||
<%= render "shared/stats" %>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<% title("Dashboard - #{community_name}") %>
|
||||
<% title t("views.dashboard.meta.title", site: community_name) %>
|
||||
|
||||
<div id="index-container"
|
||||
data-params="<%= params.to_json(only: %i[which per_page]) %>"
|
||||
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
<main id="main-content" class="crayons-layout crayons-layout--header-inside crayons-layout--2-cols">
|
||||
<header class="crayons-page-header block">
|
||||
<h1 class="crayons-title"><%= t("core.dashboard") %> » <%= t("core.followers") %></h1>
|
||||
<h1 class="crayons-title"><%= t("views.dashboard.followers.heading") %></h1>
|
||||
<%= render "actions_mobile" %>
|
||||
</header>
|
||||
<div class="crayons-layout__sidebar-left">
|
||||
|
|
@ -41,7 +41,7 @@
|
|||
<% end %>
|
||||
</div>
|
||||
<% else %>
|
||||
<div class="p-9 crayons-card crayons-card--secondary align-center fs-l"><%= t("dashboard.empty_follower") %></div>
|
||||
<div class="p-9 crayons-card crayons-card--secondary align-center fs-l"><%= t("views.dashboard.followers.empty") %></div>
|
||||
<% end %>
|
||||
<%= render "sublist" %>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
<% title("Dashboard - #{community_name}") %>
|
||||
<% title t("views.dashboard.meta.title", site: community_name) %>
|
||||
|
||||
<div id="index-container"
|
||||
data-params="<%= params.to_json(only: %i[action per_page]) %>"
|
||||
data-which="following">
|
||||
<main id="main-content" class="crayons-layout crayons-layout--header-inside crayons-layout--2-cols">
|
||||
<header class="crayons-page-header block">
|
||||
<h1 class="crayons-title"><%= t("dashboard.page_title") %> » Following organizations</h1>
|
||||
<h1 class="crayons-title"><%= t("views.dashboard.following_orgs.heading") %></h1>
|
||||
<%= render "actions_mobile" %>
|
||||
</header>
|
||||
<div class="crayons-layout__sidebar-left">
|
||||
|
|
@ -38,7 +38,7 @@
|
|||
<% end %>
|
||||
</div>
|
||||
<% else %>
|
||||
<div class="p-9 crayons-card crayons-card--secondary align-center fs-l h-100 flex items-center justify-center">You don't follow any organizations yet...</div>
|
||||
<div class="p-9 crayons-card crayons-card--secondary align-center fs-l h-100 flex items-center justify-center"><%= t("views.dashboard.following_orgs.empty") %></div>
|
||||
<% end %>
|
||||
<%= render "sublist" %>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
<% title("Dashboard - #{community_name}") %>
|
||||
<% title t("views.dashboard.meta.title", site: community_name) %>
|
||||
|
||||
<div id="index-container"
|
||||
data-params="<%= params.to_json(only: %i[action per_page]) %>"
|
||||
data-which="following">
|
||||
<main id="main-content" class="crayons-layout crayons-layout--header-inside crayons-layout--2-cols">
|
||||
<header class="crayons-page-header block">
|
||||
<h1 class="crayons-title"><%= t("dashboard.page_title") %> » Following podcasts</h1>
|
||||
<h1 class="crayons-title"><%= t("views.dashboard.following_pods.heading") %></h1>
|
||||
<%= render "actions_mobile" %>
|
||||
</header>
|
||||
|
||||
|
|
@ -39,7 +39,7 @@
|
|||
<% end %>
|
||||
</div>
|
||||
<% else %>
|
||||
<div class="p-9 crayons-card crayons-card--secondary align-center fs-l h-100 flex items-center justify-center">You don't follow any podcasts yet...</div>
|
||||
<div class="p-9 crayons-card crayons-card--secondary align-center fs-l h-100 flex items-center justify-center"><%= t("views.dashboard.following_pods.empty") %></div>
|
||||
<% end %>
|
||||
<%= render "sublist" %>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
<% title("Dashboard - #{community_name}") %>
|
||||
<% title t("views.dashboard.meta.title", site: community_name) %>
|
||||
|
||||
<div id="index-container"
|
||||
data-params="<%= params.to_json(only: %i[action per_page]) %>"
|
||||
data-which="following">
|
||||
<main id="main-content" class="crayons-layout crayons-layout--header-inside crayons-layout--2-cols">
|
||||
<header class="crayons-page-header block">
|
||||
<h1 class="crayons-title">Dashboard » Following tags</h1>
|
||||
<h1 class="crayons-title"><%= t("views.dashboard.following_tags.heading") %></h1>
|
||||
<%= render "actions_mobile" %>
|
||||
</header>
|
||||
<div class="crayons-layout__sidebar-left">
|
||||
|
|
@ -16,8 +16,8 @@
|
|||
<%= javascript_packs_with_chunks_tag "dashboardTagsDisableUnchangedButtons", defer: true %>
|
||||
|
||||
<div class="crayons-notice crayons-notice--info p-4 mx-3 s:mx-0 mb-3" aria-live="polite">
|
||||
Adjust tag weight to modify your home feed. Higher values mean more appearances for that tag.
|
||||
<span class="crayons-indicator crayons-indicator--outlined crayons-indicator--accent ml-3">Default 1.0</span>
|
||||
<%= t("views.dashboard.following_tags.adjust") %>
|
||||
<span class="crayons-indicator crayons-indicator--outlined crayons-indicator--accent ml-3"><%= t("views.dashboard.following_tags.default") %></span>
|
||||
</div>
|
||||
<div id="following-wrapper" class="grid gap-3 m:gap-4 s:grid-cols-2 l:grid-cols-3 px-3 m:px-0">
|
||||
<% negative_follow_shown_once = false %>
|
||||
|
|
@ -28,7 +28,7 @@
|
|||
<h3 class="s:mb-1 -ml-1 p-0 fw-medium">
|
||||
<%= render_tag_link(tag.name) %>
|
||||
<% if follow.explicit_points < 0 %>
|
||||
<span class="crayons-indicator crayons-indicator--critical crayons-indicator--outlined" title="This tag has negative follow weight">Anti-follow</span>
|
||||
<span class="crayons-indicator crayons-indicator--critical crayons-indicator--outlined" title="<%= t("views.dashboard.following_tags.anti.title") %>"><%= t("views.dashboard.following_tags.anti.text") %></span>
|
||||
<% end %>
|
||||
</h3>
|
||||
|
||||
|
|
@ -38,7 +38,8 @@
|
|||
|
||||
<%= fields(follow) do |f| %>
|
||||
<%= f.hidden_field(:id, name: "follows[][id]", form: "follows_update_form", id: "follow_id_#{follow.followable}") %>
|
||||
<%= f.number_field(:explicit_points, step: :any, required: true, class: "crayons-textfield flex-1 fs-s", name: "follows[][explicit_points]", form: "follows_update_form", "aria-label": "#{follow.followable} tag weight", id: "explicit_points_#{follow.followable}") %>
|
||||
<%= f.number_field(:explicit_points, step: :any, required: true, class: "crayons-textfield flex-1 fs-s", name: "follows[][explicit_points]", form: "follows_update_form", "aria-label": t("views.dashboard.following_tags.number.aria_label", name: follow.followable),
|
||||
id: "explicit_points_#{follow.followable}") %>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
|
@ -46,10 +47,10 @@
|
|||
</div>
|
||||
|
||||
<%= form_with url: bulk_update_follows_path, method: :patch, local: true, class: "sticky bg-base-10 pt-3 pb-1 z-elevate", html: { style: "bottom: 0;margin-left:-1px" }, id: "follows_update_form" do |f| %>
|
||||
<button type="submit" class="crayons-btn crayons-btn--m mb-3" name="commit">Update Weights</button>
|
||||
<button type="submit" class="crayons-btn crayons-btn--m mb-3" name="commit"><%= t("views.dashboard.following_tags.update") %></button>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<div class="p-9 crayons-card crayons-card--secondary align-center fs-l h-100 flex items-center justify-center">You don't follow any tags yet...</div>
|
||||
<div class="p-9 crayons-card crayons-card--secondary align-center fs-l h-100 flex items-center justify-center"><%= t("views.dashboard.following_tags.empty") %></div>
|
||||
<% end %>
|
||||
<%= render "sublist" %>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
<% title("Dashboard - #{community_name}") %>
|
||||
<% title t("views.dashboard.meta.title", site: community_name) %>
|
||||
|
||||
<div id="index-container"
|
||||
data-params="<%= params.to_json(only: %i[action per_page]) %>"
|
||||
data-which="following">
|
||||
<main id="main-content" class="crayons-layout crayons-layout--header-inside crayons-layout--2-cols">
|
||||
<header class="crayons-page-header block">
|
||||
<h1 class="crayons-title"><%= t("dashboard.page_title") %> » <%= t("dashboard.following_users") %></h1>
|
||||
<h1 class="crayons-title"><%= t("views.dashboard.following_users.heading") %></h1>
|
||||
<%= render "actions_mobile" %>
|
||||
</header>
|
||||
|
||||
|
|
@ -42,7 +42,7 @@
|
|||
</div>
|
||||
<% else %>
|
||||
<div class="p-9 crayons-card crayons-card--secondary align-center fs-l h-100 flex items-center justify-center">
|
||||
<%= t("dashboard.not_following_any_users") %>
|
||||
<%= t("views.dashboard.following_users.empty") %>
|
||||
</div>
|
||||
<% end %>
|
||||
<%= render "sublist" %>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<% title "Dashboard" %>
|
||||
<% title t("views.dashboard.heading") %>
|
||||
<main id="main-content" class="crayons-layout crayons-layout--header-inside crayons-layout--2-cols">
|
||||
<header class="crayons-page-header block">
|
||||
<h1 class="crayons-title"><%= t("core.dashboard") %></h1>
|
||||
<h1 class="crayons-title"><%= t("views.dashboard.heading") %></h1>
|
||||
<%= render "actions_mobile" %>
|
||||
<%= render "analytics" %>
|
||||
</header>
|
||||
|
|
@ -12,23 +12,23 @@
|
|||
|
||||
<div class="crayons-layout__content">
|
||||
<div class="flex items-center justify-between mt-3">
|
||||
<h2 class="hidden m:block crayons-subtitle-2"><%= t("core.posts") %></h2>
|
||||
<h2 class="hidden m:block crayons-subtitle-2"><%= t("views.dashboard.posts.heading") %></h2>
|
||||
|
||||
<div class="flex flex-wrap px-3 gap-2">
|
||||
<% if params[:which] != "organization" %>
|
||||
<% if @articles.any?(&:archived) %>
|
||||
<%= link_to "Show archived", "javascript:;", id: "toggleArchivedLink", class: "crayons-btn crayons-btn--outlined whitespace-nowrap" %>
|
||||
<%= link_to t("views.dashboard.posts.archived"), "javascript:;", id: "toggleArchivedLink", class: "crayons-btn crayons-btn--outlined whitespace-nowrap" %>
|
||||
<% end %>
|
||||
<% if @articles.any? %>
|
||||
<%= select_tag "dashboard_sort", options_for_select(sort_options, params[:sort]), "aria-label": "Sort By", class: "crayons-select w-auto" %>
|
||||
<%= select_tag "dashboard_sort", options_for_select(sort_options, params[:sort]), "aria-label": t("views.dashboard.posts.option.aria_label"), class: "crayons-select w-auto" %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<% if @organizations && @organizations.size > 0 && (params[:which].blank? || params[:which] == "organization") %>
|
||||
<select id="dashboard_author" class="crayons-select w-auto">
|
||||
<option value="/dashboard" <%= "selected" if params[:which].blank? %>>Personal</option>
|
||||
<option value="/dashboard" <%= "selected" if params[:which].blank? %>><%= t("views.dashboard.posts.personal") %></option>
|
||||
<% @organizations.each do |org| %>
|
||||
<option value="/dashboard/organization/<%= org.id %>" <%= "selected" if params[:org_id].to_i == org.id %>><%= org.name %> (<%= org.articles_count %>)</option>
|
||||
<option value="/dashboard/organization/<%= org.id %>" <%= "selected" if params[:org_id].to_i == org.id %>><%= t("views.dashboard.posts.org", name: org.name, num: org.articles_count) %></option>
|
||||
<% end %>
|
||||
</select>
|
||||
<% end %>
|
||||
|
|
@ -58,8 +58,8 @@
|
|||
<% image_url = Images::Optimizer.call(Settings::General.mascot_image_url, width: 300, crop: "imagga_scale") %>
|
||||
<%= image_tag(image_url, class: "sloan mb-7", alt: "Mascot image") %>
|
||||
<% end %>
|
||||
<p class="mb-6"><%= t("dashboard.empty_post") %></p>
|
||||
<p><a href="/new" class="crayons-btn crayons-btn--l"><%= t("dashboard.write_new_post") %></a></p>
|
||||
<p class="mb-6"><%= t("views.dashboard.posts.empty.desc") %></p>
|
||||
<p><a href="/new" class="crayons-btn crayons-btn--l"><%= t("views.dashboard.posts.empty.new") %></a></p>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
|
|
|
|||
|
|
@ -1,14 +1,13 @@
|
|||
<% title "Subscriptions #{@source.title}" %>
|
||||
<% title t("views.dashboard.subscriptions.meta.title", title: @source.title) %>
|
||||
|
||||
<div class="crayons-layout">
|
||||
|
||||
<main id="main-content">
|
||||
<section class="flex items-center justify-between p-2 m:p-0">
|
||||
<div>
|
||||
<h1 class="crayons-title">Subscriptions</h1>
|
||||
<h1 class="crayons-title"><% t("views.dashboard.subscriptions.heading") %></h1>
|
||||
<h2 class="fs-base s:fs-xl fw-medium">
|
||||
<em class="fs-italic fw-normal color-base-60">for</em>
|
||||
<a href=<%= @source.path %>><%= @source.title %></a>
|
||||
<%= t "views.dashboard.subscriptions.subhead.text_html", for: tag.em(t("views.dashboard.subscriptions.subhead.for"), class: %w[fs-italic fw-normal color-base-60]), source: link_to(@source.title, @source.path) %>
|
||||
</h2>
|
||||
</div>
|
||||
<%#TODO: [@forem/delightful]: uncomment this when ready to implement CSV exports%>
|
||||
|
|
@ -23,7 +22,7 @@
|
|||
<tr>
|
||||
<td class="fw-medium"><a href=<%= user_profile_path(subscriber.username) %> <%= "#{subscriber.name} DEV profile" %>><%= subscriber.name %></a></td>
|
||||
<td><a href="<%= "mailto: #{subscription.subscriber_email}" %>"><%= subscription.subscriber_email %></a></td>
|
||||
<td class="fs-s color-base-60"><%= "#{time_ago_in_words(subscription.created_at)} ago" %></td>
|
||||
<td class="fs-s color-base-60"><%= time_ago_in_words subscription.created_at, scope: :"datetime.distance_in_words_ago" %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
|
|
@ -33,7 +32,7 @@
|
|||
</div>
|
||||
<% else %>
|
||||
<div class="p-9 crayons-card crayons-card--secondary align-center fs-l h-100 flex items-center justify-center">
|
||||
You don't have any subscribers for this <%= @source.class.name.downcase %> yet...
|
||||
<%= t("views.dashboard.subscriptions.empty", kind: @source.class.name.downcase) %>
|
||||
</div>
|
||||
<% end %>
|
||||
</main>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<% title "Listings Dashboard" %>
|
||||
<% title t("views.dashboard.listings.meta.title") %>
|
||||
|
||||
<main id="main-content">
|
||||
<div id="listings-dashboard"
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@ en:
|
|||
if_we_can_help_html: <a href="/contact">Contact us</a> if there is anything we can help with.
|
||||
core:
|
||||
add_comment: Add comment
|
||||
analytics: Analytics
|
||||
comment: Comment
|
||||
comments: Comments
|
||||
community_name_is_great: "%{community_name} is great!"
|
||||
|
|
@ -17,7 +16,6 @@ en:
|
|||
follow: Follow
|
||||
follow_back: Follow back
|
||||
follower: Follower
|
||||
followers: Followers
|
||||
following: Following
|
||||
joined: Joined
|
||||
joined_on: Joined on
|
||||
|
|
@ -29,7 +27,6 @@ en:
|
|||
more_from: More from
|
||||
pinned: Pinned
|
||||
post: Post
|
||||
posts: Posts
|
||||
reaction: Reaction
|
||||
reaction_pluralized:
|
||||
one: reaction
|
||||
|
|
@ -41,18 +38,8 @@ en:
|
|||
reply: Reply
|
||||
report_abuse: Report abuse
|
||||
search: Search
|
||||
series: Series
|
||||
settings: Settings
|
||||
trending_on: Trending on
|
||||
dashboard:
|
||||
empty_follower: You don't have any followers yet...
|
||||
empty_post: This is where you can manage your posts, but you haven't written anything yet.
|
||||
following_users: Following users
|
||||
loading: loading...
|
||||
not_following_any_users: You don't follow any users...
|
||||
page_title: Dashboard
|
||||
upload_a_video: Upload a video
|
||||
write_new_post: Write your first post now
|
||||
datetime:
|
||||
distance_in_words_ago: # https://github.com/openstreetmap/openstreetmap-website/issues/2255
|
||||
about_x_hours:
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@ fr:
|
|||
if_we_can_help_html: <a href="/contact">Contactez-nous</a> si nous pouvons vous aider.
|
||||
core:
|
||||
add_comment: Ajouter un commentaire
|
||||
analytics: Analytique
|
||||
comment: Commentaire
|
||||
comments: Commentaires
|
||||
community_name_is_great: "%{community_name} est super"
|
||||
|
|
@ -17,7 +16,6 @@ fr:
|
|||
follow: Suivre
|
||||
follow_back: Suivre aussi
|
||||
follower: Suiveur
|
||||
followers: Suiveurs
|
||||
following: Abonné
|
||||
joined: Rejoint
|
||||
joined_on: Rejoint le
|
||||
|
|
@ -29,7 +27,6 @@ fr:
|
|||
more_from: Plus de la part de
|
||||
pinned: Épinglé
|
||||
post: Publication
|
||||
posts: Publications
|
||||
reaction: Réaction
|
||||
reaction_pluralized:
|
||||
one: réaction
|
||||
|
|
@ -41,18 +38,8 @@ fr:
|
|||
reply: Répondre
|
||||
report_abuse: Signaler un abus
|
||||
search: Recherche
|
||||
series: Séries
|
||||
settings: Paramètres
|
||||
trending_on: Populaire sur
|
||||
dashboard:
|
||||
empty_follower: Vous n'avez pas encore d'abonnés...
|
||||
empty_post: C'est ici que vous pouvez gérer vos messages, mais vous n'avez encore rien écrit
|
||||
following_users: Utilisateurs suivis
|
||||
loading: Chargement en cours...
|
||||
not_following_any_users: Vous ne suivez aucun utilisateur...
|
||||
page_title: Tableau de bord
|
||||
upload_a_video: Charger une vidéo
|
||||
write_new_post: Écrivez votre premier message maintenant
|
||||
date:
|
||||
abbr_month_names:
|
||||
-
|
||||
|
|
|
|||
149
config/locales/views/dashboard/en.yml
Normal file
149
config/locales/views/dashboard/en.yml
Normal file
|
|
@ -0,0 +1,149 @@
|
|||
---
|
||||
en:
|
||||
views:
|
||||
dashboard:
|
||||
meta:
|
||||
title: Dashboard - %{site}
|
||||
heading: Dashboard
|
||||
actions:
|
||||
mobile:
|
||||
posts: Posts (%{num})
|
||||
followers: Followers (%{num})
|
||||
following_tags: Following tags (%{num})
|
||||
following_users: Following users (%{num})
|
||||
following_orgs: Following organizations (%{num})
|
||||
following_pods: Following podcasts (%{num})
|
||||
posts: Posts
|
||||
series: Series
|
||||
followers: Followers
|
||||
following_tags: Following tags
|
||||
following_users: Following users
|
||||
following_orgs: Following organizations
|
||||
following_pods: Following podcasts
|
||||
listings: Listings
|
||||
analytics: Analytics
|
||||
for_org: Analytics for %{org}
|
||||
upload: Upload a video
|
||||
analytics:
|
||||
meta:
|
||||
title: Analytics
|
||||
heading: Analytics Dashboard for %{name}
|
||||
desc_1: Welcome to the Analytics Dashboard, the home of in-depth user metrics so that authors can make data-driven decisions about the %{members} ecosystem.
|
||||
desc_2: This dashboard highlights deep insights especially relevant to %{members} relations, authors, and serious bloggers.
|
||||
back: "👈 Back to Main Dashboard"
|
||||
your: Your Dashboard
|
||||
org: "%{org} Analytics Dashboard"
|
||||
article:
|
||||
heading:
|
||||
text_html: "%{archived}%{title}"
|
||||
archived: "[Archived] "
|
||||
archived: Archived
|
||||
published: 'Published:'
|
||||
published_html: 'Published: %{date}'
|
||||
edited: 'Edited:'
|
||||
edited_html: 'Edited: %{date}'
|
||||
series: 'Series:'
|
||||
series_html: "<strong>Series:</strong> %{series}"
|
||||
draft: Draft
|
||||
reactions:
|
||||
title: Reactions
|
||||
icon: Reactions
|
||||
text_html:
|
||||
one: "%{num} reaction"
|
||||
other: "%{num} reactions"
|
||||
comments:
|
||||
title: Comments
|
||||
icon: Comments
|
||||
text_html:
|
||||
one: "%{num} comment"
|
||||
other: "%{num} comments"
|
||||
views:
|
||||
title: Views
|
||||
icon: Views
|
||||
lt_25: "< 25"
|
||||
text_html:
|
||||
other: "%{scale} views"
|
||||
u_25: under 25
|
||||
subscriptions:
|
||||
title: Subscriptions
|
||||
icon: Data
|
||||
number: Subscriptions (%{num})
|
||||
delete: Delete
|
||||
unpin: Unpin
|
||||
pin:
|
||||
title: Pin to profile
|
||||
button: Pin to profile
|
||||
text: Pin
|
||||
manage:
|
||||
aria_label: 'Manage post: %{title}'
|
||||
text: Manage
|
||||
lock: Lock discussion
|
||||
unlock: Unlock discussion
|
||||
edit:
|
||||
aria_label: 'Edit post: %{title}'
|
||||
text: Edit
|
||||
more:
|
||||
title: 'More options for post: %{title}'
|
||||
icon: More...
|
||||
stats: Stats
|
||||
archive: Archive post
|
||||
unarchive: Unarchive post
|
||||
author: Author
|
||||
author_is: 'AUTHOR: '
|
||||
save: Save
|
||||
submit: Submit author change
|
||||
followers:
|
||||
heading: Dashboard » Followers
|
||||
empty: You don't have any followers yet...
|
||||
following_orgs:
|
||||
heading: Dashboard » Following organizations
|
||||
empty: You don't follow any organizations yet...
|
||||
following_pods:
|
||||
heading: Dashboard » Following podcasts
|
||||
empty: You don't follow any podcasts yet...
|
||||
following_tags:
|
||||
heading: Dashboard » Following tags
|
||||
adjust: Adjust tag weight to modify your home feed. Higher values mean more appearances for that tag.
|
||||
anti:
|
||||
title: This tag has negative follow weight
|
||||
text: Anti-follow
|
||||
default: Default 1.0
|
||||
empty: You don't follow any tags yet...
|
||||
number:
|
||||
aria_label: "%{name} tag weight"
|
||||
update: Update Weights
|
||||
following_users:
|
||||
heading: Dashboard » Following users
|
||||
empty: You don't follow any users...
|
||||
listings:
|
||||
meta:
|
||||
title: Listings Dashboard
|
||||
posts:
|
||||
heading: Posts
|
||||
archived: Show archived
|
||||
option:
|
||||
creation-desc: Recently Created
|
||||
published-desc: Recently Published
|
||||
views-desc: Most Views
|
||||
reactions-desc: Most Reactions
|
||||
comments-desc: Most Comments
|
||||
aria_label: Sort By
|
||||
org: "%{name} (%{num})"
|
||||
personal: Personal
|
||||
empty:
|
||||
desc: This is where you can manage your posts, but you haven't written anything yet.
|
||||
new: Write your first post now
|
||||
subscriptions:
|
||||
meta:
|
||||
title: Subscriptions %{title}
|
||||
heading: Subscriptions
|
||||
subhead:
|
||||
text_html: "%{for} %{source}"
|
||||
for: for
|
||||
empty: You don't have any subscribers for this %{kind} yet...
|
||||
summary:
|
||||
reactions: Total post reactions
|
||||
views: Total post views
|
||||
listings: Listings created
|
||||
credits: Credits available
|
||||
lt_500: "< 500"
|
||||
149
config/locales/views/dashboard/fr.yml
Normal file
149
config/locales/views/dashboard/fr.yml
Normal file
|
|
@ -0,0 +1,149 @@
|
|||
---
|
||||
fr:
|
||||
views:
|
||||
dashboard:
|
||||
meta:
|
||||
title: Dashboard - %{site}
|
||||
heading: Tableau de bord
|
||||
actions:
|
||||
mobile:
|
||||
posts: Publications (%{num})
|
||||
followers: Suiveurs (%{num})
|
||||
following_tags: Following tags (%{num})
|
||||
following_users: Following users (%{num})
|
||||
following_orgs: Following organizations (%{num})
|
||||
following_pods: Following podcasts (%{num})
|
||||
posts: Publications
|
||||
series: Séries
|
||||
followers: Suiveurs
|
||||
following_tags: Following tags
|
||||
following_users: Following users
|
||||
following_orgs: Following organizations
|
||||
following_pods: Following podcasts
|
||||
listings: Annonces
|
||||
analytics: Analytique
|
||||
for_org: Analytics for %{org}
|
||||
upload: Charger une vidéo
|
||||
analytics:
|
||||
meta:
|
||||
title: Analytics
|
||||
heading: Analytics Dashboard for %{name}
|
||||
desc_1: Welcome to the Analytics Dashboard, the home of in-depth user metrics so that authors can make data-driven decisions about the %{members} ecosystem.
|
||||
desc_2: This dashboard highlights deep insights especially relevant to %{members} relations, authors, and serious bloggers.
|
||||
back: "👈 Back to Main Dashboard"
|
||||
your: Your Dashboard
|
||||
org: "%{org} Analytics Dashboard"
|
||||
article:
|
||||
heading:
|
||||
text_html: "%{archived}%{title}"
|
||||
archived: "[Archived] "
|
||||
archived: Archived
|
||||
published: 'Published:'
|
||||
published_html: 'Published: %{date}'
|
||||
edited: 'Edited:'
|
||||
edited_html: 'Edited: %{date}'
|
||||
series: 'Series:'
|
||||
series_html: "<strong>Series:</strong> %{series}"
|
||||
draft: Draft
|
||||
reactions:
|
||||
title: Reactions
|
||||
icon: Reactions
|
||||
text_html:
|
||||
one: "%{num} reaction"
|
||||
other: "%{num} reactions"
|
||||
comments:
|
||||
title: Comments
|
||||
icon: Comments
|
||||
text_html:
|
||||
one: "%{num} comment"
|
||||
other: "%{num} comments"
|
||||
views:
|
||||
title: Views
|
||||
icon: Views
|
||||
lt_25: "< 25"
|
||||
text_html:
|
||||
other: "%{scale} views"
|
||||
u_25: under 25
|
||||
subscriptions:
|
||||
title: Subscriptions
|
||||
icon: Data
|
||||
number: Subscriptions (%{num})
|
||||
delete: Delete
|
||||
unpin: Unpin
|
||||
pin:
|
||||
title: Pin to profile
|
||||
button: Pin to profile
|
||||
text: Pin
|
||||
manage:
|
||||
aria_label: 'Manage post: %{title}'
|
||||
text: Manage
|
||||
lock: Lock discussion
|
||||
unlock: Unlock discussion
|
||||
edit:
|
||||
aria_label: 'Edit post: %{title}'
|
||||
text: Edit
|
||||
more:
|
||||
title: 'More options for post: %{title}'
|
||||
icon: More...
|
||||
stats: Stats
|
||||
archive: Archive post
|
||||
unarchive: Unarchive post
|
||||
author: Author
|
||||
author_is: 'AUTHOR: '
|
||||
save: Save
|
||||
submit: Submit author change
|
||||
followers:
|
||||
heading: Tableau de bord » Suiveurs
|
||||
empty: Vous n'avez pas encore d'abonnés...
|
||||
following_orgs:
|
||||
heading: Dashboard » Following organizations
|
||||
empty: You don't follow any organizations yet...
|
||||
following_pods:
|
||||
heading: Dashboard » Following podcasts
|
||||
empty: You don't follow any podcasts yet...
|
||||
following_tags:
|
||||
heading: Dashboard » Following tags
|
||||
adjust: Adjust tag weight to modify your home feed. Higher values mean more appearances for that tag.
|
||||
anti:
|
||||
title: This tag has negative follow weight
|
||||
text: Anti-follow
|
||||
default: Default 1.0
|
||||
empty: You don't follow any tags yet...
|
||||
number:
|
||||
aria_label: "%{name} tag weight"
|
||||
update: Update Weights
|
||||
following_users:
|
||||
heading: Tableau de bord » Utilisateurs suivis
|
||||
empty: Vous ne suivez aucun utilisateur...
|
||||
listings:
|
||||
meta:
|
||||
title: Listings Dashboard
|
||||
posts:
|
||||
heading: Publications
|
||||
archived: Show archived
|
||||
option:
|
||||
creation-desc: Recently Created
|
||||
published-desc: Recently Published
|
||||
views-desc: Most Views
|
||||
reactions-desc: Most Reactions
|
||||
comments-desc: Most Comments
|
||||
aria_label: Sort By
|
||||
org: "%{name} (%{num})"
|
||||
personal: Personal
|
||||
empty:
|
||||
desc: C'est ici que vous pouvez gérer vos messages, mais vous n'avez encore rien écrit.
|
||||
new: Écrivez votre premier message maintenant
|
||||
subscriptions:
|
||||
meta:
|
||||
title: Subscriptions %{title}
|
||||
heading: Subscriptions
|
||||
subhead:
|
||||
text_html: "%{for} %{source}"
|
||||
for: for
|
||||
empty: You don't have any subscribers for this %{kind} yet...
|
||||
summary:
|
||||
reactions: Total post reactions
|
||||
views: Total post views
|
||||
listings: Listings created
|
||||
credits: Credits available
|
||||
lt_500: "< 500"
|
||||
|
|
@ -330,7 +330,7 @@ RSpec.describe "Dashboards", type: :request do
|
|||
|
||||
it "displays a message if no subscriptions are found" do
|
||||
get "/dashboard/subscriptions", params: params
|
||||
expect(response.body).to include("You don't have any subscribers for this")
|
||||
expect(response.body).to include(CGI.escapeHTML("You don't have any subscribers for this"))
|
||||
end
|
||||
|
||||
it "raises unauthorized when trying to access a source the user doesn't own" do
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue