Subversion Repositories DevTools

Rev

Rev 1295 | Blame | Compare with Previous | Last modification | View Log | RSS feed

[%# Screen for displaying the metric information of a topic. #%]

[% USE AutomagicLinks %]

[% PROCESS viewtopicheader.html.tmpl version = version topicview = 0
   topicproperties = 0 topiccomments = 0 topicinfo = 1 closehead = 1
   help = "x637.html" %]
 
[%# Create a form to allow the topic's metrics to be changed #%]
[% SET metric_input_exists = 0 %]
<form method="post" enctype="multipart/form-data" name="form" accept-charset="UTF-8">

<input type="hidden" name="action" value="edit_topic_metrics" />
<input type="hidden" name="topic" value="[% topic %]" />
<input type="hidden" name="mode" value="[% mode %]" />
<input type="hidden" name="version" value="[% topic_version %]" />

<h3>Comment Metrics</h3>

<table cellpadding="2" cellspacing="2" border="0">
    [% FOREACH metric = comment_metrics %]
    [%# Output the metric header on its own line #%]
    <tr>
        <td class="tth">[% metric.name %]</td>

        [%# Now output the metric's enumerated values #%]
        [% FOREACH value = metric.values %]
        <td class="tt0">[% value %]</td>
        [% END %]
    </tr>

    [%# Now output the values #%]
    <tr>
        <td>&nbsp;</td>
        [% FOREACH value = metric.values %]
        <td>[% comment_metric_tally.${metric.name}.$value %]</td>
        [% END %]
    </tr>

    [% END %]

    [%# Output the comment count metrics #%]
    <tr>
        <td class="tth">Total</td>
        <td class="tt0">Comment Threads</td>
        <td class="tt0">Submitted Comments</td>
    </tr>
    <tr>
        <td>&nbsp;</td>
        <td>[% number_comment_threads %]</td>
        <td>[% number_comments %]</td>
    </tr>
</table>

<h3>Topic Metrics</h3>

<table cellpadding="2" cellspacing="2" border="0">
    <tr class="tth">
        <td>Lines</td>

        [% FOREACH metric = topic_metrics %]
        <td onmouseover="(window.status='[% metric.description %]'); return true"
            onmouseout="(window.status=''); return true">[% metric.name %]
            [% IF metric.description != '' %]
            <FONT SIZE="-2">
                <a tabindex="1" href="javascript:void(0)"
                   onmouseover="return overlib('[% metric.description %]');"
                   onmouseout="return nd();">(?)</a>
            </FONT>
            [% END %]
        </td>
        [% END %]
    </tr>
    <tr>
        <td>[% number_of_lines %]</td>

        [% FOREACH metric = topic_metrics %]
        [% IF metric.enabled %]
        [% metric_input_exists = 1 %]
        <td><input name="topic_metric" type="text" size="6" value="[% metric.value %]"/></td>
        [% ELSE %]
        <td>[% metric.value %]</td>
        [% END %]
        [% END %]
    </tr>
</table>

<h3>User Metrics</h3>

<table cellpadding="2" cellspacing="2" border="0">

<tr class="tth">
    <td>User</td>

    [% FOREACH metric = author_metrics %]

    <td onmouseover="(window.status='[% metric.description %]'); return true" 
        onmouseout="(window.status=''); return true">[% metric.name %]
    [% IF metric.description != '' %]
    <FONT SIZE="-2">
    <a tabindex="1" href="javascript:void(0)"
       onmouseover="return overlib('[% metric.description %]');"
       onmouseout="return nd();">(?)</a>
    </FONT>
    [% END %]
    </td>

    [% END %]
</tr>

[% type = 0 %]
<tr class="tt[% type mod 2 %]">
    [% type = type + 1 %]
    <td>[% author %]</td>
    [% FOREACH metric = author_metrics %]
    
    [% IF metric.scope == 'author' || metric.scope == 'participant' %]
        [% IF metric.enabled %]
        [% metric_input_exists = 1 %]
        <td><input name="author_metric" type="text" value="[% metric.value %]" size="6"/></td>
        [% ELSE %]
        <td>[% metric.value %]</td>
        [% END %]
    [% ELSE %]
    <td><input name="author_metric" type="hidden"/></td>
    [% END %]

    [% END %]
</tr>

[% FOREACH rmetric = reviewer_metrics %]
<tr class="tt[% type mod 2 %]">
    [% type = type + 1 %]
    [% SET reviewerindex = loop.index() %]
    <td>[% rmetric.reviewer %]</td>
    [% FOREACH metric = rmetric.user_metrics %]
    
    [% IF metric.scope != 'author' %]
        [% IF metric.enabled != 0 %]
        [% metric_input_exists = 1 %]
        <td><input name="reviewer_metric,[% reviewerindex %]" type="text" value="[% metric.value %]" size="6"/></td>
        [% ELSE %]
        <td>[% metric.value %]</td>
        [% END %]
    [% ELSE %]
    <td><input name="reviewer_metric,[% reviewerindex %]" type="hidden"/></td>
    [% END %]

    [% END %]
</tr>
[% END %]

<tr class="tt[% type mod 2 %]">
    [% type = type + 1 %]
    <td>&nbsp;</td>

    [% FOREACH metric = total_metrics %]
        <td>[% metric.value %]</td>
    [% END %]
</tr>
</table>

<p>

[% IF metric_input_exists == 1 %]
[%# Render the submit button #%]
<input type="submit" name="button" value="Update Metrics" 
       onClick="return DeleteTopicConfirm();"/> 
[% END %]
</form>

<h3>Activity Log</h3>

<table cellpadding="2" cellspacing="2" border="0">
    <tr class="tth"><td>Who</td><td>When</td><td>When</td></tr>

    [% type = 0 %]
    [% FOREACH activity = activity_list %]
    <tr class="tt[% type mod 2 %]">
        <td>[% activity.email | html_entity %]</td>
        <td>[% activity.date | html_entity %]</td>
        <td>[% activity.description | html_entity | $AutomagicLinks %]</td>
    </tr>
    [% type = type + 1 %]
    [% END %]
</table>

[% PROCESS trailer.html.tmpl %]

</BODY>
</HTML>