Upstream sync

This commit is contained in:
Senad Uka
2020-08-20 06:50:51 +02:00
parent 190ff2854b
commit 41bf88e358
127 changed files with 1399 additions and 565 deletions

View File

@@ -0,0 +1,10 @@
<% if policy(Project).new? %>
<div class="col-sm-6 col-md-4 col-lg-3 mt-4">
<li class="card h-100 shadow-sm">
<div class="card-body d-flex flex-column justify-content-center align-items-center">
<%= fa_icon("plus-circle", class: "text-success", style: "font-size:4rem") %>
<%= link_to t(".actions.new"), [:new, :project], class: "mt-4 text-reset text-decoration-none stretched-link" %>
</div>
</li>
</div>
<% end %>

View File

@@ -1,17 +1,14 @@
<% if @projects.any? %>
<section class="container mt-5">
<h1 class="h3"><%= t(".heading") %> (<%= @projects.size %>)</h1>
<ul class="list-unstyled mt-2 row">
<% if policy(Project).new? %>
<div class="col-sm-6 col-md-4 col-lg-3 mt-4">
<li class="card h-100 shadow-sm">
<div class="card-body d-flex flex-column justify-content-center align-items-center">
<%= fa_icon("plus-circle", class: "text-success", style: "font-size:4rem") %>
<%= link_to t(".actions.new"), [:new, :project], class: "mt-4 text-reset text-decoration-none stretched-link" %>
</div>
</li>
</div>
<div class="d-flex flex-row justify-content-between align-items-center mb-3">
<h1 class="h3"><%= t(".heading") %> (<%= @projects.size %>)</h1>
<%= bootstrap_form_with url: [@account, :projects], method: :get, remote: true, layout: :inline, id: "search" do |form| %>
<%= form.search_field :query, hide_label: true, placeholder: t(".actions.search"), class: "rounded-pill-right", value: params[:query], prepend: form.button(fa_icon("search"), class: "btn btn-light border rounded-pill-left") %>
<% end %>
</div>
<ul id="projects" class="list-unstyled mt-2 row">
<%= render partial: "new_project_button" %>
<%= render @projects %>
</ul>
</section>

View File

@@ -0,0 +1,4 @@
$("#projects").html("")
$("#projects").append("<%= j render(partial: "new_project_button") %>");
$("#projects").append("<%= j render(@projects) %>");
$("form input[type='search']").val("<%= params[:query] %>");