Sha256: f60a6b4eafd874ae12df722b7171f92ce375cc727a0906b7061bfa994280802d

Contents?: true

Size: 1.49 KB

Versions: 4

Compression:

Stored size: 1.49 KB

Contents

<%
# WontoMedia - a wontology web application
# Copyright (C) 2011 - Glen E. Ivey
#    www.wontology.com
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License version
# 3 as published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program in the file COPYING and/or LICENSE.  If not,
# see "http://www.gnu.org/licenses/".
%>

<%
  # there ought to be a more idiomatic Rails way to get the right
  # name/id on this, but I haven't been able to find it....
  child_class_prefix = (@item.class == Item) ? '' :
    ItemHelper::ITEM_CLASSNAME_TO_SUBTYPE_SHORT[@item.class.to_s] + "_"
%>

<% if show_class_control %>
  <p class="inputpara">
    <%= f.label :class_item_id, "Class" %>
    <%= popup_help_icon "Help for class", "Help:Popup/ItemClass" %>
    <%=
        select_tag "#{child_class_prefix}item[class_item_id]",
          class_options_list_for( @item ),
          :tabindex=>'105'
     %>
  </p><p class="directions">Optional.</p>
<% else %>
  <%= hidden_field_tag child_class_prefix+'item_class_item_id',
        @item.class_item_id.to_s,
        :name => child_class_prefix+'item[class_item_id]' %>
<% end %>

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
wontomedia-1.0.7 app/views/items/_class_select.html.erb
wontomedia-1.0.6 app/views/items/_class_select.html.erb
wontomedia-1.0.5 app/views/items/_class_select.html.erb
wontomedia-1.0.4 app/views/items/_class_select.html.erb