correcting link to projects listed as subprojects in the project details widget

pull/6827/head
Jens Ulferts 13 years ago
parent 2f05d24e11
commit 8b2daf5c49
  1. 4
      app/views/my_projects_overviews/blocks/_projectdetails.rhtml
  2. 22
      features/project_details_widget.feature

@ -1,11 +1,11 @@
<h2 class="page-layout-only"><%=l(:label_project_details)%></h2> <h2 class="page-layout-only"><%=l(:label_project_details)%></h2>
<h3><%=l(:label_project_details)%></h3> <h3><%=l(:label_project_details)%></h3>
<div class="overview"> <div class="overview project_details">
<ul> <ul>
<% unless @project.homepage.blank? %><li><%=l(:field_homepage)%>: <%= auto_link(h(@project.homepage)) %></li><% end %> <% unless @project.homepage.blank? %><li><%=l(:field_homepage)%>: <%= auto_link(h(@project.homepage)) %></li><% end %>
<% if @subprojects.any? %> <% if @subprojects.any? %>
<li><%=l(:label_subproject_plural)%>: <li><%=l(:label_subproject_plural)%>:
<%= @subprojects.collect{|p| link_to(h(p), :action => 'show', :id => p)}.join(", ") %></li> <%= @subprojects.collect{|p| link_to(h(p), project_url(p))}.join(", ") %></li>
<% end %> <% end %>
<% @project.visible_custom_field_values.each do |custom_value| %> <% @project.visible_custom_field_values.each do |custom_value| %>
<% if !custom_value.value.blank? %> <% if !custom_value.value.blank? %>

@ -0,0 +1,22 @@
Feature: Project Details Widget
Background:
Given there is 1 project with the following:
| Name | Parent |
And the project "Parent" has 1 subproject with the following:
| Name | Child |
And I am already logged in as "admin"
@javascript
Scenario: Adding a "Project Details" widget
Given I am on the project "Parent" overview personalization page
When I select "Project details" from the available widgets drop down
And I wait for the AJAX requests to finish
Then the "Project details" widget should be in the hidden block
Scenario: Includes links to all child projects
Given the following widgets should be selected for the overview page of the "Parent" project:
| top | Projectdetails |
When I go to the overview page of the project called "Parent"
And I follow "Child" within ".mypage-box .project_details"
Then I should be on the overview page of the project called "Child"
Loading…
Cancel
Save