Update templates.
This commit is contained in:
parent
b2c1e7e305
commit
43e2ab40fe
|
@ -144,7 +144,7 @@ class ArchiveFile
|
||||||
if org
|
if org
|
||||||
url_text
|
url_text
|
||||||
else
|
else
|
||||||
url_text.present? ? url_text : "link"
|
url_text.present? ? url_text : self.title
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
def get_data(more_url=nil, base_url=nil, cat_ids=nil, tag_ids=nil, locales=nil)
|
def get_data(more_url=nil, base_url=nil, cat_ids=nil, tag_ids=nil, locales=nil)
|
||||||
|
@ -304,8 +304,8 @@ class ArchiveFile
|
||||||
self.urls.each_with_index do |url,i|
|
self.urls.each_with_index do |url,i|
|
||||||
serial_number += 1
|
serial_number += 1
|
||||||
files << {
|
files << {
|
||||||
"file-name" => self.title,
|
"file-name" => self.get_url_text(i),
|
||||||
"file-type" => self.get_url_text(i),
|
"file-type" => 'link',
|
||||||
"file-url" => url,
|
"file-url" => url,
|
||||||
"serial_number" => serial_number
|
"serial_number" => serial_number
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<div class="i-archive index-archive-2">
|
<div class="i-archive index-archive-2 index-archive-12">
|
||||||
<h3 class="i-archive-title">
|
<h3 class="i-archive-title">
|
||||||
<span>{{page-title}}</span>
|
<span>{{page-title}}</span>
|
||||||
</h3>
|
</h3>
|
||||||
|
@ -35,4 +35,18 @@
|
||||||
</div>
|
</div>
|
||||||
{{link_to_edit}}
|
{{link_to_edit}}
|
||||||
</div>
|
</div>
|
||||||
|
<style>
|
||||||
|
.index-archive-12 dt.i-archive-item-list{
|
||||||
|
float: none;
|
||||||
|
width: auto;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<script>
|
||||||
|
$('.index-archive-12 .panel-heading').each(function(i, v){
|
||||||
|
var $v = $(v);
|
||||||
|
if($v.text().trim() == ''){
|
||||||
|
$v.css('display', 'none');
|
||||||
|
}
|
||||||
|
})
|
||||||
|
</script>
|
||||||
</div>
|
</div>
|
|
@ -15,13 +15,13 @@
|
||||||
<div id="collapse" class="panel-collapse collapse">
|
<div id="collapse" class="panel-collapse collapse">
|
||||||
<div class="panel-body">
|
<div class="panel-body">
|
||||||
<dl class="dl-horizontal i-archive-item-group" data-list="archives" data-level="1">
|
<dl class="dl-horizontal i-archive-item-group" data-list="archives" data-level="1">
|
||||||
<dt class="i-archive-item-list col-sm-5">
|
<dt class="i-archive-item-list col-sm-3">
|
||||||
<sapn class="i-archive-item-title">{{archive-title}}</span>
|
<sapn class="i-archive-item-title">{{archive-title}}</span>
|
||||||
<span data-list="statuses" data-level="2">
|
<span data-list="statuses" data-level="2">
|
||||||
<span class="label status {{status-class}}">{{status}}</span>
|
<span class="label status {{status-class}}">{{status}}</span>
|
||||||
</span>
|
</span>
|
||||||
</dt>
|
</dt>
|
||||||
<dl class="i-archive-files-list col-sm-7" data-list="files" data-level="2">
|
<dl class="i-archive-files-list col-sm-9" data-list="files" data-level="2">
|
||||||
<dd>
|
<dd>
|
||||||
<a href="{{file-url}}" class="i-archive-files-item" target="_blank" title="{{file-name}}">{{file-name}}</a>
|
<a href="{{file-url}}" class="i-archive-files-item" target="_blank" title="{{file-name}}">{{file-name}}</a>
|
||||||
<span class="label label-primary {{file-type}}">{{file-type}}</span>
|
<span class="label label-primary {{file-type}}">{{file-type}}</span>
|
||||||
|
@ -33,4 +33,11 @@
|
||||||
</div>
|
</div>
|
||||||
{{link_to_edit}}
|
{{link_to_edit}}
|
||||||
</div>
|
</div>
|
||||||
|
<style>
|
||||||
|
@media (min-width: 769px){
|
||||||
|
.index-archive-2 .dl-horizontal dt.col-sm-3{
|
||||||
|
width: 25%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
</div>
|
</div>
|
Loading…
Reference in New Issue