Jump to content

The ultimate community for Ruby on Rails developers.


Photo

Showing interface on mobile

ruby-on-rails-4 mobile

  • Please log in to reply
No replies to this topic

#1 dailammoc

dailammoc

    Dispatcher

  • Members
  • 38 posts
  • Location/

Posted 13 May 2014 - 04:58 AM

I have this partial to show area index, it work correctly on pc interface. However, when I showed it on mobile, it was collapsed:

<div class="area-selector">
	<div class="all-area">
		<ul>
			<li>
		<% if prefecture_id || area_id -%>
		<%= link_to(image_tag('user_custom/bt_allareaview.gif', :alt => '全エリア表示', :class => 'rollover'), path_proc.call(nil)) %>
		<% else -%>
		<%= image_tag('user_custom/bt_allareaview.gif', :alt => '全エリア表示', :class => 'rollover') %>
		<% end -%>
		</li>
		<li>
			<% if area_map_image -%>
			<%#= link_to 'エリアマップを表示', "/images/#{area_map_image}", :popup => ['new_window', 'height=300,width=500'] %>
			<% end -%>
			</li>
		</ul>
	</div>

	<table class="area-selector-table">
		<% accessible_prefectures.each do |prefecture| -%>
		<tr>
			<th>
			<% if prefecture_id != prefecture.id || area_id -%>
				<%= link_to("#{prefecture.name}全域", path_proc.call({:prefecture_id => prefecture.id})) %>
			<% else -%>
				<span class="selected-area"><%=h "#{prefecture.name}全域" %></span>
			<% end -%>
			</th>
			<td>
			<ul class="area-list">
				<% prefecture.areas.each do |area| -%>
				<li>
				<% if area_id != area.id -%>
					<%= link_to(area.name, path_proc.call({:area_id => area.id})) %>
				<% else -%>
					<span class="selected-area"><%=h area.name %></span>
				<% end -%>
				</li>
				<% end -%>
			</ul>
			</td>
		</tr>
		<% end -%>
	</table>
.</div>






Also tagged with one or more of these keywords: ruby-on-rails-4, mobile

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users