<ul class="breadcrumb">
	<li><span>Home</span><span class="divider">/</span></li>
	<li><span><%= t('gallery.gallery') %></span><span class="divider">/</span></li>
	<li class="text-blue"><%= t(:edit) %></li>
</ul>
<ul class="nav nav-tabs">
	<% @site_valid_locales.each_with_index do |locale, i| %>
    <li <%= ( i == 0 ) ? "class=active" : '' %>><a data-toggle="tab" href=".<%= locale %>"><%= I18nVariable.from_locale(locale) %></a></li>
	<% end %>
</ul>
<form id="edit_album" action="update_album" method="post">
	<div class="tab_content">
		<% @site_valid_locales.each_with_index do |locale, i| %>
			<% if i == 0 %>
				<div class="<%= locale %> fade tab-pane in active">
			<% else %>
				<div class="<%= locale %> fade tab-pane" >
			<% end %>

			<div class="albumname_edit">
				<label for=""><%= t("gallery.album_name") %></label>
				<div class="inputui rginput rgih26 w380"><input type="text" name="album[name_translations][<%= locale %>]" value="<%= @album_name[locale] %>" class="txtchange" /></div>
			</div>

			<div class='description_loader'>
				<% @images.each_with_index do |image,x| %>
					<div class="rgphoto_edit <%= locale %>">
						<a href="orbit_gallery?theater=<%= image.id %>"><img src="<%= image.file.thumb.url %>"></a>
						<div class="inputui rginput rgih98 w380">
							<textarea name="gallery_album_gallery_images_attributes[<%= x %>][description_translations][<%= locale %>]" class="txtchange" for="<%= image.id %>"><%= image.description_translations[locale] %></textarea>
						</div>
						<div class="edit_fn">
							<% if image.id.to_s == @cover %>
								<a class="btn btn-primary rgbtsg bt-cover setcover active" onclick="return false;" title="<%= t("gallery.cover") %>" href="<%= image.id %>"><span class="icon-star icon-white"></span></a>
							<% else %>
								<a class="btn rgbtsg bt-cover" onclick="return false;" title="<%= t("gallery.set_cover") %>" href="<%= image.id %>"><span class="icon-star-empty"></span></a>
							<% end %>
							<a class="btn rgbtsg bt-tag" onclick="return false;" title="<%= t("gallery.photo_tag") %>" href="<%= image.id %>"><span class="icon-tags"></span></a>
							<a class="btn rgbtsg bt-dels" onclick="return false;" title="<%= t(:delete_) %>" href="<%= image.id %>"><span class="icon-trash"></span></a>
						</div>
					</div>
				<% end %>
			</div>	
		</div>
	<% end %>
	<input type="submit" value="Submit" />
</form>
	
	<!-- <div class="tab-pane in active">
		<div class="albumname_edit">
			<label for="">Album Name:</label>
			<div class="inputui rginput rgih26 w380"><span><input type="text" id='album_name_text' value="<%= @album_name %>" class="txtchange" /></span></div>
		</div>
		<div id='description_loader'>
			<% @images.each do |image| %>
			<div class="rgphoto_edit">
				<a href="orbit_gallery?theater=<%= image.id %>"><img src="<%= image.file.thumb.url %>"></a>
				<div class="inputui rginput rgih98 w380">
					<span>
						<textarea  name="description_box" class="txtchange" for="<%= image.id%>"><%= image.description %></textarea>
					</span>
				</div>
				<div class="edit_fn">
					<a class="rgui rgbt rgbtsg bt-dels" onclick="return false;" title="Delete" href="<%= image.id %>">Delete</a>
					<% if image.id.to_s == @cover %>
						<a class="rgui rgbt rgbtsg bt-cover setcover" onclick="return false;" title="Set Cover" href="<%= image.id %>">Set Cover</a>
					<% else %>
						<a class="rgui rgbt rgbtsg bt-cover" onclick="return false;" title="Set Cover" href="<%= image.id %>">Set Cover</a>
					<% end %>
				</div>
			</div>
			<% end %>
		</div>
	</div>  -->
