Skip to content

Instantly share code, notes, and snippets.

@TXDynamics
TXDynamics / ruby-nurumie-titles
Created July 3, 2013 20:27
Nurumie Website Title Template
<% provide(:page_title, "Roommate Friendly Rental Listings") %>
<% provide(:page_heading, "Roommate Friendly Rental Listings" ) %>
<% provide(:page_heading_sub, 'Take a look at the listings available and manage the ones you have posted.') %>
@TXDynamics
TXDynamics / nurumie-section-headers.rb
Created July 3, 2013 21:20
Nurumie Section Headers
<div class='row-fluid' style='background-color: rgb(124,187,0); color:white;'>
<h2 style='margin-left: 10px;margin-bottom: 4px;'>Listing Description <span class="label label-primary">Public</span></h2>
<p style="margin-left: 10px;">
Describe your listing so others would want to live there! The more details the better.
This part of your listing is public and can be seen by everyone. It is also indexed by search engines.
</p>
</div>
@TXDynamics
TXDynamics / admin-console-titles.rb
Created July 4, 2013 20:27
Nurumie Admin-Console Titles
<% provide(:page_title, "Title") %>
<% provide(:page_heading, "Heading" ) %>
<% provide(:page_heading_sub, 'Sub description') %>
@TXDynamics
TXDynamics / nurumie-admin-console-table-default.rb
Created July 6, 2013 21:44
Nurumie Admin Console Table Default
<div class="row-fluid">
<article class="span10">
<!-- new widget -->
<div class="jarviswidget" id="widget-id-4">
<header>
<h2>Title</h2>
</header>
<!-- wrap div -->
<div>
@TXDynamics
TXDynamics / default-simple_form-layout.rb
Created July 7, 2013 21:11
Base Simple_form form rails layout
<%= simple_form_for(@listing) do |f| %>
<%= f.error_notification %>
<div class="form-inputs">
<%= f.input :listing_title, hint: '<strong>Pick a descriptive title to really sell your place!</strong>', input_html: { class: 'span7' }, label: 'Listing Title' %>
<%= f.input :listing_description, as: :text, input_html: { class: 'span7' } %>
<%= f.input :listing_roomate_count, collection: 1..5, label: 'How Many Roomates?', prompt: 'Choose' %>
<!-- This is a default value of USA and can be switched later when expanding more countries -->
<%= f.hidden_field :country_id, value: '236' %>
<%= f.input :state_id, collection: @states, label_method: :name, value_method: :id, prompt: 'State' %>
@TXDynamics
TXDynamics / admin-base-page.rb
Created July 7, 2013 21:18
Admin Base Page
<% provide(:page_title, "Editing #{@question_category.name}") %>
<% provide(:page_heading, "Editing #{@question_category.name}" ) %>
<% provide(:page_heading_sub, 'Manage the attributes of this category') %>
<article class="span12 sortable-grid ui-sortable">
<!-- new widget -->
<div class="jarviswidget jarviswidget-sortable" id="widget-id-1" role="widget">
<header role="heading">
<h2>Animated bars</h2>
@TXDynamics
TXDynamics / admin-console-form-default.rb
Created July 7, 2013 21:46
Admin Console Form Default
<%= simple_form_for(@question_category) do |f| %>
<%= f.error_notification %>
<div class="form-inputs">
<%= f.input :name, input_html: { class: 'span7' }, label: 'Category Name' %>
<div class="form-actions">
<%= f.button :submit , :class => 'btn medium btn-primary', value: 'Post It!' %>
</div>
</div>
<% end %>
@TXDynamics
TXDynamics / abase-default-table-style.rb
Created July 9, 2013 17:22
Abase Default Table Style
<div class="row-fluid">
<div class="span12">
<table id="table_bug_report" class="table table-striped table-bordered table-hover">
<thead>
<tr>
<th>Account Name</th>
<th>Contact Name</th>
<th>Contact Email</th>
<th></th>
</tr>
@TXDynamics
TXDynamics / rails-delete-as-image.rb
Created July 12, 2013 13:33
Set Destroy / Delete link in Rails to an Image or other html
<%= link_to '<i class=" cus-cancel"></i> Delete'.html_safe, questionnaire_path(@questionnaire), method: :delete, data: {confirm: 'Are you sure?'} %>
@TXDynamics
TXDynamics / git-clone-remote-branch.txt
Created July 17, 2013 14:05
Git Clone specific remote branch
git checkout -b experimental origin/experimental