mirror of
https://github.com/discourse/discourse.git
synced 2024-12-25 14:43:58 +08:00
985afe1092
The title had to be added both on the 404 page generated by the server side, displayed when the user reaches a bad page directly and the 404 page rendered by Ember when a user reaches a missing topic while navigating the forum.
36 lines
1.3 KiB
Plaintext
36 lines
1.3 KiB
Plaintext
<% 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 %>
|