-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove change to Bootstrap's
row
. #813
* It was not applying the negative margins so any `col-` divs inside the row would not be horizontally aligned with non-row content. * It was being abused to apply vertical margins to various elements. Removed these, or replaced with helper class (e.g. `my-3`) to produce the same effect.
- Loading branch information
Showing
44 changed files
with
496 additions
and
612 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,17 +1,15 @@ | ||
<div class="row wrapper"> | ||
<div class="col-md-12"> | ||
<div class="page-header"> | ||
<%= page_title('Ban') %> | ||
</div> | ||
<div class="col-md-8"> | ||
<%= simple_form_for [@user, @ban], url: user_ban_path(@user) do |f| %> | ||
<%= f.input :reason %> | ||
<%= f.input :shadow, label: 'Shadowban?' %> | ||
<div class="form-group"> | ||
<%= f.submit 'Submit', class: 'btn btn-primary' %> | ||
<%= link_to t('.cancel', default: t("helpers.links.cancel")), :back, class: 'btn btn-default' %> | ||
</div> | ||
<% end %> | ||
</div> | ||
<div class="page-header"> | ||
<%= page_title('Ban') %> | ||
</div> | ||
<div class="row"> | ||
<div class="col-md-8"> | ||
<%= simple_form_for [@user, @ban], url: user_ban_path(@user) do |f| %> | ||
<%= f.input :reason %> | ||
<%= f.input :shadow, label: 'Shadowban?' %> | ||
<div class="form-group"> | ||
<%= f.submit 'Submit', class: 'btn btn-primary' %> | ||
<%= link_to t('.cancel', default: t("helpers.links.cancel")), :back, class: 'btn btn-default' %> | ||
</div> | ||
<% end %> | ||
</div> | ||
</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,50 +1,49 @@ | ||
<%- model_class = Collection -%> | ||
<div class="row wrapper"> | ||
<div class="col-md-12"> | ||
<div class="page-header row"> | ||
<%= page_title(t('.title', :default => [:'helpers.titles.curate', 'Curate %{type} in %{model} %{title}'], type: @item_class.table_name, model: model_class.model_name.human.titleize.downcase, title: @collection.title), class: 'col-md-8') %> | ||
<div class="col-md-4" style="margin-top: 25px;"> | ||
<%= label_tag :since, t('.new_items_since', default: ['%{count} new items since'], count: @items.length) %> | ||
<input id="since" type="date" value="<%= @since.strftime('%Y-%m-%d') %>" pattern="\d{4}-\d{2}-\d{2}" onchange="params = new URLSearchParams(window.location.search); params.set(since, this.value); window.location.search=params.toString();" /> | ||
<% if @item_class.name == "Event" %> | ||
<%= label_tag :since, t('.show_past', default: ['show past events']) %> | ||
<%= check_box_tag :past, true, @show_past.present?, onchange: "params = new URLSearchParams(window.location.search); this.checked ? params.set('past', true) : params.delete('past'); window.location.search = params.toString();" %> | ||
<% end %> | ||
</div> | ||
<div class="page-header"> | ||
<div class="row"> | ||
<%= page_title(t('.title', :default => [:'helpers.titles.curate', 'Curate %{type} in %{model} %{title}'], type: @item_class.table_name, model: model_class.model_name.human.titleize.downcase, title: @collection.title), class: 'col-md-8') %> | ||
<div class="col-md-4" style="margin-top: 25px;"> | ||
<%= label_tag :since, t('.new_items_since', default: ['%{count} new items since'], count: @items.length) %> | ||
<input id="since" type="date" value="<%= @since.strftime('%Y-%m-%d') %>" pattern="\d{4}-\d{2}-\d{2}" onchange="params = new URLSearchParams(window.location.search); params.set(since, this.value); window.location.search=params.toString();" /> | ||
<% if @item_class.name == "Event" %> | ||
<%= label_tag :since, t('.show_past', default: ['show past events']) %> | ||
<%= check_box_tag :past, true, @show_past.present?, onchange: "params = new URLSearchParams(window.location.search); this.checked ? params.set('past', true) : params.delete('past'); window.location.search = params.toString();" %> | ||
<% end %> | ||
</div> | ||
<%= form_with url: request.url, local: true, method: :patch do |f| %> | ||
<table class="table table-striped table-hover collection_curation_table"> | ||
<thead> | ||
<tr> | ||
<th></th> | ||
<%- item_fields(@item_class).each do |field| -%> | ||
<th><%= t field, default: field.to_s.titleize %></th> | ||
<%- end %> | ||
<th></th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<% @items.each do |item| %> | ||
<%- id = "item_#{item.id}" %> | ||
<tr> | ||
<td> | ||
<%= label_tag id do %> | ||
<%= hidden_field_tag "reviewed_item_ids[]", item.id %> | ||
<input id="item_<%= item.id %>" type="checkbox" name="item_ids[]" value="<%= item.id %>" <%= @collection.send("#{@item_class.table_name.singularize}_ids").include?(item.id) ? 'checked' : '' %> /> | ||
<% end %> | ||
</td> | ||
<%- item_fields(@item_class).each do |field| -%> | ||
<td><label for="<%= id %>"><%= [item.send(field)].flatten.join(', ') %></label></td> | ||
<% end %> | ||
<td><%= link_to t('.link', default: [:'helpers.titles.link', 'Link']), item %></td> | ||
</tr> | ||
<% end %> | ||
</tbody> | ||
</table> | ||
</div> | ||
</div> | ||
|
||
<div class="form-group actions"> | ||
<%= f.submit class: 'btn btn-primary' %> | ||
</div> | ||
<%= form_with url: request.url, local: true, method: :patch do |f| %> | ||
<table class="table table-striped table-hover collection_curation_table"> | ||
<thead> | ||
<tr> | ||
<th></th> | ||
<%- item_fields(@item_class).each do |field| -%> | ||
<th><%= t field, default: field.to_s.titleize %></th> | ||
<%- end %> | ||
<th></th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<% @items.each do |item| %> | ||
<%- id = "item_#{item.id}" %> | ||
<tr> | ||
<td> | ||
<%= label_tag id do %> | ||
<%= hidden_field_tag "reviewed_item_ids[]", item.id %> | ||
<input id="item_<%= item.id %>" type="checkbox" name="item_ids[]" value="<%= item.id %>" <%= @collection.send("#{@item_class.table_name.singularize}_ids").include?(item.id) ? 'checked' : '' %> /> | ||
<% end %> | ||
</td> | ||
<%- item_fields(@item_class).each do |field| -%> | ||
<td><label for="<%= id %>"><%= [item.send(field)].flatten.join(', ') %></label></td> | ||
<% end %> | ||
<td><%= link_to t('.link', default: [:'helpers.titles.link', 'Link']), item %></td> | ||
</tr> | ||
<% end %> | ||
</tbody> | ||
</table> | ||
|
||
<div class="form-group actions"> | ||
<%= f.submit class: 'btn btn-primary' %> | ||
</div> | ||
</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,16 +1,12 @@ | ||
<%- model_class = Collection -%> | ||
<div class="row wrapper"> | ||
<div class="col-md-12"> | ||
<div class="page-header"> | ||
<%= page_title(t('.title', :default => [:'helpers.titles.edit', 'Edit %{model}'], :model => model_class.model_name.human.titleize.downcase)) %> | ||
</div> | ||
<div class="row"> | ||
<div class="col-md-4 col-md-push-8"> | ||
<%= render :partial => 'collections/partials/general_collection_info' %> | ||
</div> | ||
<div class="col-md-8 col-md-pull-4"> | ||
<%= render :partial => 'form' %> | ||
</div> | ||
</div> | ||
<div class="page-header"> | ||
<%= page_title(t('.title', :default => [:'helpers.titles.edit', 'Edit %{model}'], :model => model_class.model_name.human.titleize.downcase)) %> | ||
</div> | ||
<div class="row"> | ||
<div class="col-md-4 col-md-push-8"> | ||
<%= render :partial => 'collections/partials/general_collection_info' %> | ||
</div> | ||
<div class="col-md-8 col-md-pull-4"> | ||
<%= render :partial => 'form' %> | ||
</div> | ||
</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,17 +1,12 @@ | ||
<%- model_class = Collection -%> | ||
|
||
<div class="row wrapper"> | ||
<div class="col-md-12"> | ||
<div class="page-header"> | ||
<%= page_title(t('.title', :default => [:'helpers.titles.new', 'New %{model}'], :model => model_class.model_name.human.titleize.downcase)) %> | ||
</div> | ||
<div class="row"> | ||
<div class="col-md-4 col-md-push-8"> | ||
<%= render :partial => 'collections/partials/general_collection_info' %> | ||
</div> | ||
<div class="col-md-8 col-md-pull-4"> | ||
<%= render :partial => 'form' %> | ||
</div> | ||
</div> | ||
<div class="page-header"> | ||
<%= page_title(t('.title', :default => [:'helpers.titles.new', 'New %{model}'], :model => model_class.model_name.human.titleize.downcase)) %> | ||
</div> | ||
<div class="row"> | ||
<div class="col-md-4 col-md-push-8"> | ||
<%= render :partial => 'collections/partials/general_collection_info' %> | ||
</div> | ||
<div class="col-md-8 col-md-pull-4"> | ||
<%= render :partial => 'form' %> | ||
</div> | ||
</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
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
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
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
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,16 +1,12 @@ | ||
<%- model_class = ContentProvider -%> | ||
<div class="row wrapper"> | ||
<div class="col-md-12"> | ||
<div class="page-header"> | ||
<%= page_title(t('.title', :default => [:'helpers.titles.edit', 'Edit %{model}'], :model => model_class.model_name.human.titleize.downcase)) %> | ||
</div> | ||
<div class="row"> | ||
<div class="col-md-4 col-md-push-8"> | ||
<%= render :partial => 'content_providers/partials/general_content_provider_info' %> | ||
</div> | ||
<div class="col-md-8 col-md-pull-4"> | ||
<%= render :partial => 'form' %> | ||
</div> | ||
</div> | ||
<div class="page-header"> | ||
<%= page_title(t('.title', :default => [:'helpers.titles.edit', 'Edit %{model}'], :model => model_class.model_name.human.titleize.downcase)) %> | ||
</div> | ||
<div class="row"> | ||
<div class="col-md-4 col-md-push-8"> | ||
<%= render :partial => 'content_providers/partials/general_content_provider_info' %> | ||
</div> | ||
<div class="col-md-8 col-md-pull-4"> | ||
<%= render :partial => 'form' %> | ||
</div> | ||
</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,16 +1,12 @@ | ||
<%- model_class = ContentProvider -%> | ||
<div class="row wrapper"> | ||
<div class="col-md-12"> | ||
<div class="page-header"> | ||
<%= page_title(t('.title', :default => [:'helpers.titles.new', 'New %{model}'], :model => model_class.model_name.human.titleize.downcase)) %> | ||
</div> | ||
<div class="row"> | ||
<div class="col-md-4 col-md-push-8"> | ||
<%= render :partial => 'content_providers/partials/general_content_provider_info' %> | ||
</div> | ||
<div class="col-md-8 col-md-pull-4"> | ||
<%= render :partial => 'form' %> | ||
</div> | ||
</div> | ||
<div class="page-header"> | ||
<%= page_title(t('.title', :default => [:'helpers.titles.new', 'New %{model}'], :model => model_class.model_name.human.titleize.downcase)) %> | ||
</div> | ||
<div class="row"> | ||
<div class="col-md-4 col-md-push-8"> | ||
<%= render :partial => 'content_providers/partials/general_content_provider_info' %> | ||
</div> | ||
<div class="col-md-8 col-md-pull-4"> | ||
<%= render :partial => 'form' %> | ||
</div> | ||
</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
Oops, something went wrong.