diff --git a/assets/css/app.scss b/assets/css/app.scss index 2ae020b..e508a62 100644 --- a/assets/css/app.scss +++ b/assets/css/app.scss @@ -25,3 +25,6 @@ .no-valid-style .form-check-input.is-valid ~ .form-check-label { color: inherit !important; } +.table-nonfluid { + width: auto !important; +} diff --git a/lib/bones73k_web/live/property_live/index.html.leex b/lib/bones73k_web/live/property_live/index.html.leex index c0d32d7..3594806 100644 --- a/lib/bones73k_web/live/property_live/index.html.leex +++ b/lib/bones73k_web/live/property_live/index.html.leex @@ -1,4 +1,7 @@ -

Listing Properties

+
+

Listing Properties

+ <%= live_patch "New Property", to: Routes.property_index_path(@socket, :new), class: "btn btn-primary" %> +
<%= if @live_action in [:new, :edit] do %> <%= live_modal @socket, Bones73kWeb.PropertyLive.FormComponent, @@ -29,18 +32,16 @@ <%= if Roles.can?(@current_user, property, :show) do %> - <%= live_redirect "Show", to: Routes.property_show_path(@socket, :show, property) %> + <%= live_redirect "Show", to: Routes.property_show_path(@socket, :show, property), class: "link-secondary mx-1" %> <% end %> <%= if Roles.can?(@current_user, property, :edit) do %> - <%= live_patch "Edit", to: Routes.property_index_path(@socket, :edit, property) %> + <%= live_patch "Edit", to: Routes.property_index_path(@socket, :edit, property), class: "mx-1" %> <% end %> <%= if Roles.can?(@current_user, property, :delete) do %> - <%= link "Delete", to: "#", phx_click: "delete", phx_value_id: property.id, data: [confirm: "Are you sure?"] %> + <%= link "Delete", to: "#", phx_click: "delete", phx_value_id: property.id, data: [confirm: "Are you sure?"], class: "link-danger mx-1" %> <% end %> <% end %> - -<%= live_patch "New Property", to: Routes.property_index_path(@socket, :new) %> diff --git a/lib/bones73k_web/live/property_live/show.html.leex b/lib/bones73k_web/live/property_live/show.html.leex index cba90a6..e178fcc 100644 --- a/lib/bones73k_web/live/property_live/show.html.leex +++ b/lib/bones73k_web/live/property_live/show.html.leex @@ -1,4 +1,4 @@ -

Show Property

+

Show Property

<%= if @live_action in [:edit] do %> <%= live_modal @socket, Bones73kWeb.PropertyLive.FormComponent, @@ -9,28 +9,26 @@ return_to: Routes.property_show_path(@socket, :show, @property) %> <% end %> - - -<%= if Roles.can?(@current_user, @property, :edit) do %> - <%= live_patch "Edit", to: Routes.property_show_path(@socket, :edit, @property), class: "button" %> -<% end %> <%= if Roles.can?(@current_user, @property, :index) do %> - <%= live_redirect "Back", to: Routes.property_index_path(@socket, :index) %> + <%= live_redirect "Back", to: Routes.property_index_path(@socket, :index), class: "btn btn-secondary" %> +<% end %> +<%= if Roles.can?(@current_user, @property, :edit) do %> + <%= live_patch "Edit", to: Routes.property_show_path(@socket, :edit, @property), class: "btn btn-primary" %> <% end %>