* chore: remove the description * feat: change the meta og:site_name property from The Practical DEV to The <COMMUNITY_NAME> Community consistently * refactor: change the canonical link to be more dynamic using the <%= ApplicationConfig["APP_PROTOCOL"] %><%= ApplicationConfig["APP_DOMAIN"] %> * refactor: update the path to be dynamic * refactor: change some other meta properties to be dynamic * refactor: update the index * refactor: update the sitename to just read <%= ApplicationConfig["COMMUNITY_NAME"] %> Community * feat: copyright year should be dynamic * feat: change the meta og:url content to be dynamic by using <%= ApplicationConfig["APP_PROTOCOL"] %><%= ApplicationConfig["APP_DOMAIN"] %> for the former part of the url * feat: space * refactor: move the copyright notice to a helper * refactor: use the community_qualified_name helper! * refactor: start year is already a string * refactor: use app url helper instead of <%= ApplicationConfig["APP_PROTOCOL"] %><%= ApplicationConfig["APP_DOMAIN"] %> everywhere * chore:oops * refactor: Change <meta name="twitter:image:src" content="http://i.imgur.com/B4JNl1w.png"> to `<meta name="twitter:image:src" content="<%= SiteConfig.main_social_image %>">` consistently. * refactor: Replace `<meta property="og:image" content="http://i.imgur.com/B4JNl1w.png" />` with ` <meta property="og:image" content="<%= SiteConfig.main_social_image %>" />` * chore: update some other meta's * feat: replace 'The Practical DEV' with 'DEV Community' and * test: remove The :) * test: copyright_notice * fix: syntax error * feat: name of community * refactor: use app url * fix: template strings * fix: tag * feat: update the app url parameters * feat: add a community_name helper so we don't have to refer to an environment variable in the templates * feat: take into account the case when the start year is a blank string * feat: single quotes to double quotes * test: add a test for the #community_name * chore: update or codeclimate * chore: amend the community helper * refactor: use the community_name helper in here * feat: update ApplicationConfig["COMMUNITY_NAME"] with community_name * fix: Time.current.year needs to be a string :( * chore: extra space * chore: change to use community_qualified_name
81 lines
4.1 KiB
Text
81 lines
4.1 KiB
Text
<% title "Notifications" %>
|
|
|
|
<%= content_for :page_meta do %>
|
|
<link rel="canonical" href="<%= app_url("/notifications") %>" />
|
|
<meta name="description" content="Notifications inbox for dev.to">
|
|
<meta name="keywords" content="software development,engineering,rails,javascript,ruby">
|
|
|
|
<meta property="og:type" content="article" />
|
|
<meta property="og:url" content="<%= app_url("/notifications") %>" />
|
|
<meta property="og:title" content="Notifications - dev.to" />
|
|
<meta property="og:description" content="Notifications inbox for dev.to" />
|
|
<meta property="og:site_name" content="<%= community_qualified_name %>" />
|
|
|
|
<meta name="twitter:card" content="summary_large_image">
|
|
<meta name="twitter:site" content="@<%= SiteConfig.social_networks_handle %>">
|
|
<meta name="twitter:title" content="Notifications - dev.to">
|
|
<meta name="twitter:description" content="Notifications inbox for dev.to">
|
|
<% end %>
|
|
|
|
<% if user_signed_in? %>
|
|
<div class="home" id="notifications-container">
|
|
<div class="side-bar">
|
|
<div class="widget fixed-widget">
|
|
<header>
|
|
<h4>notifications</h4>
|
|
</header>
|
|
<div class="widget-body">
|
|
<a class="query-filter-button <%= "selected" if params[:filter].blank? %>" href="/notifications">ALL</a>
|
|
<a class="query-filter-button <%= "selected" if params[:filter].to_s.casecmp("comments").zero? && params[:org_id].blank? %>" href="/notifications/comments">COMMENTS</a>
|
|
<a class="query-filter-button <%= "selected" if params[:filter].to_s.casecmp("posts").zero? && params[:org_id].blank? %>" href="/notifications/posts">POSTS</a>
|
|
</div>
|
|
<% if @organizations.present? %>
|
|
<% @organizations.each do |org| %>
|
|
<hr>
|
|
<header>
|
|
<h4><%= org.name %></h4>
|
|
</header>
|
|
<div class="widget-body">
|
|
<a class="query-filter-button <%= "selected" if params[:filter].to_s.casecmp("org").zero? && params[:org_id].to_i == org.id %>" href="/notifications/org/<%= org.id %>">ALL</a>
|
|
<a class="query-filter-button <%= "selected" if params[:filter].to_s.casecmp("comments").zero? && params[:org_id].to_i == org.id %>" href="/notifications/comments/<%= org.id %>">COMMENTS</a>
|
|
</div>
|
|
<% end %>
|
|
<% end %>
|
|
</div>
|
|
</div>
|
|
<div class="articles-list" id="articles-list">
|
|
<div class="notifications-mobile-filters">
|
|
<a class="query-filter-button <%= "selected" if params[:filter].blank? %>" href="/notifications">ALL</a>
|
|
<a class="query-filter-button <%= "selected" if params[:filter].to_s.casecmp("comments").zero? && params[:org_id].blank? %>" href="/notifications/comments">COMMENTS</a>
|
|
<a class="query-filter-button <%= "selected" if params[:filter].to_s.casecmp("posts").zero? && params[:org_id].blank? %>" href="/notifications/posts">POSTS</a>
|
|
</div>
|
|
<% if @organizations.present? %>
|
|
<% @organizations.each do |org| %>
|
|
<div class="notifications-mobile-filters">
|
|
<hr>
|
|
<span class="organization-name">@<%= org.slug %>:</span>
|
|
<a class="query-filter-button <%= "selected" if params[:filter].to_s.casecmp("org").zero? && params[:org_id].to_i == org.id %>" href="/notifications/org/<%= org.id %>">ALL</a>
|
|
<a class="query-filter-button <%= "selected" if params[:filter].to_s.casecmp("comments").zero? && params[:org_id].to_i == org.id %>" href="/notifications/comments/<%= org.id %>">COMMENTS</a>
|
|
</div>
|
|
<% end %>
|
|
<% end %>
|
|
|
|
<%= render "notifications_list", params: params %>
|
|
</div>
|
|
|
|
<%# new or less active users that don't have a page worth of notifications
|
|
won't be shown the "load more" button %>
|
|
<% if @notifications.size >= @initial_page_size %>
|
|
<div class="load-more-wrapper">
|
|
<button id="load-more-button" type="button">
|
|
Load More
|
|
</button>
|
|
</div>
|
|
<% end %>
|
|
|
|
<div class="side-bar sidebar-additional"></div>
|
|
</div>
|
|
<%= render "articles/fitvids" %>
|
|
<% else %>
|
|
<%= render "devise/registrations/registration_form" %>
|
|
<% end %>
|