Skip to content

Commit

Permalink
User Profile Notifications settings: Improve styling
Browse files Browse the repository at this point in the history
  • Loading branch information
agapetry committed Jan 29, 2025
1 parent ba2ea10 commit aa2559d
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
12 changes: 12 additions & 0 deletions modules/improved-notifications/assets/css/user_profile.css
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,15 @@
.psppno_workflows td {
border-bottom: 1px solid #ccc;
}

.psppno_workflows th {
text-align: center;
}

.psppno_workflows td.psppno_workflow_title {
white-space: nowrap;
}

.psppno_workflows div.psppno_workflow_channel_field {
padding-left: 20px;
}
11 changes: 10 additions & 1 deletion views/user_profile_notification_channels.html.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,14 @@
<th class="psppno_workflow_column_header psppno_channels"><?php echo esc_html__('Channels', 'publishpress'); ?></th>
<th class="psppno_workflow_column_header psppno_options"></th>
</tr>
<?php foreach ($context['workflows'] as $workflow) : ?>
<?php
foreach ($context['channels'] as $channel) {
if (isset($channel->options) && ! empty($channel->options)) {
$any_options = true;
}
}

foreach ($context['workflows'] as $workflow) : ?>
<tr class="psppno_workflow_<?php echo esc_attr($workflow->ID); ?>">
<td class="psppno_workflow_title"><?php echo esc_html($workflow->post_title); ?></td>
<td class="psppno_workflow_channel">
Expand All @@ -39,6 +46,7 @@
</div>
<?php endforeach; ?>
</td>
<?php if (!empty($any_options)): ?>
<td class="psppno_workflow_channel_options">
<?php foreach ($context['channels'] as $channel) : ?>
<?php if (isset($channel->options) && ! empty($channel->options)) : ?>
Expand All @@ -59,6 +67,7 @@ class="psppno_workflow_channel_option_<?php echo esc_attr($channelOption->name);
<?php endif; ?>
<?php endforeach; ?>
</td>
<?php endif;?>
</tr>
<?php endforeach; ?>
</table>
Expand Down

0 comments on commit aa2559d

Please sign in to comment.