Project

General

Profile

Actions

Defect #10153

closed

Missing "add new file" in Files section after upgrade from 1.0.0 to 1.3.0

Added by Alessio Pollero almost 13 years ago. Updated almost 13 years ago.

Status:
Closed
Priority:
Normal
Category:
-
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Cant reproduce
Affected version:

Description

After upgrading from redmine 1.0.0 to 1.3.0 (latest stable release) i don't have the "add new file" button in the Files section of my project though i have the proper permission (Manage Files), why ? How can i solve this issue ?

Ruby Version : ruby 1.8.7 (2010-06-23 patchlevel 299) [x86_64-linux]
Redmine Version : 1.3.0.stable


Files

page.html (7.35 KB) page.html page source Alessio Pollero, 2012-02-06 18:56
ScreenShot.PNG (29.5 KB) ScreenShot.PNG screenshot Alessio Pollero, 2012-02-06 18:56
Actions #1

Updated by Alessio Pollero almost 13 years ago

Database : PostgreSQL 9.0

Actions #2

Updated by Jean-Philippe Lang almost 13 years ago

  • Priority changed from High to Normal
  • Resolution set to Cant reproduce

Works ok for me on 1.3 stable.
Some changes were done in the files view, any plugins or custom code changes?

Actions #3

Updated by Alessio Pollero almost 13 years ago

  • Assignee set to Jean-Philippe Lang

I have this plugins installed :

  • Localizable plugin 0.1.1
  • Redmine Gitrevision Download plugin 0.0.8
  • Redmine Light Box plugin 0.0.1
  • Issues XLS export 0.1.3
Actions #4

Updated by Jean-Philippe Lang almost 13 years ago

Make sure that none of these plugins override app/views/files/index.html.erb and that you don't have local changes.

Actions #5

Updated by Alessio Pollero almost 13 years ago

Here's the content of my app/views/files/index.html.erb :


<div class="contextual">
<%= link_to(l(:label_attachment_new), new_project_file_path(@project), :class => 'icon icon-add') if User.current.allowed_to?(:manage_files, @project) %>
</div>

<h2><%=l(:label_attachment_plural)%></h2>

<% delete_allowed = User.current.allowed_to?(:manage_files, @project) %>

<table class="list files">
  <thead><tr>
    <%= sort_header_tag('filename', :caption => l(:field_filename)) %>
    <%= sort_header_tag('created_on', :caption => l(:label_date), :default_order => 'desc') %>
    <%= sort_header_tag('size', :caption => l(:field_filesize), :default_order => 'desc') %>
    <%= sort_header_tag('downloads', :caption => l(:label_downloads_abbr), :default_order => 'desc') %>
    <th>MD5</th>
    <th></th>
  </tr></thead>
  <tbody>
<% @containers.each do |container| %>

  <% next if container.attachments.empty? -%>
  <% if container.is_a?(Version) -%>
  <tr>
    <th colspan="6" align="left">
      <%= link_to(h(container), {:controller => 'versions', :action => 'show', :id => container}, :class => "icon icon-package") %>
    </th>

 </tr>
  <% end -%>
  <% container.attachments.each do |file| %>
  <tr class="file <%= cycle("odd", "even") %>">
    <td class="filename"><%= link_to_attachment file, :download => true, :title => file.description %></td>
    <td class="created_on"><%= format_time(file.created_on) %></td>
    <td class="filesize"><%= number_to_human_size(file.filesize) %></td>
    <td class="downloads"><%= file.downloads %></td>
    <td class="digest"><%= file.digest %></td>
    <td align="center">
    <%= link_to(image_tag('delete.png'), attachment_path(file),
                                         :confirm => l(:text_are_you_sure), :method => :delete) if delete_allowed %>
    </td>
  </tr>
  <% end
  reset_cycle %>
<% end %>
  </tbody>
</table>

<% html_title(l(:label_attachment_plural)) -%>

Actions #6

Updated by Etienne Massip almost 13 years ago

Plugins usually override a page by having their own vendor/plugin/<plugin name>app/views/files/index.html.erb (or .rhtml).

A good test would be to remove temporarily these plugins (especially Redmine Light Box plugin 0.0.1), restart Redmine and try to reproduce the issue without any plugin.

Actions #7

Updated by Alessio Pollero almost 13 years ago

I don't have any plugin that override the files view, what could it be ?

/usr/share/redmine/vendor/plugins# find . -name index.html.erb
./engines/test/plugins/test_assets/app/views/assets/index.html.erb
Actions #8

Updated by Etienne Massip almost 13 years ago

Still, I advise you to make a test with no plugins.

Actions #9

Updated by Jean-Philippe Lang almost 13 years ago

A few more questions:
  • can you post the piece of HTML that is generated and where the link should be present
  • what happens when you access the new file form manually with this url: /projects/[project_id]/files/new
Actions #10

Updated by Alessio Pollero almost 13 years ago

If i go through direct URL link /projects/[project_id]/files/new i can upload files without any problem.
I even tried removing lightbox plugin but still the same problem .

I don't see the new File button, though it seems to be in the page source, could depends on the theme ?

Take a look at the screenshot in the attachment...

Actions #11

Updated by Jean-Philippe Lang almost 13 years ago

  • Status changed from New to Closed

Yes, it's a theme issue. The link must be just below your h2 background. Try to add a z-index to .contextual in your css.

Actions #12

Updated by Alessio Pollero almost 13 years ago

Solved, it was a problem of the CSS, the element was set as hidden unreasonably :

.controller-files.action-index .contextual{ display:none; }

changed to :

.controller-files.action-index .contextual{ display:inline; }

Now it works.

Thanks.

Actions

Also available in: Atom PDF