small fixes for edit

This commit is contained in:
Harry Bomrah 2015-12-27 00:42:40 +08:00
parent 1ed9e43bb6
commit d0124362d1
3 changed files with 3 additions and 3 deletions

View File

@ -52,7 +52,7 @@ class Admin::VlogsController < OrbitAdminController
vlog.save
end
end
redirect_to admin_vlogs_path
redirect_to admin_vlogs_path(:page => params[:page])
end
def show

View File

@ -58,7 +58,7 @@
<input type="hidden" name="video_dirname" id="video_file_temp_dir" />
<input type="hidden" name="video_filename" id="video_file_temp_name" />
<a href="#videoUploader" role="button" class="btn btn-info" data-toggle="modal">Upload Video</a>
<label id="video_file_name"><%= File.basename(@vlog.video.file.path) if !@vlog.new_record? %></label>
<label id="video_file_name"><%= File.basename(@vlog.video.file.path) if !@vlog.new_record? && @vlog.type != "youtube" %></label>
</div>
</div>
<div class="control-group video <%= @vlog.type == "upload" ? "" : "hide" %>" for="upload">

View File

@ -33,7 +33,7 @@
<div class="quick-edit">
<ul class="nav nav-pills">
<% if can_edit_or_delete?(vlog) %>
<li><a href="/admin/vlogs/<%= vlog.id.to_s %>/edit"><%= t(:edit) %></a></li>
<li><a href="<%= edit_admin_vlog_path(vlog.id, :page => params[:page]) %>"><%= t(:edit) %></a></li>
<li><a href="<%= admin_vlog_path(vlog.id,:page => params[:page]) %>" class="delete text-error" data-method="delete" data-confirm="Are you sure?"><%= t(:delete_) %></a></li>
<% end %>
</ul>