Update templates.
This commit is contained in:
parent
b2c1e7e305
commit
43e2ab40fe
|
@ -144,7 +144,7 @@ class ArchiveFile
|
|||
if org
|
||||
url_text
|
||||
else
|
||||
url_text.present? ? url_text : "link"
|
||||
url_text.present? ? url_text : self.title
|
||||
end
|
||||
end
|
||||
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|
|
||||
serial_number += 1
|
||||
files << {
|
||||
"file-name" => self.title,
|
||||
"file-type" => self.get_url_text(i),
|
||||
"file-name" => self.get_url_text(i),
|
||||
"file-type" => 'link',
|
||||
"file-url" => url,
|
||||
"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">
|
||||
<span>{{page-title}}</span>
|
||||
</h3>
|
||||
|
@ -35,4 +35,18 @@
|
|||
</div>
|
||||
{{link_to_edit}}
|
||||
</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>
|
|
@ -15,13 +15,13 @@
|
|||
<div id="collapse" class="panel-collapse collapse">
|
||||
<div class="panel-body">
|
||||
<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>
|
||||
<span data-list="statuses" data-level="2">
|
||||
<span class="label status {{status-class}}">{{status}}</span>
|
||||
</span>
|
||||
</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>
|
||||
<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>
|
||||
|
@ -33,4 +33,11 @@
|
|||
</div>
|
||||
{{link_to_edit}}
|
||||
</div>
|
||||
<style>
|
||||
@media (min-width: 769px){
|
||||
.index-archive-2 .dl-horizontal dt.col-sm-3{
|
||||
width: 25%;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</div>
|
Loading…
Reference in New Issue