-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement styles for new and edit via form partial for portfolios; im…
…plement removal of jumbotron when admin logged in.
- Loading branch information
1 parent
68c3f27
commit 65ebe6f
Showing
4 changed files
with
44 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,45 @@ | ||
|
||
<%= form_with(model: @portfolio_item, local: true) do |form| %> | ||
<div class="row"> | ||
<div class="col-md-6"> | ||
|
||
<div class="field"> | ||
<%= form.label :title %> | ||
<%= form.text_field :title %> | ||
</div> | ||
<div class="form-group"> | ||
<%= form.label :title %> | ||
<%= form.text_field :title, class: 'form-control' %> | ||
</div> | ||
|
||
<div class="field"> | ||
<%= form.label :subtitle %> | ||
<%= form.text_field :subtitle %> | ||
</div> | ||
<div class="form-group"> | ||
<%= form.label :subtitle %> | ||
<%= form.text_field :subtitle, class: 'form-control' %> | ||
</div> | ||
|
||
</div> | ||
|
||
|
||
<div class="col-md-6"> | ||
|
||
<div class="field"> | ||
<%= form.label :body %> | ||
<%= form.text_area :body %> | ||
<div class="form-group"> | ||
<%= form.label :body %> | ||
<%= form.text_area :body, class: 'form-control' %> | ||
</div> | ||
|
||
</div> | ||
</div> | ||
|
||
<ul> | ||
|
||
<h2>Technologies Used:</h2> | ||
<%# if request.fullpath == new_portfolio_path %> | ||
|
||
<div> | ||
<%= form.fields_for :technologies do |tech_form| %> | ||
<li> | ||
<div class="form-group"> | ||
<%= tech_form.label :name %> | ||
<%= tech_form.text_field :name %> | ||
</li> | ||
<%= tech_form.text_field :name, class: 'form-control' %> | ||
</div> | ||
<% end %> | ||
</ul> | ||
</div> | ||
|
||
|
||
<div class="actions"> | ||
<%= form.submit %> | ||
<div class="form-group"> | ||
<%= form.submit 'Create Portfolio Item', class: 'btn btn-primary' %> | ||
</div> | ||
<% end %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
<h1>Edit this Portfolio Item</h1> | ||
<div class="container portfolio-form"> | ||
|
||
<%= render 'form', portfolio_item: @portfolio_item %> | ||
<h1>Edit <%= @portfolio_item.title %> </h1> | ||
|
||
<%= render 'form', portfolio_item: @portfolio_item %> | ||
|
||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,8 @@ | ||
<div class="container portfolio-form"> | ||
|
||
<h1>Create a New Portfolio Item</h1> | ||
|
||
<%= render 'form', portfolio_item: @portfolio_item %> | ||
|
||
</div> | ||
|