Skip to content

Commit

Permalink
Evarisk#1518 [IHM] add; control info responsive
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolas-eoxia committed Aug 25, 2023
1 parent 4df1950 commit 433a0ff
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 10 deletions.
2 changes: 1 addition & 1 deletion class/actions_digiquali.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ public function saturneBannerTab(array $parameters, CommonObject $object): int
// Do something only for the current context.
if (preg_match('/controlcard/', $parameters['context'])) {
if ($conf->browser->layout == 'phone') {
$morehtmlref = '<i class="toggleControlInfo far fa-caret-square-down"></i>' . ' ' . $langs->trans('DisplayMoreInfo');
$morehtmlref = '<br><div>' . img_picto('', 'fontawesome_fa-caret-square-down_far_#966EA2F2_fa-2em', 'class="toggleControlInfo pictofixedwidth valignmiddle" style="width: 35px;"') . $langs->trans('DisplayMoreInfo') . '</div>';
} else {
$morehtmlref = '';
}
Expand Down
2 changes: 1 addition & 1 deletion css/digiquali.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions css/scss/page/_control.scss
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,10 @@
transition: all 0.2s ease-out;

@media ( max-width: $media__small ) {
width: 80px;
height: 80px;
line-height: 80px;
font-size: 30px;
width: 60px;
height: 60px;
line-height: 60px;
font-size: 25px;
}

&.square {
Expand Down
15 changes: 15 additions & 0 deletions css/scss/variable/_colors.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
$color__text-main: #333333;

$color__primary: #0d8aff;
$color__primary-text: #fff;

$color__secondary: #263C5C;
$color__secondary-text: #fff;

$color__red: #e05353;
$color__yellow: #e9ad4f;
$color__orange: #ff6900;
$color__dark: #2b2b2b;
$color__grey: #ececec;
$color__blue: #0d8aff;
$color__green: #47e58e;
1 change: 1 addition & 0 deletions css/scss/variable/_variable.scss
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
@import "colors";
@import "structure";
8 changes: 4 additions & 4 deletions view/control/control_card.php
Original file line number Diff line number Diff line change
Expand Up @@ -735,19 +735,19 @@
<span class="add-medias" <?php echo ($object->status != Control::STATUS_LOCKED) ? '' : 'style="display:none"' ?>>
<input hidden multiple class="fast-upload" id="fast-upload-photo-default" type="file" name="userfile[]" capture="environment" accept="image/*">
<label for="fast-upload-photo-default">
<div class="wpeo-button button-square-50">
<div class="wpeo-button <?php echo ($onPhone ? 'button-square-40' : 'button-square-50'); ?>">
<i class="fas fa-camera"></i><i class="fas fa-plus-circle button-add"></i>
</div>
</label>
<input type="hidden" class="favorite-photo" id="photo" name="photo" value="<?php echo $object->photo ?>"/>
<div class="wpeo-button button-square-50 open-media-gallery add-media modal-open" value="0">
<div class="wpeo-button <?php echo ($onPhone ? 'button-square-40' : 'button-square-50'); ?> 'open-media-gallery add-media modal-open" value="0">
<input type="hidden" class="modal-options" data-modal-to-open="media_gallery" data-from-id="<?php echo $object->id?>" data-from-type="control" data-from-subtype="photo" data-from-subdir="photos"/>
<i class="fas fa-folder-open"></i><i class="fas fa-plus-circle button-add"></i>
</div>
</span>
<?php
$relativepath = 'digiquali/medias/thumbs';
print saturne_show_medias_linked('digiquali', $pathPhotos, 'small', 0, 0, 0, 0, 50, 50, 0, 0, 0, 'control/'. $object->ref . '/photos/', $object, 'photo', $object->status != Control::STATUS_LOCKED, $permissiontodelete && $object->status != Control::STATUS_LOCKED);
print saturne_show_medias_linked('digiquali', $pathPhotos, 'small', 0, 0, 0, 0, $onPhone ? 40 : 50, $onPhone ? 40 : 50, 0, 0, 0, 'control/'. $object->ref . '/photos/', $object, 'photo', $object->status != Control::STATUS_LOCKED, $permissiontodelete && $object->status != Control::STATUS_LOCKED);
print '</td></tr>';

// Other attributes. Fields from hook formObjectOptions and Extrafields.
Expand Down Expand Up @@ -872,7 +872,7 @@
}

// Send email
$displayButton = $onPhone ? '<i class="fas fa-paper-plane fa-2x"></i>' : '<i class="fas fa-paper-plane"></i>' . ' ' . $langs->trans('SendMail') . ' ';
$displayButton = $onPhone ? '<i class="fas fa-envelope fa-2x"></i>' : '<i class="fas fa-envelope"></i>' . ' ' . $langs->trans('SendMail') . ' ';
if ($object->status == $object::STATUS_LOCKED) {
$fileparams = dol_most_recent_file($upload_dir . '/' . $object->element . 'document' . '/' . $object->ref);
$file = $fileparams['fullname'];
Expand Down

0 comments on commit 433a0ff

Please sign in to comment.