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
|
|
|
|
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>
|
|
|
|
<div class="tab-pane content-pane active" role="tabpanel">
|
2017-01-25 19:01:23 +08:00
|
|
|
|
|
|
|
<%= render partial: "users/settings/teams/breadcrumbs.html.erb" %>
|
|
|
|
|
|
|
|
<div>
|
|
|
|
<% if @member_of > 0 %>
|
2018-08-17 22:03:49 +08:00
|
|
|
<%= t("users.settings.teams.index.description_label") %>
|
|
|
|
<br><br>
|
2017-01-25 19:01:23 +08:00
|
|
|
<%= t("users.settings.teams.index.member_of", count: @member_of) %>
|
|
|
|
<% else %>
|
2018-08-17 22:03:49 +08:00
|
|
|
<%= t("users.settings.teams.index.description_label") %>
|
|
|
|
<br><br>
|
2017-01-25 19:01:23 +08:00
|
|
|
<em><%= t("users.settings.teams.index.no_teams") %></em>
|
|
|
|
<% end %>
|
2018-01-24 20:59:57 +08:00
|
|
|
<% if can_create_teams? %>
|
|
|
|
<span id="new-team-button">
|
2018-04-26 21:19:05 +08:00
|
|
|
<%= link_to new_team_path, class: "btn btn-primary", style: "margin-left: 30px;" do %>
|
2018-07-09 19:13:44 +08:00
|
|
|
<span class="fas fa-plus"></span>
|
2018-01-24 20:59:57 +08:00
|
|
|
<span class="hidden-xs">
|
|
|
|
<%= t("users.settings.teams.index.new_team") %>
|
|
|
|
</span>
|
|
|
|
<% end %>
|
|
|
|
</span>
|
|
|
|
<% end %>
|
2017-01-25 19:01:23 +08:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<% if @member_of > 0 %>
|
2017-02-02 16:53:59 +08:00
|
|
|
<div class="teams-datatable">
|
|
|
|
<table id="teams-table" class="table" data-source="<%= teams_datatable_path(format: :json) %>">
|
|
|
|
<thead>
|
2017-01-25 19:01:23 +08:00
|
|
|
<tr>
|
2017-02-02 16:53:59 +08:00
|
|
|
<th id="team-name"><%= t("users.settings.teams.index.thead_name") %></th>
|
|
|
|
<th id="team-role"><%= t("users.settings.teams.index.thead_role") %></th>
|
|
|
|
<th id="team-members"><%= t("users.settings.teams.index.thead_members") %></th>
|
2017-02-03 06:35:47 +08:00
|
|
|
<th id="leave-team"> </th>
|
2017-01-25 19:01:23 +08:00
|
|
|
</tr>
|
2017-02-02 16:53:59 +08:00
|
|
|
</thead>
|
|
|
|
<tbody></tbody>
|
|
|
|
</table>
|
|
|
|
</div>
|
2017-01-25 19:01:23 +08:00
|
|
|
<% else %>
|
|
|
|
<br />
|
|
|
|
<% end %>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2017-02-09 21:33:12 +08:00
|
|
|
<%= render partial: "users/settings/user_teams/leave_user_team_modal.html.erb" %>
|
2017-02-02 16:53:59 +08:00
|
|
|
<%= stylesheet_link_tag 'datatables' %>
|
2017-02-09 21:33:12 +08:00
|
|
|
<%= javascript_include_tag "users/settings/teams/index" %>
|
|
|
|
<%= javascript_include_tag "users/settings/teams/datatable" %>
|