PageRenderTime 20ms CodeModel.GetById 14ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/templates/community_rating.mako

https://bitbucket.org/cistrome/cistrome-harvard/
Mako | 33 lines | 32 code | 1 blank | 0 comment | 0 complexity | 88bcc60a7dfa20b0e0a677c6399a7bb6 MD5 | raw file
 1<%
 2    label = "ratings"
 3    if num_ratings == 1:
 4        label = "rating"
 5%>
 6<div>
 7    <input name="star1-${item_id}" type="radio" class="community_rating_star star" disabled="disabled" value="1"
 8    %if ave_item_rating > 0 and ave_item_rating <= 1.5:
 9        checked="checked"
10    %endif
11    
12    />
13    <input name="star1-${item_id}" type="radio" class="community_rating_star star" disabled="disabled" value="2"
14    %if ave_item_rating > 1.5 and ave_item_rating <= 2.5:
15        checked="checked"
16    %endif
17    />
18    <input name="star1-${item_id}" type="radio" class="community_rating_star star" disabled="disabled" value="3"
19    %if ave_item_rating > 2.5 and ave_item_rating <= 3.5:
20        checked="checked"
21    %endif
22    />
23    <input name="star1-${item_id}" type="radio" class="community_rating_star star" disabled="disabled" value="4"
24    %if ave_item_rating > 3.5 and ave_item_rating <= 4.5:
25        checked="checked"
26    %endif
27    />
28    <input name="star1-${item_id}" type="radio" class="community_rating_star star" disabled="disabled" value="5"
29    %if ave_item_rating > 4.5:
30        checked="checked"
31    %endif
32    />
33</div>