Skip to content

Commit

Permalink
Improve styles needed after rebase
Browse files Browse the repository at this point in the history
Pending review.

Fixup to commit: Ability to create single/multiple heading budgets
step by step.
  • Loading branch information
taitus authored and javierm committed Feb 15, 2021
1 parent 6ce20c1 commit b273fb5
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 9 deletions.
20 changes: 20 additions & 0 deletions app/assets/stylesheets/admin.scss
Original file line number Diff line number Diff line change
Expand Up @@ -1511,6 +1511,26 @@ table {
}
}

.admin .groups {
section {
header {
display: flex;

.table-actions {
margin-top: rem-calc(26);

> :first-child {
margin-left: rem-calc(3);;
}

> :not(:first-child) {
margin-left: 0;
}
}
}
}
}

// 11. Newsletters
// -----------------

Expand Down
20 changes: 11 additions & 9 deletions app/views/admin/budgets/_groups_and_headings.html.erb
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
<% @budget.groups.each do |group| %>
<div id="<%= "group_#{group.id}" %>">
<div id="<%= "group_#{group.id}" %>" class="groups">
<%= link_to t("admin.budgets.edit.groups_and_headings.add_heading"),
new_admin_budget_group_heading_path(@budget, group),
class: "button hollow float-right margin-top add" %>

<h3 class="inline-block"><%= group.name %></h3>
<%# TODO: Add styles to render correctly actions %>
<%= render Admin::TableActionsComponent.new(group,
edit_text: t("admin.budgets.edit.groups_and_headings.edit_group", name: group.name),
destroy_text: t("admin.budgets.edit.groups_and_headings.delete_group", name: group.name)
) %>
<section>
<header>
<h3 class="inline-block"><%= group.name %></h3>
<%= render Admin::TableActionsComponent.new(group,
edit_text: t("admin.budgets.edit.groups_and_headings.edit_group", name: group.name),
destroy_text: t("admin.budgets.edit.groups_and_headings.delete_group", name: group.name)
) %>
</header>
</section>

<p class="help-text">
<%= t("admin.budgets.edit.groups_and_headings.max_number_headings") %>
Expand Down Expand Up @@ -41,8 +44,7 @@
<td class="text-center">
<%= heading.allow_custom_content ? t("admin.shared.true_value") : t("admin.shared.false_value") %>
</td>
<td class="text-right">
<%# TODO: Add styles to render correctly actions %>
<td>
<%= render Admin::TableActionsComponent.new(heading,
edit_text: t("admin.budgets.edit.groups_and_headings.edit_heading", name: heading.name),
destroy_text: t("admin.budgets.edit.groups_and_headings.delete_heading", name: heading.name)
Expand Down

0 comments on commit b273fb5

Please sign in to comment.