Defect #1409 ยป notice_on_attach_without_version_07262008_r704.diff
| app/controllers/projects_controller.rb (working copy) | ||
|---|---|---|
|
end
|
||
|
def add_file
|
||
|
@versions = @project.versions.sort
|
||
|
@versions_empty = @versions.empty?
|
||
|
if request.post?
|
||
|
@version = @project.versions.find_by_id(params[:version_id])
|
||
|
attachments = attach_files(@version, params[:attachments])
|
||
|
Mailer.deliver_attachments_added(attachments) if !attachments.empty? && Setting.notified_events.include?('file_added')
|
||
|
redirect_to :controller => 'projects', :action => 'list_files', :id => @project
|
||
|
end
|
||
|
@versions = @project.versions.sort
|
||
|
end
|
||
|
|
||
|
def list_files
|
||
| app/views/projects/_no_versions.rhtml (revision 0) | ||
|---|---|---|
|
<div class="nodata">
|
||
|
<%= simple_format(l(:text_no_project_versions)) %>
|
||
|
</div>
|
||
| app/views/projects/add_file.rhtml (working copy) | ||
|---|---|---|
|
<h2><%=l(:label_attachment_new)%></h2>
|
||
|
<%= render :partial => 'no_versions' if @versions_empty %>
|
||
|
<%= error_messages_for 'attachment' %>
|
||
|
<div class="box">
|
||
|
<% form_tag({ :action => 'add_file', :id => @project }, :multipart => true, :class => "tabular") do %>
|
||
| lang/en.yml (working copy) | ||
|---|---|---|
|
text_issue_category_reassign_to: Reassign issues to this category
|
||
|
text_user_mail_option: "For unselected projects, you will only receive notifications about things you watch or you're involved in (eg. issues you're the author or assignee)."
|
||
|
text_no_configuration_data: "Roles, trackers, issue statuses and workflow have not been configured yet.\nIt is highly recommended to load the default configuration. You will be able to modify it once loaded."
|
||
|
text_no_project_versions: "Versions have not been configured for this project.\nYou must create at least one version for this project before you can attach files."
|
||
|
text_load_default_configuration: Load the default configuration
|
||
|
text_status_changed_by_changeset: Applied in changeset %s.
|
||
|
text_issues_destroy_confirmation: 'Are you sure you want to delete the selected issue(s) ?'
|
||