orbit_demo_new_old4/modules/announcement/annc_index20.html.erb

98 lines
2.4 KiB
Plaintext

<div class="i-annc index-announcement-20">
<h3 class="i-annc__page-title">{{page-title}}</h3>
<ul class="i-annc__list row" data-level="0" data-list="announcements">
<li class="i-annc__item">
<div class="i-annc__content-wrap">
<div class="i-annc__meta">
<span class="i-annc__postdate-wrap" date-format="%Y-%m-%d">
<span class="i-annc__postdate">{{postdate}}</span>
</span>
<span class="i-annc__category-wrap">
<i class="fa fa-clone"></i>
<span class="i-annc__category">{{category}}</span>
</span>
<span class="i-annc__status-wrap" data-list="statuses" data-level="1">
<span class="i-annc__status label status {{status-class}}">{{status}}</span>
</span>
</div>
<h4 class="i-annc__entry-title">
<a class="i-annc__title" href="{{link_to_show}}">{{title}}</a>
</h4>
<p class="i-annc__subtitle">{{subtitle}}</p>
</div>
</li>
</div>
{{pagination_goes_here}}
<script>
function transdate(){
var n=document.getElementsByClassName('i-annc__postdate').length;
var i;
var xx = new Array(n);
if(n != 0){
for(i=0;i<n;i++){
var yy;
xx[i] = document.getElementsByClassName('i-annc__postdate')[i].innerHTML;
JSON.stringify(xx[i]);
if(xx[i]==undefined){
return;
}else{
JSON.stringify(yy);
yy = xx[i].split('-');
//console.log(xx[i]);
switch (yy[1]) {
case '01':
yy[1]='JAN';
break;
case '02':
yy[1]='FEB';
break;
case '03':
yy[1]='MAR';
break;
case '04':
yy[1]='APR';
break;
case '05':
yy[1]='MAY';
break;
case '06':
yy[1]='JUN';
break;
case '07':
yy[1]='JUL';
break;
case '08':
yy[1]='AUG';
break;
case '09':
yy[1]='SEP';
break;
case '10':
yy[1]='OCT';
break;
case '11':
yy[1]='NOV';
break;
case '12':
yy[1]='DEC';
break;
default:
console.log(yy[1]);
break;
}
document.getElementsByClassName('i-annc__postdate')[i].innerHTML=("<div class='month'>"+yy[1]+"</div><div class='day'>"+yy[2]+"</div>");
};
};
};
};
$(document).ready(function() {
try {
transdate()
} catch (e) {
};
});
</script>