{% extends "masterRead.html" %}

{% block content %}
 
  <h2>Product #{{ domainObject.id }}</h2>

  {% if view.canUpdateDomainObject %}
  <form action="{{uriPrefix}}/{{registryPath}}/update/" method="post">
      <input type="submit" value="Update &raquo;" />
      <br />
  </form>
  {% endif %}
  
  <h2>&quot;{{ domainObject.description|escape }}&quot;</h2>
  
  <div id="goals-table">
  <h3>Purpose of the Product</h3>
  <p><i>&quot;The reason the product is being developed.&quot;</i></p>
  {% if domainObject.purpose or domainObject.listGoals %}
    {% if domainObject.purpose %}
  <h4>Background of the project</h4>
  <p><i>&quot;A short description of the work being done, and the situation that triggered the analysis effort.&quot;</i></p>
  <p>{{domainObject.asDictLabels.purpose}}</p>
    {% endif %}
    {% if domainObject.listGoals %}
  <h4>Goals of the work</h4>
      {% for goal in domainObject.listGoals %}
      <p class="greylinks"><big><a href="{{uriPrefix}}/goals/{{goal.id}}/">"{{ goal.asDictLabels.description|escape }}"</a></big></p>
      {% endfor %}

    {% endif %}
  {% else %}
    <p>This product has no recorded purpose.</p>
  {% endif %}

  </div>

  {% if domainObject.stakeholders %}
  <h3>Stakeholders</h3>
  <p><i>&quot;The roles or names of people and organizations who will finance or otherwise contribute to, or are affected by the product.&quot;</i></p>
  <p>{{domainObject.asDictLabels.stakeholders}}</p>
  {% endif %}

  {% if domainObject.users %}
  <h3>Users of the Product</h3>
  <p><i>&quot;A list of the potential users of the product.&quot;</i></p>
  <p>{{domainObject.asDictLabels.users}}</p>
  {% endif %}
  
  {% if domainObject.constraints %}
  <h3>Mandated Constraints</h3>
  <p><i>&quot;A list of things the product must be and do.&quot;</i></p>
  <p>{{domainObject.asDictLabels.constraints}}</p>
  {% endif %}

  {% if domainObject.glossary %}
  <h3>Naming Conventions and Definitions</h3>
  <p><i>&quot;A glossary containing the meanings of all names, acronyms, and abbreviations used within the requirements specification. Select names carefully to avoid giving a different, unintended meaning.&quot;</i></p>
  <p>{{domainObject.asDictLabels.glossary}}</p>
  {% endif %}

  <h3>Scope of the Work</h3>
  <p><i>&quot;An analysis of the stories that might be supported by the new product.&quot;</i></p>
  <div id="events-table">
  </div>

  <div id="stories-table">
  <p>The product supports these stories:</p>
  {% for assn in domainObject.stories %}
  <p class="greylinks">
    <small>
    {% if view.canUpdateDomainObject %}
      <a class="dissociate" href="#{{registryPath}}/stories/{{ assn.story.id }}">&#215;</a>
    {% endif %}
      <a href="{{uriPrefix}}/stories/{{assn.story.id}}/">Story #{{assn.story.id}}</a>
    </small>
    <br />
    <big>
      <a href="{{uriPrefix}}/stories/{{assn.story.id}}/">"{{ assn.story.description|escape }}"</a>
    </big>
  </p>
  {% endfor %}
  </div>
  {% if view.canUpdateDomainObject %}
  <div><form><input type="text" id="stories-completer" class="completer" registryPath="{{registryPath}}/stories"/></form>  </div><br/>
  {% endif %}

  <h3>Scope of the System</h3>
  <p><i>&quot;Determine, with the appropriate stakeholders, which part of the story should be supported by some sort of product and what part should be done entirely by the user.&quot;</i></p>
  <p>The product shall satisfy these requirements:</p>
  <div id="requirements-table">
  {% for i in domainObject.dictRequirementsByType.items %}
  {% if i.1 %}
  <h4>{{ i.0.getLabelValue }} Requirements</h4>
    {% for requirement in i.1 %}
  <p class="greylinks">
    <small>
    <a href="{{uriPrefix}}/requirements/{{requirement.id}}/">{{requirement.type.getLabelValue}} Requirement #{{requirement.id}}</a>
    </small>
      {% if view.session %} {% if requirement.ticketUrl %}
    <a id="{{uriPrefix}}/requirements/{{requirement.id}}/" 
       href="{{requirement.ticketUrl|escape}}" 
       title="Update ticket" 
       target="_blank" 
       class="ticket-completer">&#10004;</a>
      {% else %} {% if domainObject.newTicketUrl %}
    <a id="{{uriPrefix}}/requirements/{{requirement.id}}/" 
       href="{{domainObject.newTicketUrl|escape}}?&summary={{requirement.description|escape}}"
       title="New ticket" 
       target="_blank" 
       class="ticket-completer">&raquo;</a>
      {% endif %} {% endif %} {% endif %}
    <br />
    <a href="{{uriPrefix}}/requirements/{{requirement.id}}/"><big> "{{requirement.description|escape}}"</big></a>
  <br />
    <small>
      {% for storyAssn in requirement.stories %}
      <a href="{{ uriPrefix }}/stories/{{ storyAssn.story.id }}/">"{{ storyAssn.story.description|escape }}"</a>
      {% endfor %}
    </small>
  </ul>
    {% endfor %}
  {% endif %}
  {% endfor %}

  </div>

  {% if domainObject.domainModel %}
  <h3>Domain Model</h3>
  <p>{{domainObject.asDictLabels.domainModel}}</p>
  {% endif %}

  {% if domainObject.notes %}
  <h3>Notes</h3>
  <p>{{domainObject.asDictLabels.notes}}</p>
  {% endif %}

  <div id="collections-table">
  {% if domainObject.collections %}
  <h3>Collections</h3>
  <p>This product has been included in the following collections:
  </p>
  <table>
    <th>Collection</th>
  {% for assn in domainObject.collections %}
    <tr>
      <td><a href="{{ uriPrefix }}/collections/{{ assn.collection.id }}/">{{ assn.collection.description|escape }}</a></td>
      </tr>
  {% endfor %}
  </table>
  {% endif %}
  </div>

  <br />
  <br />
  <big>END</big>
  <br />
  <br />
  {% if view.canUpdateDomainObject %}
  <form action="{{uriPrefix}}/{{registryPath}}/update/" method="post">
    <strong>Do you wish to update this {{domainClassName}}?</strong><br />
    <p>
      <input type="submit" value="Update {{domainClassName}} &raquo;" />
    </p>
  </form>
    {% endif %}
    {% if view.canDeleteDomainObject %}
  <form action="{{uriPrefix}}/{{registryPath}}/delete/" method="post">
    <strong>Do you wish to delete this {{domainClassName}}?</strong><br />
    <p>
      <input type="submit" value="Delete {{domainClassName}} &raquo;" />
    </p>
  </form>
  {% endif %}
  

{% endblock %}

