Skip to content
Open
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions apps/dashboard/app/views/files/_breadcrumb.html.erb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<% if file_counter == 0 %>
<li class="breadcrumb-item">
<a href="<%= files_path(@filesystem, full_path.parent) %>" class="d btn btn-outline-dark btn-sm me-3" title="Go up directory">
<a href="<%= files_path(@filesystem, full_path.parent) %>" class="d btn btn-outline-dark btn-sm me-3" title="<%= t('dashboard.files_go_up_directory')%>">
<span class="fa fa-arrow-up"></span></a>
</li>
<% end %>
Expand All @@ -10,10 +10,10 @@
<%= path_segment_with_slash(@filesystem, file.basename.to_s, file_counter, file_count) %>
</li>
<li class="breadcrumb-item ms-3">
<button id="goto-btn" type="button" class="btn btn-outline-dark btn-sm"><i class="fas fa-edit" aria-hidden="true"></i> Change directory</button>
<button id="goto-btn" type="button" class="btn btn-outline-dark btn-sm"><i class="fas fa-edit" aria-hidden="true"></i> <%= t('dashboard.files_change_directory')%></button>
</li>
<li class="breadcrumb-item ms-auto">
<button id="copy-path" class="btn btn-outline-dark btn-sm " data-clipboard-text="<%= file.to_s %>"><span class="fa fa-clipboard"></span> Copy path</button>
<button id="copy-path" class="btn btn-outline-dark btn-sm " data-clipboard-text="<%= file.to_s %>"><span class="fa fa-clipboard"></span> <%= t('dashboard.files_copy_path')%></button>
</li>
<% else %>
<li class="breadcrumb-item">
Expand Down
2 changes: 1 addition & 1 deletion apps/dashboard/app/views/files/_download_button.html.erb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<%- if Configuration.download_enabled? -%>
<button id="download-btn" type="button" class="btn btn-primary btn-sm">
<i class="fas fa-download" aria-hidden="true"></i> Download
<i class="fas fa-download" aria-hidden="true"></i> <%= t('dashboard.files_download') %>
</button>
<%- end -%>
18 changes: 9 additions & 9 deletions apps/dashboard/app/views/files/_files_table.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,22 @@
</ol>

<div role="region" aria-label="Directory contents">
<span id="select_all_label" class="sr-only">Select All</span>
<span id="select_all_label" class="sr-only"><%= t('dashboard.files_select_all') %></span>
<table class="table table-striped table-condensed w-100" id="directory-contents">
<caption id="directory-contents_caption" class="sr-only" aria-live='polite'> <%= "Contents of directory #{@path}" %> </caption>
<thead>
<tr>
<th>
<input type="checkbox" id="select_all" class="file-select" aria-labelledby="select_all_label"></input>
<span class="sr-only">Select</span>
<span class="sr-only"><%= t('dashboard.files_select') %></span>
</th>
<th>Type</th>
<th>Name</th>
<th><span class="sr-only">Actions</span></th>
<th>Size</th>
<th>Modified at</th>
<th>Owner</th>
<th>Mode</th>
<th><%= t('dashboard.files_type') %></th>
<th><%= t('dashboard.files_name') %></th>
<th><span class="sr-only"><%= t('dashboard.files_actions') %></span></th>
<th><%= t('dashboard.files_size') %></th>
<th><%= t('dashboard.files_modified_at') %></th>
<th><%= t('dashboard.files_owner') %></th>
<th><%= t('dashboard.files_mode') %></th>
</tr>
</thead>
<tbody>
Expand Down
2 changes: 1 addition & 1 deletion apps/dashboard/app/views/files/_spinner.html.erb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<div class="text-center text-primary d-none p-5" id="tloading_spinner">
<div class="spinner-border">
<span class="sr-only">Loading...</span>
<span class="sr-only"><%= t('dashboard.loading') %></span>
</div>
</div>
2 changes: 1 addition & 1 deletion apps/dashboard/app/views/files/_upload_button.html.erb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<%- if Configuration.upload_enabled? -%>
<button id="upload-btn" type="button" class="btn btn-primary btn-sm">
<i class="fas fa-upload" aria-hidden="true"></i> Upload
<i class="fas fa-upload" aria-hidden="true"></i> <%= t('dashboard.files_upload') %>
</button>
<%- end -%>
18 changes: 9 additions & 9 deletions apps/dashboard/app/views/files/edit.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,23 @@
<div class="d-grid gap-2">
<button class="btn btn-primary" id="save-button">
<i class="fas fa-save pe-2" aria-hidden="true"></i>
<span>Save</span>
<span><%= t('dashboard.files_editor.save') %></span>
</button>
</div>
</div>


<ul class="list-group list-group-flush border-bottom-0">
<li class="list-group-item hidden-xs hidden-sm hidden-md px-2 form-group form-inline m-0">
<label class="control-label navbar-text px-1" for="keybindings">Key Bindings</label>
<label class="control-label navbar-text px-1" for="keybindings"><%= t('dashboard.files_editor.key_bindings') %></label>
<select class="form-control input-xs" id="keybindings">
<option value="default">Default</option>
<option value="default"><%= t('dashboard.files_editor.key_bindings_default') %></option>
<option value="ace/keyboard/vim">Vim</option>
<option value="ace/keyboard/emacs">Emacs</option>
</select>
</li>
<li class="list-group-item hidden-xs px-2 form-group form-inline m-0">
<label class="control-label hidden-sm hidden-md navbar-text px-1" for="fontsize">Font Size</label>
<label class="control-label hidden-sm hidden-md navbar-text px-1" for="fontsize"><%= t('dashboard.files_editor.font_size') %></label>
<select class="form-control input-xs" id="fontsize">
<option value="8px">8px</option>
<option value="9px">9px</option>
Expand All @@ -46,7 +46,7 @@
</select>
</li>
<li class="list-group-item hidden-xs px-2 form-group form-inline m-0">
<label class="control-label hidden-sm hidden-md navbar-text px-1" for="mode">Mode</label>
<label class="control-label hidden-sm hidden-md navbar-text px-1" for="mode"><%= t('dashboard.files_editor.mode') %></label>
<select class="form-control input-xs" id="mode">
<option value="abap">ABAP</option>
<option value="abc">ABC</option>
Expand Down Expand Up @@ -181,9 +181,9 @@
</select>
</li>
<li class="list-group-item hidden-xs px-2 form-group form-inline px-1 m-0">
<label class="control-label hidden-sm hidden-md px-1 navbar-text" for="theme">Theme</label>
<label class="control-label hidden-sm hidden-md px-1 navbar-text" for="theme"><%= t('dashboard.files_editor.theme') %></label>
<select class="form-control input-xs" id="theme">
<optgroup label="Bright">
<optgroup label="<%= t('dashboard.files_editor.theme_bright') %>">
<option value="ace/theme/chrome">Chrome</option>
<option value="ace/theme/clouds">Clouds</option>
<option value="ace/theme/crimson_editor">Crimson Editor</option>
Expand All @@ -200,7 +200,7 @@
<option value="ace/theme/katzenmilch">KatzenMilch</option>
<option value="ace/theme/sqlserver">SQL Server</option>
</optgroup>
<optgroup label="Dark">
<optgroup label="<%= t('dashboard.files_editor.theme_dark') %>">
<option value="ace/theme/ambiance">Ambiance</option>
<option value="ace/theme/chaos">Chaos</option>
<option value="ace/theme/clouds_midnight">Clouds Midnight</option>
Expand All @@ -224,7 +224,7 @@
</select>
</li>
<li class="list-group-item hidden-xs px-2 form-group form-inline m-0">
<label class="control-label hidden-md hidden-lg navbar-text px-1" for="wordwrap">Wrap</label>
<label class="control-label hidden-md hidden-lg navbar-text px-1" for="wordwrap"><%= t('dashboard.files_editor.wrap') %></label>
<div class="form-switch">
<input class="form-check-input" role="switch" type="checkbox" id="wordwrap" value="">
</div>
Expand Down
10 changes: 5 additions & 5 deletions apps/dashboard/app/views/files/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
<%= render partial: 'shell_dropdown' %>
<% end %>

<button id="refresh-btn" type="button" class="btn btn-outline-dark btn-sm"><i class="fa fa-rotate-right" aria-hidden="true"></i> Refresh</button>
<button id="new-file-btn" type="button" class="btn btn-outline-dark btn-sm"><i class="fas fa-plus" aria-hidden="true"></i> New File</button>
<button id="new-dir-btn" type="button" class="btn btn-outline-dark btn-sm"><i class="fas fa-folder-plus" aria-hidden="true"></i> New Directory</button>
<button id="refresh-btn" type="button" class="btn btn-outline-dark btn-sm"><i class="fa fa-rotate-right" aria-hidden="true"></i> <%= t('dashboard.files_refresh') %></button>
<button id="new-file-btn" type="button" class="btn btn-outline-dark btn-sm"><i class="fas fa-plus" aria-hidden="true"></i> <%= t('dashboard.files_new_file') %></button>
<button id="new-dir-btn" type="button" class="btn btn-outline-dark btn-sm"><i class="fas fa-folder-plus" aria-hidden="true"></i> <%= t('dashboard.files_new_directory') %></button>
<%= render(partial: 'upload_button') %>
<%= render(partial: 'download_button') %>
<% if Configuration.globus_endpoints %>
Expand All @@ -18,8 +18,8 @@
<% if @user_configuration.files_select_target %>
<%= render partial: 'send_to_target_button' %>
<% end %>
<button id="copy-move-btn" type="button" class="btn btn-outline-dark btn-sm"><i class="fas fa-copy" aria-hidden="true"></i> Copy/Move</button>
<button id="delete-btn" type="button" class="btn btn-danger btn-sm"><i class="fas fa-trash" aria-hidden="true"></i> Delete</button>
<button id="copy-move-btn" type="button" class="btn btn-outline-dark btn-sm"><i class="fas fa-copy" aria-hidden="true"></i> <%= t('dashboard.files_copy_move') %></button>
<button id="delete-btn" type="button" class="btn btn-danger btn-sm"><i class="fas fa-trash" aria-hidden="true"></i> <%= t('dashboard.files_delete') %></button>
</div>

<hr>
Expand Down
18 changes: 9 additions & 9 deletions apps/dashboard/app/views/files/turbo_frames/_directory.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,18 @@
<table class="table table-striped table-condensed w-100 table-hover caption-right">
<thead>
<tr>
<th><span class="sr-only">Type</span></th>
<th>Name</th>
<th><span class="sr-only">Actions</span></th>
<th><span class="sr-only"><%= t('dashboard.files_turboframe.type') %></span></th>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Simple/single works like Type should be just simple/single word keys like dashboard.type. That promotes reuse and also simplicity.

<th><%= t('dashboard.files_turboframe.name') %></th>
<th><span class="sr-only"><%= t('dashboard.files_turboframe.actions') %></span></th>
<% private_dir = path.to_s.start_with?(CurrentUser.home) %>
<% if private_dir %>
<th>Size</th>
<th>Date</th>
<th><%= t('dashboard.files_turboframe.size') %></th>
<th><%= t('dashboard.files_turboframe.date') %></th>
<% else %>
<th class='d-above-xl'>Size</th>
<th class='d-above-xl'>Date</th>
<th>Owner</th>
<th>Mode</th>
<th class='d-above-xl'><%= t('dashboard.files_turboframe.size') %></th>
<th class='d-above-xl'><%= t('dashboard.files_turboframe.date') %></th>
<th><%= t('dashboard.files_turboframe.owner') %></th>
<th><%= t('dashboard.files_turboframe.mode') %></th>
<% end %>
</tr>
</thead>
Expand Down
12 changes: 7 additions & 5 deletions apps/dashboard/app/views/files/turbo_frames/_files.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<% dir_type = I18n.t('dashboard.directory') %>
<i class="fa fa-folder" title="<%= dir_type %>">
<span class="sr-only"> <%= dir_type %> </span>
</i>
</td>
<td>
<strong>
Expand All @@ -11,7 +12,7 @@
directory_frame_path(
path: "#{path.parent}"
),
title: 'Show parent directory',
title: t('dashboard.files_turboframe.show_parent_directory'),
data: { turbo_frame: "project_directory" }
)
%>
Expand All @@ -34,6 +35,7 @@
<% type = I18n.t("dashboard.#{file[:directory] ? 'directory' : 'file'}") %>
<i class="fa fa-<%= file[:directory] ? 'folder' : 'file' %>" title="<%= type %>">
<span class="sr-only"> <%= type %> </span>
</i>
</td>
<%- if file[:directory] && readable-%>
<td>
Expand All @@ -42,7 +44,7 @@
directory_frame_path(
path: full_path
),
title: "Show #{file[:name]} directory",
title: t('dashboard.files_turboframe.show_directory', name: file[:name]),
data: { turbo_frame: "project_directory" }
)
%>
Expand Down Expand Up @@ -75,7 +77,7 @@
class: 'view-file dropdown-item',
data: { row_index: nil } do %>
<i class="fas fa-eye" aria-hidden="true"></i>
View
<%= t('dashboard.files_turboframe.view') %>
<% end %>
</li>
<% if writable %>
Expand All @@ -84,7 +86,7 @@
target: '_top',
class: 'edit-file dropdown-item' do %>
<i class="fas fa-edit" aria-hidden="true"></i>
Edit
<%= t('dashboard.files_turboframe.edit') %>
<% end %>
</li>
<% end %>
Expand All @@ -93,7 +95,7 @@
target: '_top',
class: 'download-file dropdown-item' do %>
<i class="fas fa-download" aria-hidden="true"></i>
Download
<%= t('dashboard.files_turboframe.download') %>
<% end %>
</li>
</ul>
Expand Down
43 changes: 43 additions & 0 deletions apps/dashboard/config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -142,24 +142,67 @@ en:
development_apps_caption: Sandbox App
directory: Directory
edit: Edit
files_turboframe:
size: Size
date: Date
owner: Owner
mode: Mode
actions: Actions
type: Type
name: Name
view: View
edit: Edit
download: Download
show_parent_directory: Show parent directory
show_directory: Show %{name} directory
files_select_all: Select All
files_select: Select
files_type: Type
files_name: Name
files_actions: Actions
files_size: Size
files_modified_at: Modified at
files_owner: Owner
files_mode: Mode
loading: Loading...
file: File
file_quotas: File Quotas
files_change_directory: Change Directory
files_copy_path: Copy Path
files_copy_move: Copy/Move
files_delete: Delete
files_directory_download_error_modal_title: Directory too large to download
files_directory_download_unauthorized: You can only download a file or directory that you have read and execute access to
files_directory_size_calculation_error: Timeout while trying to determine directory size.
files_directory_size_calculation_timeout: Timeout while trying to determine directory size.
files_directory_size_unknown: 'Error with status %{exit_code} when trying to determine directory size: %{error}'
files_directory_too_large: The directory is too large to download as a zip. The directory should be less than %{download_directory_size_limit} bytes.
files_download: Download
files_download_not_enabled: Downloading files is not enabled on this server.
files_download_zip: Download as zip
files_file_too_large: The file is too large to download. File downloads should be less than %{download_file_size_limit} bytes.
files_go_up_directory: Go up directory
files_new_directory: New Directory
files_new_file: New File
files_refresh: Refresh
files_remote_dir_not_created: Did not create directory %{path}
files_remote_disabled: Remote file support is not enabled
files_remote_empty_dir_unsupported: Remote does not support empty directories
files_remote_error_listing_remotes: 'Error listing Rclone remotes: %{error}'
files_upload: Upload
files_send_to_target_title_default: Send selected files metadata to the external application
files_shell: Open in Terminal
files_shell_dropdown: Select Cluster to Open in Terminal
files_editor:
save: Save
key_bindings: Key Bindings
key_bindings_default: Default
font_size: Font Size
mode: Mode
theme: Theme
theme_bright: Bright
theme_dark: Dark
wrap: Wrap
files_doesnt_exist: "%{path} does not exist."
files_not_readable: "You do not have sufficient permissions to read '%{path}'."
home_directory: Home Directory
Expand Down
43 changes: 43 additions & 0 deletions apps/dashboard/config/locales/zh-CN.yml
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,34 @@ zh-CN:
directory: 目录
edit: 编辑
file: 文件
files_turboframe:
size: 大小
date: 日期
owner: 所有者
mode: 模式
actions: 操作
type: 类型
name: 名称
view: 查看
edit: 编辑
download: 下载
show_parent_directory: 显示父目录
show_directory: 显示 %{name} 目录
files_select_all: 选择所有
files_select: 选择
files_type: 类型
files_name: 名称
files_actions: 操作
files_size: 大小
files_modified_at: 修改时间
files_owner: 所有者
files_mode: 模式
loading: 加载中
file_quotas: 文件配额
files_change_directory: 更改目录
files_copy_path: 复制路径
files_copy_move: 复制/移动
files_delete: 删除
files_directory_download_error_modal_title: 目录太大,无法下载
files_directory_download_unauthorized: 您只能下载您具有读取和执行权限的文件或目录
files_directory_size_calculation_error: 尝试确定目录大小时超时。
Expand All @@ -139,15 +166,31 @@ zh-CN:
files_doesnt_exist: "%{path} 不存在。"
files_download_not_enabled: 此服务器上未启用文件下载。
files_download_zip: 下载为 zip
files_download: 下载
files_file_too_large: 文件太大,无法下载。文件下载应小于 %{download_file_size_limit} 字节。
files_go_up_directory: 上移目录
files_new_directory: 新目录
files_new_file: 新文件
files_not_readable: 您没有足够的权限读取 '%{path}'。
files_refresh: 刷新
files_remote_dir_not_created: 未创建目录 %{path}
files_remote_disabled: 未启用远程文件支持
files_remote_empty_dir_unsupported: 远程不支持空目录
files_remote_error_listing_remotes: 列出 Rclone 远程时出错:%{error}
files_upload: 上传
files_send_to_target_title_default: 将选定文件的元数据发送到外部应用程序
files_shell: 在终端中打开
files_shell_dropdown: 选择要在终端中打开的集群
files_editor:
save: 保存
key_bindings: 键绑定
key_bindings_default: 默认
font_size: 字体大小
mode: 模式
theme: 主题
theme_bright: 明亮
theme_dark: 深色
wrap: 自动换行
files_title: 文件浏览
home_directory: 主目录
import: 导入
Expand Down
4 changes: 4 additions & 0 deletions apps/dashboard/config/ondemand.d/ondemand.yml
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you added this file by accident. Furthermore, if this is a development config - you should be using a directory outside of the git tree. Mostly for this exact reason - so you don't accidentally commit it.

Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
pinned_apps:
- sys/*
pinned_apps_menu_length: 4
pinned_apps_group_by: category
Loading