Defect #1409 ยป notice_on_attach_without_version_07262008_r704.diff
app/controllers/projects_controller.rb (working copy) | ||
---|---|---|
187 | 187 |
end |
188 | 188 | |
189 | 189 |
def add_file |
190 |
@versions = @project.versions.sort |
|
191 |
@versions_empty = @versions.empty? |
|
190 | 192 |
if request.post? |
191 | 193 |
@version = @project.versions.find_by_id(params[:version_id]) |
192 | 194 |
attachments = attach_files(@version, params[:attachments]) |
193 | 195 |
Mailer.deliver_attachments_added(attachments) if !attachments.empty? && Setting.notified_events.include?('file_added') |
194 | 196 |
redirect_to :controller => 'projects', :action => 'list_files', :id => @project |
195 | 197 |
end |
196 |
@versions = @project.versions.sort |
|
197 | 198 |
end |
198 | 199 |
|
199 | 200 |
def list_files |
app/views/projects/_no_versions.rhtml (revision 0) | ||
---|---|---|
1 |
<div class="nodata"> |
|
2 |
<%= simple_format(l(:text_no_project_versions)) %> |
|
3 |
</div> |
app/views/projects/add_file.rhtml (working copy) | ||
---|---|---|
1 | 1 |
<h2><%=l(:label_attachment_new)%></h2> |
2 | 2 | |
3 |
<%= render :partial => 'no_versions' if @versions_empty %> |
|
4 | ||
3 | 5 |
<%= error_messages_for 'attachment' %> |
4 | 6 |
<div class="box"> |
5 | 7 |
<% form_tag({ :action => 'add_file', :id => @project }, :multipart => true, :class => "tabular") do %> |
lang/en.yml (working copy) | ||
---|---|---|
593 | 593 |
text_issue_category_reassign_to: Reassign issues to this category |
594 | 594 |
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)." |
595 | 595 |
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." |
596 |
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." |
|
596 | 597 |
text_load_default_configuration: Load the default configuration |
597 | 598 |
text_status_changed_by_changeset: Applied in changeset %s. |
598 | 599 |
text_issues_destroy_confirmation: 'Are you sure you want to delete the selected issue(s) ?' |