Sponsor dashboard added, with sponsor component for splash page

This commit is contained in:
Gopesh Tulsyan 2014-05-26 13:51:03 +05:30
parent 643b8b173a
commit ea119a8158
36 changed files with 549 additions and 12 deletions

View file

@ -0,0 +1,11 @@
= semantic_form_for [:admin, @organization] do |f|
= f.inputs "Basic Information" do
= f.input :title, as: :string
= f.input :email_id, as: :string
= f.input :website_url, as: :string
= f.input :description
- if !@organization.photo.blank?
= image_tag @organization.photo(:thumb)
= f.input :photo
= f.actions do
= f.action :submit, :button_html => {:class => "btn primary"}

View file

@ -0,0 +1,36 @@
.row
.col-md-12
.page-header
%h1
Organizations
- if @organizations
= "(#{@organizations.length})"
= link_to "New Organization", new_admin_organization_path, :class => "btn btn-success pull-right"
.row
.col-md-12
.well
%table.table.table-striped.table-bordered.table-hover#organization
%thead
%th
%b Title
%th
%b Email
%th
%th
%th
- @organizations.each do |organization|
%tr
%td= organization.title
%td= organization.email_id
%td= link_to "Edit", edit_admin_organization_path(organization)
%td= link_to "View", admin_organization_path(organization)
%td=link_to 'Delete',admin_organization_path(organization), :method=> :delete , :data=> {:confirm => 'Are you sure ?'},:class => "btn btn-primary btn-danger"
:javascript
$(document).ready(function() {
$('#organization').dataTable( {
"bPaginate": false,
"bLengthChange": false
} );
} );

View file

@ -0,0 +1,26 @@
%table.table
%tr
%td
%b Title
%td
= @organization.title
%tr
%td
%b Email
%td
= @organization.email_id
%tr
%td
%b Logo
%td
= image_tag(@organization.photo(:thumb), class: 'img-responsive') if @organization.photo?
%tr
%td
%b Description
%td
= @organization.description
%tr
%td
%b Website Url
%td
= @organization.website_url