word_cloud.html 1.6 KB
Newer Older
1
<%page expression_filter="h"/>
2 3
<%! from django.utils.translation import ugettext as _ %>

4
<div
5
    id="word_cloud_${element_id}"
6 7 8
    class="${element_class}"
    data-ajax-url="${ajax_url}"
>
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
    % if display_name:
    <h3 class="hd hd-3" id="word_cloud_${element_id}_heading">${display_name}</h3>
    % endif

    % if instructions is not None:
    <div class="input_cloud_section" role="group" aria-labelledby="word_cloud_${element_id}_instructions">
    % elif display_name:
    <div class="input_cloud_section" role="group" aria-labelledby="word_cloud_${element_id}_heading">
    % else:
    <div class="input_cloud_section" role="group">
    % endif
    
        % if instructions is not None:
        <div class="input_cloud_instructions" id="word_cloud_${element_id}_instructions">
            ${instructions}
        </div>
        % endif

27
        % for row in range(num_inputs):
28 29 30 31 32 33 34 35 36
            <label>
                <span class="sr">${_('{num} of {total}').format(num=row+1, total=num_inputs)}</span>
                <input
                    class="input-cloud"
                    ${'style="display: none;"' if submitted else ''}
                    type="text"
                    size="40"
                />
            </label>
37 38
        % endfor

39 40 41 42
        <div class="action">
            <button class="save" type="button">${_('Save')}</button>
        </div>
    </div>
43

44
    <div id="result_cloud_section_${element_id}" class="result_cloud_section">
45
        <div class="word_cloud"></div>
46 47 48 49
        <p class="total_num_words"></p>
        <p>${_('Your words were:')}</p>
        <ul class="your_words"></ul>
    </div>
50

51
</div>