-
-
- <%= render partial: "new.html.erb", locals: { form: f, teams: @teams } %>
-
-
+ <% if can_create_projects?(current_team) %>
+
+
+ <%= bootstrap_form_for @project, remote: true do |f| %>
+
+
+
+
+ <%= render partial: "new.html.erb", locals: { form: f, teams: @teams } %>
+
+
+
+ <% end %>
+
+ <% end %>
+
+
+
+ <% if @projects_tree.empty? %>
+
+
<%=t 'projects.index.no_projects.text' %>
+ <% if @teams.exists? && can_create_projects?(current_team) %>
+
<%=t 'projects.index.no_projects.title' %>
+
+
+
+ <%= t('projects.index.no_projects.create_new_button') %>
+
+ <% else %>
+
<%=t 'projects.index.no_projects.no_permission_title' %>
<% end %>
+ <% else %>
+
+
+
+
+
+
+
+
+ <%= render partial: "projects/index/team_projects",
+ locals: { projects: @projects_tree } %>
<% end %>
-
-
-
-
-
-
-
-
- <%= render partial: "projects/index/team_projects",
- locals: { projects: @projects_tree } %>
+
<% end %>
<%= javascript_include_tag "projects/index", "data-turbolinks-track" => true %>
diff --git a/app/views/repositories/index.html.erb b/app/views/repositories/index.html.erb
index b32f65244..a68cccb62 100644
--- a/app/views/repositories/index.html.erb
+++ b/app/views/repositories/index.html.erb
@@ -21,7 +21,7 @@
<%= t('libraries.index.no_libraries.create_new_button') %>
<% else %>
-
<%=t 'libraries.index.no_libraries.no_permission_title' %>
+
<%=t 'libraries.index.no_libraries.no_permission_title' %>
<% end %>