Skip to content

Commit

Permalink
Refactoring, cleanup and formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
kokoro912 committed Apr 14, 2019
1 parent 21b7f4e commit f1f5986
Show file tree
Hide file tree
Showing 14 changed files with 209 additions and 211 deletions.
6 changes: 3 additions & 3 deletions Controller/InstallController.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,11 @@ function index()
return;
}

// mysqli 存在チェック
if(!extension_loaded('mysqli'))
// pdo_mysql 存在チェック
if(!extension_loaded('pdo_mysql'))
{
// エラー出力
$this->err_msg = 'PHP モジュール mysqli がロードされていません';
$this->err_msg = 'PHP モジュール pdo_mysql がロードされていません';
$this->error();
$this->render('error');
return;
Expand Down
22 changes: 2 additions & 20 deletions View/Contents/admin_edit.ctp
Original file line number Diff line number Diff line change
@@ -1,26 +1,6 @@
<?php echo $this->element('admin_menu');?>
<?php $this->start('css-embedded'); ?>
<?php echo $this->Html->css('summernote.css');?>
<style type='text/css'>
.form-control-upload
{
display : inline-block !important;
margin-right : 10px !important;
widht : 85%;
}

.form-control-filename
{
border : none !important;
box-shadow : none !important;
}

label span,
.status-exp
{
font-weight : normal;
}
</style>
<?php $this->end(); ?>
<?php $this->start('script-embedded'); ?>
<?php echo $this->Html->script('summernote.min.js');?>
Expand Down Expand Up @@ -201,6 +181,7 @@
'label' => '合格とする得点率 (1-100%)',
));

// ランダム出題用
echo $this->Form->input('question_count', array(
'label' => '出題数 (1-100問)',
'after' => '<div class="col col-sm-3"></div><span class="status-exp"> 指定した場合、登録した問題の中からランダムに出題されます。</span>',
Expand All @@ -220,6 +201,7 @@
)
);

// コンテンツ移動用
if(($this->action == 'admin_edit'))
{
echo $this->Form->input('course_id', array(
Expand Down
8 changes: 0 additions & 8 deletions View/Contents/admin_index.ctp
Original file line number Diff line number Diff line change
@@ -1,12 +1,4 @@
<?php echo $this->element('admin_menu');?>
<?php $this->start('css-embedded'); ?>
<style>
.ib-col-action
{
width: 200px;
}
</style>
<?php $this->end(); ?>
<?php $this->start('script-embedded'); ?>
<script>
$(function(){
Expand Down
2 changes: 2 additions & 0 deletions View/Contents/view.ctp
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,14 @@
echo $this->Html->css('bootstrap.min');
echo $this->Html->css('common.css');
echo $this->Html->css('contents_view.css?20190401');
echo $this->Html->css('custom.css');

echo $this->Html->script('jquery-1.9.1.min.js');
echo $this->Html->script('jquery-ui-1.9.2.min.js');
echo $this->Html->script('bootstrap.min.js');
echo $this->Html->script('common.js');
echo $this->Html->script('contents_view.js?20190401');
echo $this->Html->css('custom.js');

echo $this->fetch('meta');
echo $this->fetch('css');
Expand Down
33 changes: 1 addition & 32 deletions View/ContentsQuestions/admin_edit.ctp
Original file line number Diff line number Diff line change
@@ -1,37 +1,5 @@
<?php echo $this->element('admin_menu');?>
<div class="admin-contents-questions-edit">
<?php echo $this->Html->css('summernote.css');?>
<?php $this->start('css-embedded'); ?>
<style type='text/css'>
#ContentsQuestionOptionList
{
width: 200px;
}

#ContentsQuestionOptionList option
{
border-top: 2px double #ccc;
border-right: 2px double #aaa;
border-bottom: 2px double #aaa;
border-left: 2px double #ccc;
/*
background-color: #fff;
font-family: Verdana, Geneva, sans-serif;
*/
color: #444455;
width: 160px;
margin:6px;
padding: 5px;
}

input[name="data[ContentsQuestion][image]"]
{
display:inline-block;
width:85%;
margin-right:10px;
}
</style>
<?php $this->end(); ?>
<?php $this->start('script-embedded'); ?>
<?php echo $this->Html->script('summernote.min.js');?>
<?php echo $this->Html->script('lang/summernote-ja-JP.js');?>
Expand Down Expand Up @@ -167,6 +135,7 @@
}
</script>
<?php $this->end(); ?>
<div class="admin-contents-questions-edit">
<div class="ib-breadcrumb">
<?php
$this->Html->addCrumb('コース一覧', array('controller' => 'courses', 'action' => 'index'));
Expand Down
16 changes: 0 additions & 16 deletions View/ContentsQuestions/admin_index.ctp
Original file line number Diff line number Diff line change
@@ -1,20 +1,4 @@
<?php echo $this->element('admin_menu');?>
<?php $this->start('css-embedded'); ?>
<style type='text/css'>
.td-reader
{
width:200px;
text-overflow:ellipsis;
overflow:hidden;
white-space:nowrap;
}

table
{
table-layout:fixed;
}
</style>
<?php $this->end(); ?>
<?php $this->start('css-embedded'); ?>
<script>
$(function(){
Expand Down
26 changes: 0 additions & 26 deletions View/Infos/admin_index.ctp
Original file line number Diff line number Diff line change
@@ -1,30 +1,4 @@
<?php echo $this->element('admin_menu');?>
<?php $this->start('css-embedded'); ?>
<style>
p
{
margin: 0;
}

.reader
{
overflow: hidden;
width: 100%;
}

.reader p
{
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
}

.col-group
{
width:300px;
}
</style>
<?php $this->end(); ?>
<div class="admin-infos-index">
<div class="ib-page-title"><?php echo __('お知らせ一覧'); ?></div>
<div class="buttons_container">
Expand Down
7 changes: 6 additions & 1 deletion View/Layouts/default.ctp
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,9 @@
echo $this->Html->css('bootstrap.min');
echo $this->Html->css('common.css?20190401');

// 管理画面用CSS
if($is_admin_page)
echo $this->Html->css('admin.css');
echo $this->Html->css('admin.css?20190401');

// カスタマイズ用CSS
echo $this->Html->css('custom.css?20190401');
Expand All @@ -44,6 +45,10 @@
echo $this->Html->script('moment.js');
echo $this->Html->script('common.js?20190401');

// 管理画面用スクリプト
if($is_admin_page)
echo $this->Html->script('admin.js?20190401');

// デモモード用スクリプト
if(Configure::read('demo_mode'))
echo $this->Html->script('demo.js');
Expand Down
63 changes: 0 additions & 63 deletions View/Records/admin_index.ctp
Original file line number Diff line number Diff line change
@@ -1,67 +1,4 @@
<?php echo $this->element('admin_menu');?>
<?php $this->start('css-embedded'); ?>
<style type='text/css'>
#RecordFromDateYear,
#RecordToDateYear
{
width : 100px;
}

#RecordFromDateMonth,
#RecordToDateMonth,
#RecordFromDateDay,
#RecordToDateDay
{
width : 80px;
}

#RecordCourseId
{
max-width : 200px;
}

#RecordGroupId
{
max-width : 150px;
}

#RecordUserId
{
max-width : 120px;
}

input[type='text'], textarea,
.form-control,
label
{
font-size : 12px;
font-weight : normal;
height : 30px;
padding : 4px;
}

.ib-search-buttons
{
float : right;
}

.ib-search-buttons .btn
{
margin-right: 10px;
}

table tr td
{
padding : 5px;
}

.ib-row
{
width: 100%;
height: 40px;
}
</style>
<?php $this->end(); ?>
<?php $this->start('script-embedded'); ?>
<script>
function openRecord(course_id, user_id)
Expand Down
10 changes: 0 additions & 10 deletions View/Users/admin_edit.ctp
Original file line number Diff line number Diff line change
@@ -1,16 +1,6 @@
<?php echo $this->element('admin_menu');?>
<?php echo $this->Html->css( 'select2.min.css');?>
<?php echo $this->Html->script( 'select2.min.js');?>
<?php $this->start('css-embedded'); ?>
<style>
.btn-clear
{
position: relative;
right: 50px;
top: -50px;
}
</style>
<?php $this->end(); ?>
<?php $this->Html->scriptStart(array('inline' => false)); ?>
$(function (e) {
$('#GroupGroup').select2({placeholder: "所属するグループを選択して下さい。(複数選択可)", closeOnSelect: <?php echo (Configure::read('close_on_select') ? 'true' : 'false'); ?>,});
Expand Down
1 change: 0 additions & 1 deletion View/Users/admin_import.ctp
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<?php echo $this->element('admin_menu');?>

<div class="admin-users-import">
<?php echo $this->Html->link(__('<< 戻る'), array('action' => 'index'))?>
<div class="panel panel-default">
Expand Down
31 changes: 0 additions & 31 deletions View/Users/admin_index.ctp
Original file line number Diff line number Diff line change
@@ -1,35 +1,4 @@
<?php echo $this->element('admin_menu');?>
<?php $this->start('css-embedded'); ?>
<style>
p
{
margin: 0;
}

.reader
{
overflow: hidden;
width: 100%;
}

.reader p
{
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
}

.col-width
{
width : 100px;
}

#UserGroupId
{
max-width : 300px;
}
</style>
<?php $this->end(); ?>
<div class="admin-users-index">
<div class="ib-page-title"><?php echo __('ユーザ一覧'); ?></div>
<div class="buttons_container">
Expand Down
Loading

0 comments on commit f1f5986

Please sign in to comment.