-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
aifeelit
committed
Nov 4, 2022
1 parent
4fff385
commit 66c0eb4
Showing
3 changed files
with
60 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<div class="row page-not-found-topics"> | ||
<% if @top_viewed.count > 0 %> | ||
<div class="popular-topics"> | ||
<h2 class="popular-topics-title"><%= t 'page_not_found.popular_topics' %></h2> | ||
<% @top_viewed.each do |t| %> | ||
<div class='not-found-topic'> | ||
<%= link_to emoji_codes_to_img(t.fancy_title), t.relative_url %><%= category_badge(t.category) %> | ||
</div> | ||
<% end %> | ||
<a href="<%= path "/top" %>" class="btn btn-default"><%= t 'page_not_found.see_more' %>…</a> | ||
</div> | ||
<% end %> | ||
<% if @recent.count > 0 %> | ||
<div class="recent-topics"> | ||
<h2 class="recent-topics-title"><%= t 'page_not_found.recent_topics' %></h2> | ||
<% @recent.each do |t| %> | ||
<div class='not-found-topic'> | ||
<%= link_to t.title, t.relative_url %><%= category_badge(t.category) %> | ||
</div> | ||
<% end %> | ||
<a href="<%= path "/latest" %>" class="btn btn-default"><%= t 'page_not_found.see_more' %>…</a> | ||
</div> | ||
<% end %> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<% content_for :title do %><%= @page_title %> - <%= SiteSetting.title %><% end %> | ||
|
||
<div class="page-not-found"> | ||
<h1 class="title"><%= @title %></h1> | ||
|
||
<%- if !@current_user %> | ||
<a href="<%= path "/login" %>" class='btn btn-primary'><%= SvgSprite.raw_svg('fa-user') %><%= I18n.t('log_in') %></a> | ||
<%- end %> | ||
|
||
<%- if @group&.allow_membership_requests %> | ||
<a href="<%= group_path @group.name %>" class='btn btn-primary'><%= SvgSprite.raw_svg('user-plus') %> <%= I18n.t('not_in_group.request_membership') %></a> | ||
<%- elsif @group&.public_admission %> | ||
<a href="<%= group_path @group.name %>" class='btn btn-primary'><%= SvgSprite.raw_svg('user-plus') %> <%= I18n.t('not_in_group.join_group') %></a> | ||
<%- end %> | ||
</div> | ||
|
||
<%= build_plugin_html 'server:not-found-before-topics' %> | ||
|
||
<%= @topics_partial %> | ||
|
||
<%- unless @hide_search%> | ||
<div class="row"> | ||
<div class="page-not-found-search"> | ||
<h2><%= t 'page_not_found.search_title' %></h2> | ||
<p> | ||
<form action='<%= path "/search" %>' id='discourse-search'> | ||
<input type="text" name="q" value="<%= @slug %>"> | ||
<button class="btn btn-primary"><%= t 'page_not_found.search_button' %></button> | ||
</form> | ||
</p> | ||
</div> | ||
</div> | ||
|
||
<%= preload_script('onpopstate-handler') %> | ||
<%- end %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<p><%= t('read_only_mode_enabled') %></p> |