Fix frontend index template and copy modules on bundle install/update
This commit is contained in:
1 parent
8751e55556
commit
185b636c7f
2 files changed
+33
-23
No files matched your search
@@ -1,35 +1,28 @@
|
||||
<table class="table table-hover table-striped projects-index competitions-index dt-responsive nowrap">
|
||||
<table class="table table-hover table-striped projects-index competitions-index dt-responsive">
|
||||
<caption><h3>{{widget-title}}</h3></caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-md-1">{{year}}</th>
|
||||
<th class="col-md-2">{{competition_name}}</th>
|
||||
<th class="col-md-2">{{award_name}}</th>
|
||||
<th class="col-md-1">{{award_place}}</th>
|
||||
<th class="col-md-2">{{awarding_unit}}</th>
|
||||
<th class="col-md-2 min-tablet-l">{{competition_date}}</th>
|
||||
<th class="col-md-1 min-tablet-l">{{note}}</th>
|
||||
<tr data-level="0" data-list="headers">
|
||||
<th class="col-md-{{col}}">{{head-title}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody data-level="0" data-list="competitions">
|
||||
<tr>
|
||||
<td>{{year}}</td>
|
||||
<td><a href="{{link_to_show}}">{{competition_name}}</a></td>
|
||||
<td>{{award_name}}</td>
|
||||
<td>{{award_place}}</td>
|
||||
<td>{{awarding_unit}}</td>
|
||||
<td date-format="%Y-%m-%d">{{competition_date}}</td>
|
||||
<td>{{note}}</td>
|
||||
<tr data-level="1" data-list="personal_competitions">
|
||||
<td>{{value}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
{{pagination_goes_here}}
|
||||
|
||||
<script>
|
||||
$('table.competitions-index').DataTable({
|
||||
searching: false,
|
||||
paging: false,
|
||||
ordering: false,
|
||||
info: false
|
||||
$('table.competitions-index').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>
|
||||
@@ -4,11 +4,28 @@ $:.push File.expand_path("../lib", __FILE__)
|
||||
require "personal_competition/version"
|
||||
|
||||
# Describe your gem and declare its dependencies:
|
||||
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
|
||||
|
||||
Gem::Specification.new do |s|
|
||||
s.name = "personal_competition"
|
||||
s.version = PersonalCompetition::VERSION
|
||||
s.authors = ["Orbitek"]
|
||||
s.email = ["junyi@orbitek.co"]
|
||||
s.email = ["service@orbitek.co"]
|
||||
s.homepage = "https://orbitek.co/"
|
||||
s.summary = "Summary of Personal Competition."
|
||||
s.description = "Description of Personal Competition."
|
||||
|
||||
Reference in new issue
Block a user