file manger preview and pagination is done.
This commit is contained in:
1 parent
800f108be3
commit
a02cd97880
6 files changed
+51
-21
No files matched your search
@@ -6,6 +6,7 @@
|
||||
<input type="hidden" value="<%= asset.description_translations[locale] rescue nil %>" id="<%= locale %>_desc_<%= asset.id %>" />
|
||||
<input type="hidden" value="<%= asset.title_translations[locale] rescue nil %>" id="<%= locale %>_title_<%= asset.id %>" />
|
||||
<% end %>
|
||||
<input type="hidden" value="<%= File.extname(asset.data.url) %>" id="ext_<%= asset.id %>" />
|
||||
</td>
|
||||
<td><%= asset.title_translations[I18n.locale.to_s] rescue nil %></td>
|
||||
<!-- <td>
|
||||
@@ -20,7 +21,7 @@
|
||||
<!-- <td><%#= asset.data.file.content_type rescue nil %></td> -->
|
||||
<td><%= number_to_human_size(asset.data.file.file_length) rescue nil %></td>
|
||||
<td><%= asset.description rescue nil %></td>
|
||||
<td>
|
||||
<!-- <td>
|
||||
<div class="label-group">
|
||||
<div class="label-td">
|
||||
<% asset.sorted_tags.each do |tag| %>
|
||||
@@ -28,7 +29,7 @@
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</td> -->
|
||||
<td>
|
||||
<a href="<%= edit_admin_asset_path(asset) %>" class="editform">Edit</a>
|
||||
</td>
|
||||
|
||||
@@ -214,11 +214,14 @@
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane fade in active" id="filemanager">
|
||||
<div class="input-area clearfix">
|
||||
<!-- <a href="<%= admin_module_tags_path(:module_app_id => @module_app_id.to_s) %>"> Tag Management </a> -->
|
||||
<div id="panel_r" class="pull-right">
|
||||
preview is here
|
||||
<label>Preview</label>
|
||||
<div class="preview-area">
|
||||
</div>
|
||||
</div>
|
||||
<div id="panel_l" class="tab-pane fade in active pull-left">
|
||||
<lable>Search Box : </label>
|
||||
<input type="text" name="filter" placeholder="Enter Filename" />
|
||||
<table id="asset_sort_list" class="table main-list">
|
||||
<thead>
|
||||
<tr>
|
||||
@@ -226,7 +229,6 @@
|
||||
<th>Name</th>
|
||||
<th>Size</th>
|
||||
<th>Description</th>
|
||||
<th>Tags</th>
|
||||
<th>Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -235,24 +237,13 @@
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="pagination pagination-centered">
|
||||
<ul>
|
||||
<li><a href="#">«</a></li>
|
||||
<li><a href="#">1</a></li>
|
||||
<li><a href="#">2</a></li>
|
||||
<li><a href="#">3</a></li>
|
||||
<li><a href="#">4</a></li>
|
||||
<li><a href="#">5</a></li>
|
||||
<li><a href="#">»</a></li>
|
||||
</ul>
|
||||
<%= paginate @assets, :params => {:direction => params[:direction], :sort => params[:sort], :type => params[:type]}, :remote => true %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-actions form-fixed pagination-right">
|
||||
<button class="btn btn-primary" id="insert_btn" style="display:none;">Insert</button>
|
||||
<button class="btn btn-primary" id="delete_btn" style="display:none;">Delete</button>
|
||||
<div id="asset_pagination" class="paginationFixed">
|
||||
<%= paginate @assets, :params => {:direction => params[:direction], :sort => params[:sort], :filter => @filter, :new_filter => nil, :sort_options => params[:sort_options]}, :remote => true %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tab-pane fade" id="upload">
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
$("#tbody_assets").html("<%= j render :partial => 'asset', :collection => @assets %>");
|
||||
$(".pagination").html("<%= j paginate @assets, :params => {:direction => params[:direction], :sort => params[:sort], :type => params[:type]}, :remote => true %>");
|
||||
$( ".preview-area" ).empty();
|
||||
Reference in new issue
Block a user