Mercurial > hg > soundsoftware-site
changeset 260:847add61573b feature_80
* Add some text explaining active toggle function; show it only where there's at least one file in the list
author | Chris Cannam <chris.cannam@soundsoftware.ac.uk> |
---|---|
date | Fri, 04 Mar 2011 15:03:49 +0000 |
parents | a5d526f6d88a |
children | 1d51c9df069b f936ec3cb58a 797be8798817 |
files | app/views/files/index.html.erb config/locales/en.yml |
diffstat | 2 files changed, 5 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/app/views/files/index.html.erb Fri Mar 04 14:55:47 2011 +0000 +++ b/app/views/files/index.html.erb Fri Mar 04 15:03:49 2011 +0000 @@ -18,6 +18,7 @@ <th></th> </tr></thead> <tbody> +<% have_file = false %> <% @containers.each do |container| %> <% next if container.attachments.empty? -%> <% if container.is_a?(Version) -%> @@ -30,6 +31,7 @@ <% container.attachments.each do |file| %> <tr class="file <%= cycle("odd", "even") %>"> <td class="active"> + <% have_file = true %> <% if active_change_allowed active_id = "active-" + file.id.to_s -%> <div id="<%= active_id %>"> @@ -58,6 +60,6 @@ </tbody> </table> -<%= l(:text_files_active_change) if active_change_allowed %> +<%= l(:text_files_active_change) if active_change_allowed and have_file %> <% html_title(l(:label_attachment_plural)) -%>
--- a/config/locales/en.yml Fri Mar 04 14:55:47 2011 +0000 +++ b/config/locales/en.yml Fri Mar 04 15:03:49 2011 +0000 @@ -925,7 +925,8 @@ text_zoom_in: Zoom in text_zoom_out: Zoom out text_settings_repo_creation: The repository for a project should be set up automatically within a few minutes of the project being created.<br>You should not have to adjust any settings here.<br>Please check again in ten minutes, and <a href="/projects/soundsoftware-site/wiki/Help">contact us</a> if there is any problem. - + text_files_active_change: <br>Click the star to switch active status for a download on or off.<br>Active files will be shown more prominently in the download page. + default_role_manager: Manager default_role_developer: Developer default_role_reporter: Reporter