2018-07-19 23:56:42 +08:00
|
|
|
<% content_for :head do %>
|
|
|
|
<meta name="turbolinks-cache-control" content="no-cache">
|
|
|
|
<% end %>
|
|
|
|
|
2017-01-25 19:01:23 +08:00
|
|
|
<% provide(:head_title, t("users.settings.teams.head_title")) %>
|
2018-05-08 22:33:42 +08:00
|
|
|
<% provide(:container_class, "no-second-nav-container") %>
|
2017-01-25 19:01:23 +08:00
|
|
|
|
2017-02-02 17:36:23 +08:00
|
|
|
<div data-hook="team-beginning"></div>
|
2017-02-01 00:32:08 +08:00
|
|
|
|
2018-04-05 22:30:02 +08:00
|
|
|
<%= render partial: "users/settings/sidebar.html.erb" %>
|
2017-01-25 19:01:23 +08:00
|
|
|
<div class="tab-content">
|
2018-05-08 22:33:42 +08:00
|
|
|
<div class="tab-pane content-pane" role="tabpanel"></div>
|
2019-11-12 18:26:18 +08:00
|
|
|
<div class="tab-pane content-pane active team-settings-pane" role="tabpanel">
|
2017-01-25 19:01:23 +08:00
|
|
|
|
|
|
|
<%= render partial: "users/settings/teams/breadcrumbs.html.erb" %>
|
|
|
|
|
|
|
|
<!-- TITLE -->
|
2020-02-11 20:18:33 +08:00
|
|
|
<h2 id="team-name" class="settings-team-name" data-current-team="<%= current_team == @team %>">
|
2019-11-03 21:59:30 +08:00
|
|
|
<% if can_update_team?(@team) %>
|
|
|
|
<%= render partial: "shared/inline_editing",
|
|
|
|
locals: {
|
|
|
|
initial_value: @team.name,
|
2019-11-12 18:26:18 +08:00
|
|
|
config: {
|
2019-11-03 21:59:30 +08:00
|
|
|
field_to_udpate: 'name',
|
2019-11-12 18:26:18 +08:00
|
|
|
params_group: 'team',
|
2019-11-03 21:59:30 +08:00
|
|
|
path_to_update: update_team_path(@team, format: :json)
|
|
|
|
}
|
|
|
|
} %>
|
|
|
|
<% else %>
|
2019-11-12 18:26:18 +08:00
|
|
|
<span class="view-mode"><%= @team.name %></span>
|
2018-01-22 23:25:53 +08:00
|
|
|
<% end %>
|
2020-02-11 20:18:33 +08:00
|
|
|
</h2>
|
2017-01-25 19:01:23 +08:00
|
|
|
<!-- End of TITLE -->
|
|
|
|
|
|
|
|
<!-- HEADER -->
|
2019-11-12 18:26:18 +08:00
|
|
|
<div class="team-metadata">
|
|
|
|
|
2019-11-22 17:46:44 +08:00
|
|
|
<div class="created-at grid-block">
|
2019-11-12 18:26:18 +08:00
|
|
|
<span class="fas fa-calendar-alt"></span>
|
|
|
|
<span class="hidden-xs hidden-sm"><%= t("users.settings.teams.edit.header_created_at") %></span>
|
|
|
|
<b><%= l(@team.created_at, format: :full_date) %></b>
|
2017-01-25 19:01:23 +08:00
|
|
|
</div>
|
|
|
|
|
2019-11-22 17:46:44 +08:00
|
|
|
<div class="created-by grid-block">
|
2019-11-12 18:26:18 +08:00
|
|
|
<span class="fas fa-user fa-lg"></span>
|
|
|
|
<span class="hidden-xs hidden-sm"><%= t("users.settings.teams.edit.header_created_by") %></span>
|
|
|
|
<b><%= t("users.settings.teams.edit.header_created_by_name_email", name: team_created_by(@team).name, email: team_created_by(@team).email) %></b>
|
2017-01-25 19:01:23 +08:00
|
|
|
</div>
|
|
|
|
|
2019-11-22 17:46:44 +08:00
|
|
|
<div class="space-usage grid-block">
|
2019-11-12 18:26:18 +08:00
|
|
|
<span class="fas fa-hdd"></span>
|
|
|
|
<span class="hidden-xs hidden-sm"><%= t("users.settings.teams.edit.header_space_taken") %></span>
|
|
|
|
<b data-hook="team-space-taken"><%= "#{number_to_human_size(@team.space_taken)}" %></b>
|
2017-01-25 19:01:23 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2019-11-12 18:26:18 +08:00
|
|
|
<div class="team-description">
|
2019-11-19 18:21:03 +08:00
|
|
|
<% if can_update_team?(@team) %>
|
|
|
|
<div
|
|
|
|
class="inline-init-handler"
|
|
|
|
data-field-to-update="description"
|
|
|
|
data-params-group="team"
|
|
|
|
data-path-to-update="<%= update_team_path(@team, format: :json) %>"
|
|
|
|
data-original-name="<%= sanitize_input(@team.description) %>"
|
|
|
|
>
|
|
|
|
<div class="view-mode" data-placeholder="<%= t("users.settings.teams.show.enter_description") %>"><%= sanitize_input(@team.description) %></div>
|
|
|
|
<textarea placeholder="<%= t("users.settings.teams.show.enter_description") %>" class="hidden input-field smart-text-area" type="text" value="<%= sanitize_input(@team.description) %>" disabled><%= sanitize_input(@team.description) %></textarea>
|
|
|
|
<div class="button-container">
|
|
|
|
<span class="cancel-button inline-field-button"><%= t('general.cancel') %></span>
|
|
|
|
<span class="save-button inline-field-button"><%= t('general.save') %></span>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<% else %>
|
|
|
|
<span class="view-mode disable-select"><%= @team.description.empty? ? t('users.settings.teams.edit.header_no_description') : sanitize_input(@team.description) %></span>
|
|
|
|
<% end %>
|
2017-01-25 19:01:23 +08:00
|
|
|
</div>
|
|
|
|
<!-- End of HEADER -->
|
|
|
|
|
|
|
|
<!-- USERS TABLE -->
|
2019-11-12 18:26:18 +08:00
|
|
|
<div class="users-datatable">
|
2020-02-27 00:25:38 +08:00
|
|
|
<% if can_invite_team_users?(@team) %>
|
|
|
|
<div id="add-new-team-members-button" class="hidden">
|
|
|
|
<a href="#" class="btn btn-primary" data-trigger="invite-users" data-turbolinks="false" data-modal-id="team-invite-users-modal">
|
|
|
|
<span class="fas fa-plus"></span>
|
|
|
|
<%= I18n.t('users.settings.teams.edit.add_user') %>
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
<%= render(partial: 'shared/invite_users_modal.html.erb',
|
|
|
|
locals: { modal_id: 'team-invite-users-modal',
|
|
|
|
type: 'invite_to_team',
|
|
|
|
team: @team } ) %>
|
|
|
|
<% end %>
|
2019-11-12 18:26:18 +08:00
|
|
|
<table id="users-table" class="table" data-source="<%= team_users_datatable_path(@team, format: :json) %>">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th id="user-name"><%= t("users.settings.teams.edit.thead_user_name") %></th>
|
|
|
|
<th id="email"><%= t("users.settings.teams.edit.thead_email") %></th>
|
|
|
|
<th id="user-role"><%= t("users.settings.teams.edit.thead_role") %></th>
|
|
|
|
<th id="joined-on"><%= t("users.settings.teams.edit.thead_joined_on") %></th>
|
|
|
|
<th id="status"><%= t("users.settings.teams.edit.thead_status") %></th>
|
|
|
|
<th id="options"><%= t("users.settings.teams.edit.thead_actions") %></th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody></tbody>
|
|
|
|
</table>
|
2017-01-25 19:01:23 +08:00
|
|
|
</div>
|
|
|
|
<!-- End of USERS TABLE -->
|
2017-02-01 00:32:08 +08:00
|
|
|
|
2017-02-02 17:36:23 +08:00
|
|
|
<div data-hook="team-the-end"></div>
|
2017-02-01 00:32:08 +08:00
|
|
|
|
2017-01-25 19:01:23 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<%= render partial: 'users/settings/teams/description_modal.html.erb' %>
|
|
|
|
<%= render partial: 'users/settings/teams/destroy_modal.html.erb', locals: { team: @team } %>
|
2017-02-09 21:33:12 +08:00
|
|
|
<%= render partial: 'users/settings/user_teams/destroy_user_team_modal.html.erb' %>
|
2017-01-25 19:01:23 +08:00
|
|
|
<%= stylesheet_link_tag 'datatables' %>
|
2017-02-09 21:33:12 +08:00
|
|
|
<%= javascript_include_tag 'users/settings/teams/show' %>
|
2018-07-20 22:19:36 +08:00
|
|
|
<span data-hook="team-bottom"></span>
|