2017-01-12 23:54:15 +08:00
|
|
|
<% provide(:head_title, t("projects.show.head_title", project: h(@project.name)).html_safe) %>
|
2018-11-29 18:28:36 +08:00
|
|
|
<%= render partial: "shared/sidebar", locals: { current_project: @project, page: 'project' } %>
|
2019-05-20 19:13:31 +08:00
|
|
|
<%= render partial: "shared/secondary_navigation" %>
|
2016-07-28 22:41:10 +08:00
|
|
|
|
2018-05-12 00:02:17 +08:00
|
|
|
<div class="content-pane" id="project-show">
|
2018-05-08 22:33:42 +08:00
|
|
|
<div class="row">
|
|
|
|
<div class="col-sm-12"
|
|
|
|
id="data-holder"
|
|
|
|
data-project-id="<%= @project.id %>">
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-sm-12">
|
|
|
|
<!-- experiment sort -->
|
|
|
|
<div class="dropdown pull-left">
|
2020-01-07 23:13:34 +08:00
|
|
|
<button class="btn btn-secondary dropdown-toggle" type="button" id="sortMenu" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
|
2019-09-16 20:43:12 +08:00
|
|
|
<span><%= t("general.sort.#{@current_sort}_html") %></span>
|
2018-05-08 22:33:42 +08:00
|
|
|
<span class="caret"></span>
|
|
|
|
</button>
|
|
|
|
<ul class="dropdown-menu" aria-labelledby="sortMenu">
|
|
|
|
<% ["new", "old", "atoz", "ztoa"].each do |sort| %>
|
2019-09-16 20:43:12 +08:00
|
|
|
<li>
|
|
|
|
<% if @current_sort != sort %>
|
|
|
|
<a href="?<%= {sort: sort}.reject{|v| v.to_s == "0"}.to_query %>"><%= t("general.sort.#{sort}_html") %></a>
|
|
|
|
<% else %>
|
|
|
|
<a class="disabled" href="#"><%= t("general.sort.#{sort}_html") %></a>
|
|
|
|
<% end %>
|
|
|
|
</li>
|
2016-12-23 22:40:01 +08:00
|
|
|
<% end %>
|
2018-05-08 22:33:42 +08:00
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
<% if can_create_experiments?(@project) %>
|
|
|
|
<%= link_to new_project_experiment_url(@project),
|
|
|
|
remote: true,
|
|
|
|
type: "button",
|
|
|
|
id: 'new-experiment',
|
2020-01-07 23:13:34 +08:00
|
|
|
class: 'btn btn-primary pull-right' do %>
|
2018-07-09 19:13:44 +08:00
|
|
|
<span class="fas fa-plus"></span>
|
2018-05-08 22:33:42 +08:00
|
|
|
<span class="hidden-xs"><%=t 'experiments.new.create' %></span>
|
2016-12-23 22:40:01 +08:00
|
|
|
<% end %>
|
2017-01-05 21:41:48 +08:00
|
|
|
<% end %>
|
2018-05-08 22:33:42 +08:00
|
|
|
</div>
|
2016-08-17 20:27:59 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
2016-08-04 18:57:33 +08:00
|
|
|
</div>
|
2018-05-08 22:33:42 +08:00
|
|
|
<div class="row">
|
2018-06-01 19:49:02 +08:00
|
|
|
<% @project.sorted_active_experiments(@current_sort).each_with_index do |experiment, index| %>
|
2018-05-08 22:33:42 +08:00
|
|
|
<%= render partial: 'projects/show/experiment',
|
|
|
|
locals: { experiment: experiment } %>
|
|
|
|
<% end %>
|
|
|
|
<% if can_create_experiments?(@project) %>
|
|
|
|
<%= render 'projects/show/new_experiment' %>
|
|
|
|
<% end %>
|
|
|
|
</div>
|
2016-08-09 20:26:08 +08:00
|
|
|
</div>
|
2018-05-08 22:33:42 +08:00
|
|
|
|
2016-08-12 16:18:35 +08:00
|
|
|
<%= javascript_include_tag("experiments/dropdown_actions") %>
|
2016-08-19 21:36:12 +08:00
|
|
|
<%= javascript_include_tag("projects/show") %>
|
2018-06-06 23:28:04 +08:00
|
|
|
<i data-hook="project-show-js"></i>
|