forked from saurabh/personal-lab
Remove year field in frontend pages.
This commit is contained in:
parent
4ed559efb5
commit
d77eeb96d9
|
@ -30,7 +30,6 @@ class PersonalLabsController < ApplicationController
|
|||
params = OrbitHelper.params
|
||||
plugin = Lab.where(:is_hidden=>false).find_by(uid: params[:uid])
|
||||
fields_to_show = [
|
||||
"year",
|
||||
"lab_title",
|
||||
"location",
|
||||
"participating_professor",
|
||||
|
|
|
@ -44,7 +44,6 @@ class Lab
|
|||
def self.get_plugin_datas_to_member(datas)
|
||||
|
||||
fields_to_show = [
|
||||
"year",
|
||||
"lab_title",
|
||||
"location"
|
||||
]
|
||||
|
|
|
@ -0,0 +1,41 @@
|
|||
<table class="table table-hover table-striped projects-index personal-lab dt-responsive">
|
||||
<caption><h3>{{widget-title}}</h3></caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-md-3">{{th_lab_title}}</th>
|
||||
<th class="col-md-2">{{th_location}}</th>
|
||||
<th class="col-md-3">{{th_member}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody data-level="0" data-list="labs">
|
||||
<tr>
|
||||
<td><a href="{{link_to_show}}">{{lab_title}}</td>
|
||||
<td>{{location}}</td>
|
||||
<td>{{member}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
{{pagination_goes_here}}
|
||||
|
||||
<script>
|
||||
for ( var i = 0; i < $('thead th').length ; i++ ) {
|
||||
if( $('thead th').length > 2 ) {
|
||||
var th = $('thead th');
|
||||
for ( var q = 3; q < th.length ; q++ ) {
|
||||
th.eq(q).addClass('min-tablet-l');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$('table.personal-lab').each(function(){
|
||||
if($(this).find('thead').length!=0 && $(this).find('td').length!=0 && !$(this).hasClass('dataTable')){
|
||||
$(this).DataTable({
|
||||
searching: false,
|
||||
paging: false,
|
||||
ordering: false,
|
||||
info: false,
|
||||
autoWidth: false
|
||||
});
|
||||
}
|
||||
});;
|
||||
</script>
|
|
@ -0,0 +1,40 @@
|
|||
<table class="table table-hover table-striped projects-index personal-lab dt-responsive nowrap">
|
||||
<caption><h3>{{widget-title}}</h3></caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-md-2">{{th_year}}</th>
|
||||
<th class="col-md-3">{{th_lab_title}}</th>
|
||||
<th class="col-md-2">{{th_location}}</th>
|
||||
<th class="col-md-3">{{th_member}}</th>
|
||||
<th class="col-md-2">更多內容</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody data-level="0" data-list="labs">
|
||||
<tr>
|
||||
<td>{{year}}</td>
|
||||
<td><a href="{{link_to_show}}">{{lab_title}}</td>
|
||||
<td>{{location}}</td>
|
||||
<td>{{member}}</td>
|
||||
<th><a href="{{link_to_show}}">{{th_detail}}</a></th>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
{{pagination_goes_here}}
|
||||
|
||||
<script>
|
||||
for ( var i = 0; i < $('thead th').length ; i++ ) {
|
||||
if( $('thead th').length > 2 ) {
|
||||
var th = $('thead th');
|
||||
for ( var q = 3; q < th.length ; q++ ) {
|
||||
th.eq(q).addClass('min-tablet-l');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$('table.personal-lab').DataTable({
|
||||
searching: false,
|
||||
paging: false,
|
||||
ordering: false,
|
||||
info: false
|
||||
});
|
||||
</script>
|
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
"frontend": [
|
||||
{
|
||||
"filename" : "index",
|
||||
"name" : {
|
||||
"zh_tw" : "1. 列表",
|
||||
"en" : "1. List"
|
||||
},
|
||||
"thumbnail" : "thumb.png"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
<table class="table table-striped plugin-show-table">
|
||||
<tbody data-list="plugin_datas" data-level="0">
|
||||
<tr>
|
||||
<th class="{{title_class}}">{{title}}</th>
|
||||
<td class="{{value_class}}">{{value}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
Binary file not shown.
After Width: | Height: | Size: 4.0 KiB |
|
@ -2,7 +2,22 @@ $:.push File.expand_path("../lib", __FILE__)
|
|||
|
||||
# Maintain your gem's version:
|
||||
require "personal_lab/version"
|
||||
|
||||
bundle_update_flag = ARGV[0]=='update' || ARGV[0]=='install'
|
||||
if bundle_update_flag
|
||||
app_path = File.expand_path(__dir__)
|
||||
template_path = ENV['PWD'] + '/app/templates'
|
||||
all_template = Dir.glob(template_path+'/*/')
|
||||
puts 'copying module'
|
||||
all_template.each do |folder|
|
||||
if folder.split('/')[-1] != 'mobile'
|
||||
begin
|
||||
system ('cp -r '+ app_path + '/modules/ ' + folder)
|
||||
rescue
|
||||
puts 'error copy'
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
# Describe your gem and declare its dependencies:
|
||||
Gem::Specification.new do |s|
|
||||
s.name = "personal_lab"
|
||||
|
|
Loading…
Reference in New Issue