<% #-- # Copyright (C) 2010 Juho Nieminen <@jyu.fi> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Affero General Public License for more details. # # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see . #++ #FIXME: add label to repo_in_project #FIXME: move javascript to application.js #FIXME: project error messages not working because form only for repository... %> <% @page_title = "New repository" -%>

Create a new repository

<%= error_messages_for :repository -%> <% if @projects.empty? -%>

You do not have a project yet. Start a <%= link_to "new project", new_project_path -%> first.

If you like, YouSource can quickly create a generic project for you based on your username.
<%= link_to( h("Create a project called " + @suggested_project_title), :controller => "site", :action => "create_repo_and_project") -%>.

<% else -%> <% form_for [@owner, @repository], :url => { :action => "create_repo_and_project", :controller => "site" }, :builder => GitoriousFormBuilder, :html => {:multipart => true} do |f| -%> <%= render :partial => "repositories/form", :locals => {:f => f} -%> <%= f.submit t("views.repos.btn_create") -%> <% end -%> <% end -%>