Internationalize Views::Overview templates
This commit is contained in:
@@ -23,3 +23,10 @@ en:
|
||||
title: Latest Changes (Globally)
|
||||
precious/views/layout:
|
||||
title: Home
|
||||
precious/views/overview:
|
||||
back_to_top: Back to Top
|
||||
delete_confirmation: "Are you sure you want to delete %{name}?"
|
||||
no_pages_in: There are no pages in
|
||||
on: "on"
|
||||
title: "Overview of %{ref}"
|
||||
|
||||
|
||||
@@ -21,7 +21,15 @@
|
||||
<span class="pr-2">{{{icon}}}</span>
|
||||
<span><a href="{{url}}">{{name}}</a></span>
|
||||
{{#allow_editing}}
|
||||
{{#is_file}}<button class="btn btn-sm float-right delete-file" data-file-path="{{file_path}}" data-confirm="Are you sure you want to delete {{name}}?">{{#octicon}}trash{{/octicon}}</button>{{/is_file}}
|
||||
{{#is_file}}
|
||||
<button
|
||||
class="btn btn-sm float-right delete-file"
|
||||
data-confirm="{{t.delete_confirmation}}"
|
||||
data-file-path="{{file_path}}"
|
||||
>
|
||||
{{#octicon}}trash{{/octicon}}
|
||||
</button>
|
||||
{{/is_file}}
|
||||
{{/allow_editing}}
|
||||
</li>
|
||||
{{/files_folders}}
|
||||
@@ -33,13 +41,18 @@
|
||||
|
||||
{{#no_results}}
|
||||
<p id="no-results">
|
||||
There are no pages in <strong>{{current_path}}</strong> on <strong>{{ref}}</strong>.
|
||||
{{t.no_pages_in}}
|
||||
<strong>{{current_path}}</strong>
|
||||
{{t.on}}
|
||||
<strong>{{ref}}</strong>.
|
||||
</p>
|
||||
{{/no_results}}
|
||||
|
||||
</div>
|
||||
<div class="pt-4" id="footer">
|
||||
<a href="#">Back to Top</a>
|
||||
<a href="#">
|
||||
{{t.back_to_top}}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -3,11 +3,11 @@ require 'pathname'
|
||||
module Precious
|
||||
module Views
|
||||
class Overview < Layout
|
||||
attr_reader :results, :ref, :allow_editing, :newable
|
||||
attr_reader :name, :results, :ref, :allow_editing, :newable
|
||||
HIDDEN_PATHS = ['.gitkeep']
|
||||
|
||||
def title
|
||||
"Overview of #{@ref}"
|
||||
t[:title]
|
||||
end
|
||||
|
||||
# def editable
|
||||
|
||||
Reference in New Issue
Block a user