Skip to content

Instantly share code, notes, and snippets.

@codekitchen
Created June 14, 2011 16:42
Show Gist options
  • Save codekitchen/1025300 to your computer and use it in GitHub Desktop.
Save codekitchen/1025300 to your computer and use it in GitHub Desktop.
<% ot 'criterion_for_assignment', 'For %{assignment} users must %{select_criterion}', :assignment => capture { %>
<span style="padding: 0 4px;">
<select class="id assignment_picker">
</select>
</span>
<% }, :select_criterion => capture { %>
<span style="padding: 0 4px;">
<select class="type assignment_requirement_picker">
<option class="any" value="must_view"><%= t('', %{view the item}) %></option>
<option class="assignment wiki_page discussion_topic" value="must_contribute"><%= t('requirements.must_contribute', %{contribute to the page}) %></option>
<option class="assignment quiz" value="must_submit"><%= t('requirements.must_submit', %{submit the assignment}) %></option>
<option class="assignment quiz" value="min_score"><%= t('requirements.must_score_at_least', %{score at least}) %></option>
</select>
</span>
<% } %>
ot 'criterion_for_assignment', 'For %{assignment} users must %{select_criterion}', :assignment => capture {
_buf << ' <span style="padding: 0 4px;">
<select class="id assignment_picker">
</select>
</span>
'; }, :select_criterion => capture {
_buf << ' <span style="padding: 0 4px;">
<select class="type assignment_requirement_picker">
<option class="any" value="must_view">'; _buf << ( t('', %{view the item}) ).to_s; _buf << '</option>
<option class="assignment wiki_page discussion_topic" value="must_contribute">'; _buf << ( t('requirements.must_contribute', %{contribute to the page}) ).to_s; _buf << '</option>
<option class="assignment quiz" value="must_submit">'; _buf << ( t('requirements.must_submit', %{submit the assignment}) ).to_s; _buf << '</option>
<option class="assignment quiz" value="min_score">'; _buf << ( t('requirements.must_score_at_least', %{score at least}) ).to_s; _buf << '</option>
</select>
</span>
'; }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment