Skip to content

Commit

Permalink
Merge pull request #45 from kitalab/master
Browse files Browse the repository at this point in the history
CSS見直し
  • Loading branch information
kitatsuw committed Aug 22, 2016
2 parents 84a9f00 + d5bfbef commit ae4fffc
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 20 deletions.
17 changes: 8 additions & 9 deletions Controller/TaskContentsController.php
Expand Up @@ -152,10 +152,9 @@ public function add() {
));

return $this->redirect($url);
} else {
// ToDo担当者ユーザー保持
$this->request->data = $this->TaskCharge->getSelectUsers($this->request->data);
}
// ToDo担当者ユーザー保持
$this->request->data = $this->TaskCharge->getSelectUsers($this->request->data);

$this->NetCommons->handleValidationError($this->TaskContent->validationErrors);

Expand Down Expand Up @@ -376,8 +375,7 @@ private function __list($conditions) {
$currentUserId = '';
// 担当者絞り込み
if (isset($conditions['user_id'])) {
if (! empty($conditions['user_id'])
&& $this->TaskCharge->searchChargeUser($conditions['user_id'])) {
if ($this->TaskCharge->searchChargeUser($conditions['user_id'])) {
$userParam = array(
'TaskCharge.user_id' => $conditions['user_id']
);
Expand Down Expand Up @@ -556,15 +554,16 @@ private function __getSelectOptions($selectTarget = '') {
private function __getSortParam($conditions = array(), $sortOptions = array()) {
$sortPram = '';
$currentSort = '';
$order = array();
$defaultOrder = array('TaskContent.is_date_set' => 'desc');
$afterOrder = array('TaskContent.task_end_date' => 'asc');
if (isset($conditions['sort']) && isset($conditions['direction'])) {
$sortPram = $conditions['sort'] . '.' . $conditions['direction'];
}
if (isset($sortOptions[$sortPram]) && $conditions['sort'] !== 'TaskContent.task_end_date') {
if (isset($sortOptions[$sortPram])) {
$order = array($conditions['sort'] => $conditions['direction']);
$order = array_merge($defaultOrder, $order, $afterOrder);
$currentSort = $conditions['sort'] . '.' . $conditions['direction'];
} else {
// 期限の近い順が選択された時のみ期限設定フラグを並べ替えソートに含める
$order = array('TaskContent.is_date_set' => 'desc', 'TaskContent.task_end_date' => 'asc');
}

$sort = array(
Expand Down
8 changes: 4 additions & 4 deletions View/Elements/TaskContents/task_content.ctp
Expand Up @@ -76,14 +76,14 @@ echo $this->NetCommonsHtml->css('/tasks/css/tasks.css');
TaskContent::TASK_BEING_PERFORMED => ''
);
?>
<td class="col-xs-3 col-sm-2 col-md-2 col-lg-2 task-index-content-text-middle
<td class="col-xs-4 col-sm-2 col-md-2 col-lg-2 task-index-content-text-middle task-word-break
<?php echo $color[$content['TaskContent']['date_color']]; ?>">
<?php if (empty($content['TaskContent']['priority'])): ?>
<div>
<div class="task-date-font">
<?php echo $this->TaskContent->displayDate($content['TaskContent']['task_end_date'], $content['TaskContent']['is_date_set']); ?>
</div>
<?php else: ?>
<div class="task-index-priority-1">
<div class="task-index-priority-1 task-word-break task-date-font">
<?php echo $this->TaskContent->displayDate($content['TaskContent']['task_end_date'], $content['TaskContent']['is_date_set']); ?>
</div>
<?php echo $this->element('TaskContents/priority_icon', array(
Expand All @@ -94,7 +94,7 @@ echo $this->NetCommonsHtml->css('/tasks/css/tasks.css');
<?php endif; ?>
</td>

<td class="col-xs-8 col-sm-5 col-md-5 col-lg-5 task-index-content-text-middle">
<td class="col-xs-7 col-sm-5 col-md-5 col-lg-5 task-index-content-text-middle task-word-break">
<div>
<?php echo $this->Workflow->label($content['TaskContent']['status']); ?>
</div>
Expand Down
4 changes: 2 additions & 2 deletions View/Helper/TaskContentHelper.php
Expand Up @@ -32,10 +32,10 @@ class TaskContentHelper extends AppHelper {
* 表示するTODO実施期間作成
*
* @param string $date 実施期間
* @param string $isDateSet 実施期間使用フラグ
* @param bool $isDateSet 実施期間使用フラグ
* @return string HTML
*/
public function displayDate($date, $isDateSet = false) {
public function displayDate($date, $isDateSet) {
if ($isDateSet) {
$format = '';
$now = $this->NetCommonsTime->getNowDatetime();
Expand Down
2 changes: 1 addition & 1 deletion View/TaskContents/index.ctp
Expand Up @@ -45,7 +45,7 @@ echo $this->NetCommonsHtml->css('/tasks/css/tasks.css');
</button>
<ul class="dropdown-menu" role="menu" aria-labelledby="dropdownMenu1">
<?php echo $this->Category->dropDownToggle(array(
'empty' => false,
'empty' => h(__d('tasks', 'No category assignment')),
'displayMenu' => false,
$this->NetCommonsHtml->url(array('action' => 'index')),
)); ?>
Expand Down
5 changes: 3 additions & 2 deletions View/TaskContents/view.ctp
Expand Up @@ -164,9 +164,10 @@ echo $this->NetCommonsHtml->css('/tasks/css/tasks.css');
<div class="task-view-content-top task-word-break">
<?php echo $taskContent['TaskContent']['content']; ?>
</div>

<?php echo $this->ContentComment->index($taskContent); ?>

<div class="task-word-break">
<?php echo $this->ContentComment->index($taskContent); ?>
</div>
</article>
</div>
</div>
11 changes: 9 additions & 2 deletions webroot/css/tasks.css
Expand Up @@ -9,7 +9,8 @@
}

.task-select-ellipsis {
width: 135px;
min-width: 5px;
max-width: 200px;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
Expand All @@ -28,7 +29,7 @@

.table>tbody>tr>td.task-index-content-text-middle {
vertical-align: middle;
word-break: break-all;
/*word-break: break-all;*/
}

.task-index-priority-1 {
Expand Down Expand Up @@ -112,4 +113,10 @@
.task-progress-width-view {
width: 150px;
}
}

@media (max-width: 400px) {
.task-date-font {
font-size: 10px;
}
}

0 comments on commit ae4fffc

Please sign in to comment.