From 1ebfeca155014b58893e2ca1dd70a4af7bdf45b5 Mon Sep 17 00:00:00 2001 From: Sven Bohm Date: Fri, 7 Jun 2024 10:39:11 -0400 Subject: [PATCH] remove generated doc files --- doc/Abstract.html | 192 - doc/AbstractsController.html | 705 ---- doc/ActionController/Testing/Caching.html | 234 -- doc/Affiliation.html | 246 -- doc/AffiliationsController.html | 567 --- doc/ApplicationController.html | 132 - doc/ApplicationHelper.html | 653 --- doc/ArticleCitation.html | 206 - doc/Author.html | 283 -- doc/AuthorsController.html | 207 - doc/AuthorsHelper.html | 105 - doc/BookCitation.html | 280 -- doc/BulletinCitation.html | 206 - doc/ChapterCitation.html | 278 -- doc/Citation.html | 2011 ---------- doc/CitationFactory.html | 189 - doc/CitationFormat.html | 830 ---- doc/CitationType.html | 123 - doc/CitationsController.html | 1169 ------ doc/CitationsHelper.html | 182 - doc/ClimdbController.html | 221 -- doc/Collection.html | 504 --- doc/CollectionsController.html | 267 -- doc/ConferenceCitation.html | 137 - doc/CoreArea.html | 123 - doc/Customizer.html | 1329 ------- doc/DataContribution.html | 123 - doc/DataQuery.html | 326 -- doc/Dataset.html | 2997 -------------- doc/DatasetFile.html | 123 - doc/DatasetFilesController.html | 213 - doc/DatasetsController.html | 922 ----- doc/Datatable.html | 4362 --------------------- doc/DatatablesController.html | 1116 ------ doc/DatatablesHelper.html | 422 -- doc/DatatablesVariates.html | 123 - doc/EML.html | 180 - doc/ENW.html | 120 - doc/EbookCitation.html | 137 - doc/Editor.html | 283 -- doc/ElementHandler.html | 419 -- doc/EmlDatatableBuilder.html | 629 --- doc/Invite.html | 443 --- doc/InviteMailer.html | 196 - doc/InvitesController.html | 732 ---- doc/MeasurementScale.html | 123 - doc/Meeting.html | 248 -- doc/MeetingAbstractType.html | 123 - doc/MeetingsController.html | 604 --- doc/Membership.html | 123 - doc/Ownership.html | 200 - doc/OwnershipsController.html | 477 --- doc/Page.html | 123 - doc/PageImage.html | 123 - doc/PagesController.html | 537 --- doc/PeopleController.html | 814 ---- doc/PeopleHelper.html | 364 -- doc/Permission.html | 567 --- doc/PermissionRequest.html | 123 - doc/PermissionRequestsController.html | 211 - doc/PermissionsController.html | 547 --- doc/Person.html | 1299 ------ doc/Project.html | 123 - doc/ProjectsController.html | 656 ---- doc/Protocol.html | 655 ---- doc/ProtocolsController.html | 687 ---- doc/ReportCitation.html | 206 - doc/Role.html | 409 -- doc/RoleType.html | 125 - doc/S3_Selector.html | 105 - doc/ScoreCard.html | 834 ---- doc/ScoreCardsController.html | 283 -- doc/Scribble.html | 123 - doc/SessionsController.html | 262 -- doc/Species.html | 123 - doc/Sponsor.html | 213 - doc/SponsorsController.html | 253 -- doc/StudiesController.html | 486 --- doc/Study.html | 445 --- doc/StudyUrl.html | 123 - doc/SubdomainResolver.html | 218 - doc/Template.html | 134 - doc/TemplatesController.html | 468 --- doc/Theme.html | 686 ---- doc/ThemesHelper.html | 224 -- doc/ThesisCitation.html | 206 - doc/Treatment.html | 123 - doc/Unit.html | 306 -- doc/UnitDictionaryJob.html | 323 -- doc/UnitsController.html | 359 -- doc/User.html | 444 --- doc/UsersController.html | 326 -- doc/Variate.html | 459 --- doc/VariatesController.html | 650 --- doc/VenueType.html | 134 - doc/Visualization.html | 192 - doc/VisualizationsController.html | 203 - doc/VisualizationsHelper.html | 105 - doc/Website.html | 134 - doc/_index.html | 708 ---- doc/class_list.html | 58 - doc/css/common.css | 1 - doc/css/full_list.css | 57 - doc/css/style.css | 339 -- doc/file_list.html | 57 - doc/frames.html | 26 - doc/index.html | 708 ---- doc/js/app.js | 219 -- doc/js/full_list.js | 181 - doc/js/jquery.js | 4 - doc/method_list.html | 2871 -------------- doc/model.dot | 164 - doc/model.png | Bin 792502 -> 0 bytes doc/top-level-namespace.html | 119 - 114 files changed, 49168 deletions(-) delete mode 100644 doc/Abstract.html delete mode 100644 doc/AbstractsController.html delete mode 100644 doc/ActionController/Testing/Caching.html delete mode 100644 doc/Affiliation.html delete mode 100644 doc/AffiliationsController.html delete mode 100644 doc/ApplicationController.html delete mode 100644 doc/ApplicationHelper.html delete mode 100644 doc/ArticleCitation.html delete mode 100644 doc/Author.html delete mode 100644 doc/AuthorsController.html delete mode 100644 doc/AuthorsHelper.html delete mode 100644 doc/BookCitation.html delete mode 100644 doc/BulletinCitation.html delete mode 100644 doc/ChapterCitation.html delete mode 100644 doc/Citation.html delete mode 100644 doc/CitationFactory.html delete mode 100644 doc/CitationFormat.html delete mode 100644 doc/CitationType.html delete mode 100644 doc/CitationsController.html delete mode 100644 doc/CitationsHelper.html delete mode 100644 doc/ClimdbController.html delete mode 100644 doc/Collection.html delete mode 100644 doc/CollectionsController.html delete mode 100644 doc/ConferenceCitation.html delete mode 100644 doc/CoreArea.html delete mode 100644 doc/Customizer.html delete mode 100644 doc/DataContribution.html delete mode 100644 doc/DataQuery.html delete mode 100644 doc/Dataset.html delete mode 100644 doc/DatasetFile.html delete mode 100644 doc/DatasetFilesController.html delete mode 100644 doc/DatasetsController.html delete mode 100644 doc/Datatable.html delete mode 100644 doc/DatatablesController.html delete mode 100644 doc/DatatablesHelper.html delete mode 100644 doc/DatatablesVariates.html delete mode 100644 doc/EML.html delete mode 100644 doc/ENW.html delete mode 100644 doc/EbookCitation.html delete mode 100644 doc/Editor.html delete mode 100644 doc/ElementHandler.html delete mode 100644 doc/EmlDatatableBuilder.html delete mode 100644 doc/Invite.html delete mode 100644 doc/InviteMailer.html delete mode 100644 doc/InvitesController.html delete mode 100644 doc/MeasurementScale.html delete mode 100644 doc/Meeting.html delete mode 100644 doc/MeetingAbstractType.html delete mode 100644 doc/MeetingsController.html delete mode 100644 doc/Membership.html delete mode 100644 doc/Ownership.html delete mode 100644 doc/OwnershipsController.html delete mode 100644 doc/Page.html delete mode 100644 doc/PageImage.html delete mode 100644 doc/PagesController.html delete mode 100644 doc/PeopleController.html delete mode 100644 doc/PeopleHelper.html delete mode 100644 doc/Permission.html delete mode 100644 doc/PermissionRequest.html delete mode 100644 doc/PermissionRequestsController.html delete mode 100644 doc/PermissionsController.html delete mode 100644 doc/Person.html delete mode 100644 doc/Project.html delete mode 100644 doc/ProjectsController.html delete mode 100644 doc/Protocol.html delete mode 100644 doc/ProtocolsController.html delete mode 100644 doc/ReportCitation.html delete mode 100644 doc/Role.html delete mode 100644 doc/RoleType.html delete mode 100644 doc/S3_Selector.html delete mode 100644 doc/ScoreCard.html delete mode 100644 doc/ScoreCardsController.html delete mode 100644 doc/Scribble.html delete mode 100644 doc/SessionsController.html delete mode 100644 doc/Species.html delete mode 100644 doc/Sponsor.html delete mode 100644 doc/SponsorsController.html delete mode 100644 doc/StudiesController.html delete mode 100644 doc/Study.html delete mode 100644 doc/StudyUrl.html delete mode 100644 doc/SubdomainResolver.html delete mode 100644 doc/Template.html delete mode 100644 doc/TemplatesController.html delete mode 100644 doc/Theme.html delete mode 100644 doc/ThemesHelper.html delete mode 100644 doc/ThesisCitation.html delete mode 100644 doc/Treatment.html delete mode 100644 doc/Unit.html delete mode 100644 doc/UnitDictionaryJob.html delete mode 100644 doc/UnitsController.html delete mode 100644 doc/User.html delete mode 100644 doc/UsersController.html delete mode 100644 doc/Variate.html delete mode 100644 doc/VariatesController.html delete mode 100644 doc/VenueType.html delete mode 100644 doc/Visualization.html delete mode 100644 doc/VisualizationsController.html delete mode 100644 doc/VisualizationsHelper.html delete mode 100644 doc/Website.html delete mode 100644 doc/_index.html delete mode 100644 doc/class_list.html delete mode 100644 doc/css/common.css delete mode 100644 doc/css/full_list.css delete mode 100644 doc/css/style.css delete mode 100644 doc/file_list.html delete mode 100644 doc/frames.html delete mode 100644 doc/index.html delete mode 100644 doc/js/app.js delete mode 100644 doc/js/full_list.js delete mode 100644 doc/js/jquery.js delete mode 100644 doc/method_list.html delete mode 100644 doc/model.dot delete mode 100644 doc/model.png delete mode 100644 doc/top-level-namespace.html diff --git a/doc/Abstract.html b/doc/Abstract.html deleted file mode 100644 index 157f81137..000000000 --- a/doc/Abstract.html +++ /dev/null @@ -1,192 +0,0 @@ - - - - - - Class: Abstract - - — Documentation by YARD 0.8.7.6 - - - - - - - - - - - - - - - - - - - - - -

Class: Abstract - - - -

- -
- -
Inherits:
-
- ActiveRecord::Base - -
    -
  • Object
  • - - - - - -
- show all - -
- - - - - - - - - -
Defined in:
-
app/models/abstract.rb
- -
-
- - - - - - - - - -

- Class Method Summary - (collapse) -

- - - - - - - -
-

Class Method Details

- - -
-

- - + (Object) by_authors - - - - - -

- - - - -
-
-
-
-21
-22
-23
-
-
# File 'app/models/abstract.rb', line 21
-
-def self.by_authors
- order :authors 
-end
-
-
- -
- -
- - - - - \ No newline at end of file diff --git a/doc/AbstractsController.html b/doc/AbstractsController.html deleted file mode 100644 index d10a38a73..000000000 --- a/doc/AbstractsController.html +++ /dev/null @@ -1,705 +0,0 @@ - - - - - - Class: AbstractsController - - — Documentation by YARD 0.8.7.6 - - - - - - - - - - - - - - - - - - - - - -

Class: AbstractsController - - - -

- -
- -
Inherits:
-
- ApplicationController - - - show all - -
- - - - - - - - - -
Defined in:
-
app/controllers/abstracts_controller.rb
- -
-
- -

Overview

-
- -

Controls pages dealing with abstracts of meetings

- - -
-
-
- - -
- - - - - - - -

- Instance Method Summary - (collapse) -

- - - - - - - - - - - - - - -
-

Instance Method Details

- - -
-

- - - (Object) create - - - - - -

- - - - -
-
-
-
-32
-33
-34
-35
-36
-37
-38
-39
-40
-41
-42
-43
-44
-45
-46
-47
-
-
# File 'app/controllers/abstracts_controller.rb', line 32
-
-def create
-  @abstract_types = MeetingAbstractType.pluck(:name, :id)
-  respond_to do |format|
-    if abstract.save
-      flash[:notice] = 'Meeting Abstract was successfully created.'
-      if abstract.meeting_abstract_type == MeetingAbstractType.where(name: "Presentation").first
-        format.html { redirect_to abstract_url(abstract) }
-      else
-        format.html { redirect_to meeting_url(abstract.meeting) }
-      end
-    else
-      format.html { render "new" }
-      format.xml  { render :xml => abstract.errors.to_xml }
-    end
-  end
-end
-
-
- -
-

- - - (Object) destroy - - - - - -

- - - - -
-
-
-
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-
-
# File 'app/controllers/abstracts_controller.rb', line 69
-
-def destroy
-  abstract.destroy
-  respond_to do |format|
-    format.html { redirect_to meetings_url }
-    format.xml  { head :ok }
-    format.js do
-      render :nothing => true
-    end
-  end
-end
-
-
- -
-

- - - (Object) download - - - - - -

- - - - -
-
-
-
-14
-15
-16
-17
-18
-19
-20
-21
-22
-
-
# File 'app/controllers/abstracts_controller.rb', line 14
-
-def download
-  head(:not_found) and return unless (abstract= Abstract.find_by_id(params[:id]))
-  path = abstract.pdf.path(params[:style])
-  if Rails.env.production?
-    redirect_to(abstract.pdf.s3_object(params[:style]).url_for(:read, :secure => true, :expires_in  => 20.seconds).to_s)
-  else
-    send_file  path, :type => 'application/pdf', :disposition => 'inline'
-  end
-end
-
-
- -
-

- - - (Object) edit - - - - - -

-
- -

GET /meeting_abstract/1/edit

- - -
-
-
- - -
- - - - -
-
-
-
-56
-57
-58
-
-
# File 'app/controllers/abstracts_controller.rb', line 56
-
-def edit
-  @abstract_types = MeetingAbstractType.all.collect { |type| [type.name, type.id]}
-end
-
-
- -
-

- - - (Object) index - - - - - -

-
- -

GET meeting_abstracts GET meeting_abstracts.xml

- - -
-
-
- - -
- - - - -
-
-
-
-9
-10
-11
-12
-
-
# File 'app/controllers/abstracts_controller.rb', line 9
-
-def index
-  @abstracts = Abstract.by_authors
-  respond_with @abstracts
-end
-
-
- -
-

- - - (Object) new - - - - - -

-
- -

GET meeting_abstracts/new?meeting=1

- - -
-
-
- - -
- - - - -
-
-
-
-25
-26
-27
-28
-29
-
-
# File 'app/controllers/abstracts_controller.rb', line 25
-
-def new
-  meeting  = Meeting.find(params[:meeting_id])
-  abstract.meeting_id = meeting.id
-  @abstract_types = MeetingAbstractType.pluck(:name, :id)
-end
-
-
- -
-

- - - (Object) show - - - - - -

-
- -

GET meeting_abstracts/1 GET meeting_abstracts/1.xml

- - -
-
-
- - -
- - - - -
-
-
-
-51
-52
-53
-
-
# File 'app/controllers/abstracts_controller.rb', line 51
-
-def show
-  respond_with abstract
-end
-
-
- -
-

- - - (Object) update - - - - - -

-
- -

PUT /meeting_abstracts/1 PUT /meeting_abstracts/1.xml

- - -
-
-
- - -
- - - - -
-
-
-
-62
-63
-64
-65
-66
-67
-
-
# File 'app/controllers/abstracts_controller.rb', line 62
-
-def update
-  if abstract.update_attributes(abstract_params)
-    flash[:notice] = 'Meeting abstract was successfully updated.'
-  end
-  respond_with abstract
-end
-
-
- -
- -
- - - - - \ No newline at end of file diff --git a/doc/ActionController/Testing/Caching.html b/doc/ActionController/Testing/Caching.html deleted file mode 100644 index 435fd5375..000000000 --- a/doc/ActionController/Testing/Caching.html +++ /dev/null @@ -1,234 +0,0 @@ - - - - - - Module: ActionController::Testing::Caching - - — Documentation by YARD 0.8.7.6 - - - - - - - - - - - - - - - - - - - - - -

Module: ActionController::Testing::Caching - - - -

- -
- - - - - - - - -
Defined in:
-
lib/testing_caching.rb
- -
-
- - - - - - - - - -

- Instance Method Summary - (collapse) -

- - - - - - -
-

Instance Method Details

- - -
-

- - - (Object) with_caching(on = true) - - - - - -

- - - - -
-
-
-
-2
-3
-4
-5
-6
-7
-8
-
-
# File 'lib/testing_caching.rb', line 2
-
-def with_caching(on = true)
-  caching = ActionController::Base.perform_caching
-  ActionController::Base.perform_caching = on
-  yield
-ensure
-  ActionController::Base.perform_caching = caching
-end
-
-
- -
-

- - - (Object) without_caching(&block) - - - - - -

- - - - -
-
-
-
-10
-11
-12
-
-
# File 'lib/testing_caching.rb', line 10
-
-def without_caching(&block)
-  with_caching(false, &block)
-end
-
-
- -
- -
- - - - - \ No newline at end of file diff --git a/doc/Affiliation.html b/doc/Affiliation.html deleted file mode 100644 index 351f9fc02..000000000 --- a/doc/Affiliation.html +++ /dev/null @@ -1,246 +0,0 @@ - - - - - - Class: Affiliation - - — Documentation by YARD 0.8.7.6 - - - - - - - - - - - - - - - - - - - - - -

Class: Affiliation - - - -

- -
- -
Inherits:
-
- ActiveRecord::Base - -
    -
  • Object
  • - - - - - -
- show all - -
- - - - - - - - - -
Defined in:
-
lib/load_roles.rb,
- app/models/affiliation.rb
-
- -
-
- - - - - - - - - -

- Class Method Summary - (collapse) -

- - - - - - - -
-

Class Method Details

- - -
-

- - + (Object) committees - - - - - -

- - - - -
-
-
-
-10
-11
-12
-
-
# File 'app/models/affiliation.rb', line 10
-
-def self.committees
-  joins(:role).where(%q{roles.name like '%Committee%' or name like '%Network Representative%'}).order('seniority')
-end
-
-
- -
-

- - + (Object) lter - - - - - -

- - - - -
-
-
-
-6
-7
-8
-
-
# File 'app/models/affiliation.rb', line 6
-
-def self.lter
-  joins(:role).where('role_type_id = ?', RoleType.where(:name => 'lter').first)
-end
-
-
- -
- -
- - - - - \ No newline at end of file diff --git a/doc/AffiliationsController.html b/doc/AffiliationsController.html deleted file mode 100644 index 4b5c1caa7..000000000 --- a/doc/AffiliationsController.html +++ /dev/null @@ -1,567 +0,0 @@ - - - - - - Class: AffiliationsController - - — Documentation by YARD 0.8.7.6 - - - - - - - - - - - - - - - - - - - - - -

Class: AffiliationsController - - - -

- -
- -
Inherits:
-
- ApplicationController - - - show all - -
- - - - - - - - - -
Defined in:
-
app/controllers/affiliations_controller.rb
- -
-
- - - - - - - - - -

- Instance Method Summary - (collapse) -

- - - - - - - - - - - - - - -
-

Instance Method Details

- - -
-

- - - (Object) create - - - - - -

- - - - -
-
-
-
-33
-34
-35
-36
-37
-38
-39
-40
-41
-
-
# File 'app/controllers/affiliations_controller.rb', line 33
-
-def create
-  @affiliation = Affiliation.new(affiliation_params)
-
-  if @affiliation.save
-    flash[:notice] = 'Affiliation was successfully created.'
-  end
-
-  respond_with @affiliation
-end
-
-
- -
-

- - - (Object) destroy - - - - - -

- - - - -
-
-
-
-43
-44
-45
-46
-47
-
-
# File 'app/controllers/affiliations_controller.rb', line 43
-
-def destroy
-  affiliation.destroy
-  flash[:notice] = 'Affiliation was successfully destroyed.'
-  redirect_to 'index'
-end
-
-
- -
-

- - - (Object) edit - - - - - -

- - - - -
-
-
-
-14
-15
-
-
# File 'app/controllers/affiliations_controller.rb', line 14
-
-def edit
-end
-
-
- -
-

- - - (Object) index - - - - - -

-
- -

before_filter :get_affiliation, :only => [:show, :edit, :update, -:destroy]

- - -
-
-
- - -
- - - - -
-
-
-
-7
-8
-9
-
-
# File 'app/controllers/affiliations_controller.rb', line 7
-
-def index
-  @affiliations = Affiliation.all
-end
-
-
- -
-

- - - (Object) new - - - - - -

-
- -

GET /affiliations/new

- - -
-
-
- - -
- - - - -
-
-
-
-25
-26
-27
-28
-29
-30
-31
-
-
# File 'app/controllers/affiliations_controller.rb', line 25
-
-def new
-  @affiliation = Affiliation.new
-  respond_to do |format|
-    format.html
-    format.js 
-  end
-end
-
-
- -
-

- - - (Object) show - - - - - -

- - - - -
-
-
-
-11
-12
-
-
# File 'app/controllers/affiliations_controller.rb', line 11
-
-def show
-end
-
-
- -
-

- - - (Object) update - - - - - -

- - - - -
-
-
-
-17
-18
-19
-20
-21
-22
-
-
# File 'app/controllers/affiliations_controller.rb', line 17
-
-def update
-  if affiliation.update_attributes(affiliation_params)
-    flash[:notice] = 'Affiliation was successfully updated.'
-  end
-  respond_with affiliation
-end
-
-
- -
- -
- - - - - \ No newline at end of file diff --git a/doc/ApplicationController.html b/doc/ApplicationController.html deleted file mode 100644 index 70feaddfd..000000000 --- a/doc/ApplicationController.html +++ /dev/null @@ -1,132 +0,0 @@ - - - - - - Class: ApplicationController - - — Documentation by YARD 0.8.7.6 - - - - - - - - - - - - - - - - - - - - - -

Class: ApplicationController - - - -

- -
- -
Inherits:
-
- ActionController::Base - -
    -
  • Object
  • - - - - - -
- show all - -
- - - - - - -
Includes:
-
Clearance::Controller
- - - - - -
Defined in:
-
app/controllers/application_controller.rb
- -
-
- - - - - - - - - - - - - -
- - - - - \ No newline at end of file diff --git a/doc/ApplicationHelper.html b/doc/ApplicationHelper.html deleted file mode 100644 index b98ee0230..000000000 --- a/doc/ApplicationHelper.html +++ /dev/null @@ -1,653 +0,0 @@ - - - - - - Module: ApplicationHelper - - — Documentation by YARD 0.8.7.6 - - - - - - - - - - - - - - - - - - - - - -

Module: ApplicationHelper - - - -

- -
- - - - - - - - -
Defined in:
-
app/helpers/application_helper.rb
- -
-
- - - - - - - - - -

- Instance Method Summary - (collapse) -

- - - - - - -
-

Instance Method Details

- - -
-

- - - (Boolean) admin? - - - - - -

-
- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-19
-20
-21
-
-
# File 'app/helpers/application_helper.rb', line 19
-
-def admin?
-  current_user.try(:role) == 'admin'
-end
-
-
- -
-

- - - (Boolean) current_controller?(controller) - - - - - -

-
- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-23
-24
-25
-26
-27
-28
-29
-
-
# File 'app/helpers/application_helper.rb', line 23
-
-def current_controller?(controller)
-  if controller_name == controller
-    'current-nav'
-  else
-    'not-current-nav'
-  end
-end
-
-
- -
- - - - - -
-
-
-
-36
-37
-38
-39
-40
-41
-42
-43
-
-
# File 'app/helpers/application_helper.rb', line 36
-
-def link_to_add_fields(name, f, association)
-  new_object = f.object.send(association).klass.new
-  id = new_object.object_id
-  fields = f.fields_for(association, new_object, child_index: id) do |builder|
-    render(association.to_s.singularize + "_fields", f: builder)
-  end
-  link_to(name, '#', class: "add_fields", data: {id: id, fields: fields.gsub("\n", "")})
-end
-
-
- -
-
-
- -

TODO do remove in favor of unobtrusive javascript

- - -
-
-
- - -
- - - - -
-
-
-
-46
-47
-48
-49
-50
-51
-52
-53
-54
-
-
# File 'app/helpers/application_helper.rb', line 46
-
-def link_to_function(name, *args, &block)
-  html_options = args.extract_options!.symbolize_keys
-
-  function = block_given? ? update_page(&block) : args[0] || ''
-  onclick = "#{"#{html_options[:onclick]}; " if html_options[:onclick]}#{function}; return false;"
-  href = html_options[:href] || '#'
-
-  (:a, name, html_options.merge(:href => href, :onclick => onclick))
-end
-
-
- -
-
-
- -

TODO do remove in favor of unobtrusive javascript

- - -
-
-
- - -
- - - - -
-
-
-
-32
-33
-34
-
-
# File 'app/helpers/application_helper.rb', line 32
-
-def link_to_remove_fields(name, form)
-    form.hidden_field(:_destroy) + link_to_function(name, "remove_fields(this)")
-end
-
-
- -
-

- - - (Object) lter_roles - - - - - -

- - - - -
-
-
-
-14
-15
-16
-17
-
-
# File 'app/helpers/application_helper.rb', line 14
-
-def lter_roles
-  #TODO this is both here and in the person controller
-  Role.where(role_type_id: RoleType.where(name: 'lter').first)
-end
-
-
- -
-

- - - (Object) strip_html_tags(string = '') - - - - - -

-
- -

use to strip out html tags when using truncate

- - -
-
-
- - -
- - - - -
-
-
-
-10
-11
-12
-
-
# File 'app/helpers/application_helper.rb', line 10
-
-def strip_html_tags(string = '')
-  string.gsub(/<\/?[^>]*>/,  "")
-end
-
-
- -
-

- - - (Object) textilize(text) - - - - - -

- - - - -
-
-
-
-5
-6
-7
-
-
# File 'app/helpers/application_helper.rb', line 5
-
-def textilize(text)
-  raw(RedCloth.new(text.to_s).to_html)
-end
-
-
- -
- -
- - - - - \ No newline at end of file diff --git a/doc/ArticleCitation.html b/doc/ArticleCitation.html deleted file mode 100644 index a13b84ffa..000000000 --- a/doc/ArticleCitation.html +++ /dev/null @@ -1,206 +0,0 @@ - - - - - - Class: ArticleCitation - - — Documentation by YARD 0.8.7.6 - - - - - - - - - - - - - - - - - - - - - -

Class: ArticleCitation - - - -

- -
- -
Inherits:
-
- Citation - -
    -
  • Object
  • - - - - - - - -
- show all - -
- - - - - - - - - -
Defined in:
-
app/models/article_citation.rb
- -
-
- - - - - - - - - -

- Instance Method Summary - (collapse) -

- - - - - - - - - - - - - -

Methods inherited from Citation

-

#author_block, #author_block=, #authors_from_ris_authors, #bib_hash, #book?, by_date, by_treatment, by_type, citation_from_ris_stanza, #date_from_ris_date, #editor_block, #editor_block=, #file_title, from_ris, from_website, #get_attribute_from_ris_stanza, #get_attributes_from_ris_stanza, #make_pdf_private, #make_pdf_public, #page_number_from_ris, #pdf_from_ris_pdf, select_options, #short_author_string, sorted_by, #to_bib, to_bib, to_enw, #to_enw, #treat_as_token_list, type_from_ris_type

- - - - -
-

Instance Method Details

- - -
-

- - - (Object) formatted(options = {}) - - - - - -

- - - - -
-
-
-
-3
-4
-5
-
-
# File 'app/models/article_citation.rb', line 3
-
-def formatted(options={})
-  "#{author_and_year(options)} #{title_and_punctuation} #{journal} #{volume_and_page} #{annotation}".rstrip
-end
-
-
- -
- -
- - - - - \ No newline at end of file diff --git a/doc/Author.html b/doc/Author.html deleted file mode 100644 index 95513667b..000000000 --- a/doc/Author.html +++ /dev/null @@ -1,283 +0,0 @@ - - - - - - Class: Author - - — Documentation by YARD 0.8.7.6 - - - - - - - - - - - - - - - - - - - - - -

Class: Author - - - -

- -
- -
Inherits:
-
- ActiveRecord::Base - -
    -
  • Object
  • - - - - - -
- show all - -
- - - - - - -
Includes:
-
CitationFormat
- - - - - -
Defined in:
-
app/models/author.rb
- -
-
- - -

Constant Summary

- - - - -

Constant Summary

- -

Constants included - from CitationFormat

-

CitationFormat::SUFFICES

- - - - - - -

- Class Method Summary - (collapse) -

- - - -

- Instance Method Summary - (collapse) -

- - - - - - - - - - - - - -

Methods included from CitationFormat

-

#extract_suffix, #first_initial, #format_as_default, #format_as_natural, #formatted, #full_name, #middle_initial, #name, #name=, #suffix_text, #treat_as_first_middle_last, #treat_as_last_first_middle

- - - -
-

Class Method Details

- - -
-

- - + (Object) to_enw - - - - - -

- - - - -
-
-
-
-10
-11
-12
-
-
# File 'app/models/author.rb', line 10
-
-def Author.to_enw
-  all.collect { |author| author.to_enw }.join
-end
-
-
- -
- -
-

Instance Method Details

- - -
-

- - - (Object) to_enw - - - - - -

- - - - -
-
-
-
-14
-15
-16
-
-
# File 'app/models/author.rb', line 14
-
-def to_enw
-  "\n%A #{formatted}"
-end
-
-
- -
- -
- - - - - \ No newline at end of file diff --git a/doc/AuthorsController.html b/doc/AuthorsController.html deleted file mode 100644 index 443e0e2ba..000000000 --- a/doc/AuthorsController.html +++ /dev/null @@ -1,207 +0,0 @@ - - - - - - Class: AuthorsController - - — Documentation by YARD 0.8.7.6 - - - - - - - - - - - - - - - - - - - - - -

Class: AuthorsController - - - -

- -
- -
Inherits:
-
- ApplicationController - - - show all - -
- - - - - - - - - -
Defined in:
-
app/controllers/authors_controller.rb
- -
-
- - - - - - - - - -

- Instance Method Summary - (collapse) -

- - - - - - - - - - - - - - -
-

Instance Method Details

- - -
-

- - - (Object) index - - - - - -

- - - - -
-
-
-
-3
-4
-5
-6
-7
-8
-
-
# File 'app/controllers/authors_controller.rb', line 3
-
-def index
-  @authors = Author.where("sur_name like ?", "%#{params[:q]}%")
-  respond_to do |format|
-    format.json { render :json => @authors.map(&:attributes) }
-  end
-end
-
-
- -
- -
- - - - - \ No newline at end of file diff --git a/doc/AuthorsHelper.html b/doc/AuthorsHelper.html deleted file mode 100644 index 945cebb18..000000000 --- a/doc/AuthorsHelper.html +++ /dev/null @@ -1,105 +0,0 @@ - - - - - - Module: AuthorsHelper - - — Documentation by YARD 0.8.7.6 - - - - - - - - - - - - - - - - - - - - - -

Module: AuthorsHelper - - - -

- -
- - - - - - - - -
Defined in:
-
app/helpers/authors_helper.rb
- -
-
- - - - - - - - - - -
- - - - - \ No newline at end of file diff --git a/doc/BookCitation.html b/doc/BookCitation.html deleted file mode 100644 index 172f7c8ad..000000000 --- a/doc/BookCitation.html +++ /dev/null @@ -1,280 +0,0 @@ - - - - - - Class: BookCitation - - — Documentation by YARD 0.8.7.6 - - - - - - - - - - - - - - - - - - - - - -

Class: BookCitation - - - -

- -
- -
Inherits:
-
- Citation - -
    -
  • Object
  • - - - - - - - -
- show all - -
- - - - - - - - - -
Defined in:
-
app/models/book_citation.rb
- -
-
- - - - - - - - - -

- Instance Method Summary - (collapse) -

- - - - - - - - - - - - - -

Methods inherited from Citation

-

#author_block, #author_block=, #authors_from_ris_authors, #bib_hash, by_date, by_treatment, by_type, citation_from_ris_stanza, #date_from_ris_date, #editor_block, #editor_block=, #file_title, from_ris, from_website, #get_attribute_from_ris_stanza, #get_attributes_from_ris_stanza, #make_pdf_private, #make_pdf_public, #page_number_from_ris, #pdf_from_ris_pdf, select_options, #short_author_string, sorted_by, to_bib, #to_bib, #to_enw, to_enw, #treat_as_token_list, type_from_ris_type

- - - - -
-

Instance Method Details

- - -
-

- - - (Boolean) book? - - - - - -

-
- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-3
-4
-5
-
-
# File 'app/models/book_citation.rb', line 3
-
-def book?
-  true
-end
-
-
- -
-

- - - (Object) formatted(options = {}) - - - - - -

- - - - -
-
-
-
-7
-8
-9
-
-
# File 'app/models/book_citation.rb', line 7
-
-def formatted(options={})
-  "#{author_and_year(options)} #{title_and_punctuation} #{page_numbers_book}#{editor_string}#{publication_string}#{publisher}#{address_and_city}"
-end
-
-
- -
- -
- - - - - \ No newline at end of file diff --git a/doc/BulletinCitation.html b/doc/BulletinCitation.html deleted file mode 100644 index 3eb45d78c..000000000 --- a/doc/BulletinCitation.html +++ /dev/null @@ -1,206 +0,0 @@ - - - - - - Class: BulletinCitation - - — Documentation by YARD 0.8.7.6 - - - - - - - - - - - - - - - - - - - - - -

Class: BulletinCitation - - - -

- -
- -
Inherits:
-
- Citation - -
    -
  • Object
  • - - - - - - - -
- show all - -
- - - - - - - - - -
Defined in:
-
app/models/bulletin_citation.rb
- -
-
- - - - - - - - - -

- Instance Method Summary - (collapse) -

- - - - - - - - - - - - - -

Methods inherited from Citation

-

#author_block, #author_block=, #authors_from_ris_authors, #bib_hash, #book?, by_date, by_treatment, by_type, citation_from_ris_stanza, #date_from_ris_date, #editor_block, #editor_block=, #file_title, from_ris, from_website, #get_attribute_from_ris_stanza, #get_attributes_from_ris_stanza, #make_pdf_private, #make_pdf_public, #page_number_from_ris, #pdf_from_ris_pdf, select_options, #short_author_string, sorted_by, #to_bib, to_bib, to_enw, #to_enw, #treat_as_token_list, type_from_ris_type

- - - - -
-

Instance Method Details

- - -
-

- - - (Object) formatted(options = {}) - - - - - -

- - - - -
-
-
-
-3
-4
-5
-
-
# File 'app/models/bulletin_citation.rb', line 3
-
-def formatted(options={})
-  "#{author_and_year(options)} #{title_and_punctuation} #{editor_string}#{publication_string}#{volume_and_page}#{publisher_string}#{address_and_city}."
-end
-
-
- -
- -
- - - - - \ No newline at end of file diff --git a/doc/ChapterCitation.html b/doc/ChapterCitation.html deleted file mode 100644 index 7fabe63b0..000000000 --- a/doc/ChapterCitation.html +++ /dev/null @@ -1,278 +0,0 @@ - - - - - - Class: ChapterCitation - - — Documentation by YARD 0.8.7.6 - - - - - - - - - - - - - - - - - - - - - -

Class: ChapterCitation - - - -

- -
- -
Inherits:
-
- Citation - -
    -
  • Object
  • - - - - - - - -
- show all - -
- - - - - - - - - -
Defined in:
-
app/models/chapter_citation.rb
- -
-
- - - - - - - - - -

- Instance Method Summary - (collapse) -

- - - - - - - - - - - - - -

Methods inherited from Citation

-

#author_block, #author_block=, #authors_from_ris_authors, #bib_hash, #book?, by_date, by_treatment, by_type, citation_from_ris_stanza, #date_from_ris_date, #editor_block, #editor_block=, #file_title, from_ris, from_website, #get_attribute_from_ris_stanza, #get_attributes_from_ris_stanza, #make_pdf_private, #make_pdf_public, #page_number_from_ris, #pdf_from_ris_pdf, select_options, #short_author_string, sorted_by, #to_bib, to_bib, to_enw, #to_enw, #treat_as_token_list, type_from_ris_type

- - - - -
-

Instance Method Details

- - -
-

- - - (Object) formatted(options = {}) - - - - - -

- - - - -
-
-
-
-3
-4
-5
-
-
# File 'app/models/chapter_citation.rb', line 3
-
-def formatted(options={})
-  "#{author_and_year(options)} #{title_and_punctuation} #{volume_and_page} in #{eds}#{book_string}#{publisher}#{address_and_city}."
-end
-
-
- -
-

- - - (Object) volume_and_page - - - - - -

- - - - -
-
-
-
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-
-
# File 'app/models/chapter_citation.rb', line 7
-
-def volume_and_page
-  if volume.blank?
-    if page_numbers.blank?
-      ""
-    else
-      "Pages #{page_numbers}"
-    end
-  elsif page_numbers.blank?
-    "#{volume}"
-  else
-    "Vol #{volume}, Pages #{page_numbers}"
-  end
-end
-
-
- -
- -
- - - - - \ No newline at end of file diff --git a/doc/Citation.html b/doc/Citation.html deleted file mode 100644 index 21119ea14..000000000 --- a/doc/Citation.html +++ /dev/null @@ -1,2011 +0,0 @@ - - - - - - Class: Citation - - — Documentation by YARD 0.8.7.6 - - - - - - - - - - - - - - - - - - - - - -

Class: Citation - - - -

- -
- -
Inherits:
-
- ActiveRecord::Base - -
    -
  • Object
  • - - - - - -
- show all - -
- - - - - - -
Includes:
-
Workflow
- - - - - -
Defined in:
-
app/models/citation.rb
- -
-
- - - - - - - - - - -

- Class Method Summary - (collapse) -

- - - -

- Instance Method Summary - (collapse) -

- - - - - - - - -
-

Class Method Details

- - -
-

- - + (Object) by_date(date) - - - - - -

- - - - -
-
-
-
-89
-90
-91
-92
-
-
# File 'app/models/citation.rb', line 89
-
-def Citation.by_date(date)
-  query_date = Date.civil(date['year'].to_i,date['month'].to_i,date['day'].to_i)
-  where('updated_at > ?', query_date)
-end
-
-
- -
-

- - + (Object) by_treatment(treatment) - - - - - -

- - - - -
-
-
-
-81
-82
-83
-
-
# File 'app/models/citation.rb', line 81
-
-def Citation.by_treatment(treatment)
-  includes(:treatments).references(:treatments).where('treatments.id = ?', treatment)
-end
-
-
- -
-

- - + (Object) by_type(type) - - - - - -

- - - - -
-
-
-
-106
-107
-108
-
-
# File 'app/models/citation.rb', line 106
-
-def Citation.by_type(type)
-  where(:type => type)
-end
-
-
- -
-

- - + (Object) citation_from_ris_stanza(stanza, pdf_folder) - - - - - -

- - - - -
-
-
-
-164
-165
-166
-167
-168
-169
-170
-171
-172
-173
-174
-175
-176
-177
-178
-179
-180
-181
-182
-
-
# File 'app/models/citation.rb', line 164
-
-def Citation.citation_from_ris_stanza(stanza, pdf_folder)
-  citation = type_from_ris_type(stanza[:type]).new
-  same_name_attributes = ['title',
-                          'secondary_title',
-                          'series_title',
-                          'pub_year',
-                          'volume',
-                          'abstract',
-                          'doi']
-  citation.get_attributes_from_ris_stanza(stanza, same_name_attributes)
-  citation.get_attribute_from_ris_stanza(stanza, 'publication', :journal)
-  citation.date_from_ris_date(stanza[:primary_date]) if stanza[:primary_date]
-  citation.page_number_from_ris( stanza[:start_page], stanza[:end_page]) 
-  citation.pdf_from_ris_pdf(stanza[:pdf], pdf_folder) if pdf_folder && stanza[:pdf]
-
-  citation.save
-  citation.authors_from_ris_authors(stanza[:authors])
-  citation
-end
-
-
- -
-

- - + (Object) from_ris(ris_text, pdf_folder = nil) - - - - - -

- - - - -
-
-
-
-137
-138
-139
-140
-141
-142
-143
-144
-145
-
-
# File 'app/models/citation.rb', line 137
-
-def Citation.from_ris(ris_text, pdf_folder = nil)
-  parser = RisParser::RisParser.new
-  trans = RisParser::RisParserTransform.new
-  parsed_text = trans.apply(parser.parse(ris_text))
-  parsed_text.collect do |stanza|
-    logger.info stanza
-    citation_from_ris_stanza(stanza, pdf_folder)
-  end
-end
-
-
- -
-

- - + (Object) from_website(website_id) - - - - - -

- - - - -
-
-
-
-85
-86
-87
-
-
# File 'app/models/citation.rb', line 85
-
-def Citation.from_website(website_id)
-  where(website_id: website_id)
-end
-
-
- -
-

- - + (Object) select_options - - - - - -

- - - - -
-
-
-
-285
-286
-287
-288
-
-
# File 'app/models/citation.rb', line 285
-
-def self.select_options
-  classes = descendants.map{ |klass| klass.to_s }.sort
-  classes.collect { |klass| [klass.gsub(/Citation/,''), klass] }
-end
-
-
- -
-

- - + (Object) sorted_by(sorter) - - - - - -

- - - - -
-
-
-
-110
-111
-112
-113
-114
-115
-116
-
-
# File 'app/models/citation.rb', line 110
-
-def Citation.sorted_by(sorter)
-  sorter.downcase!
-  #Since primary author and date is default, it is already sorted that way
-  unless sorter == "primary author and date(default)"
-    order(sorter)
-  end
-end
-
-
- -
-

- - + (Object) to_bib(array_of_citations) - - - - - -

- - - - -
-
-
-
-99
-100
-101
-102
-103
-104
-
-
# File 'app/models/citation.rb', line 99
-
-def Citation.to_bib(array_of_citations)
-  bib = BibTeX::Bibliography.new
-  array_of_citations.each {|citation| bib << citation.to_bib}
-
-  bib.to_s
-end
-
-
- -
-

- - + (Object) to_enw(array_of_citations) - - - - - -

- - - - -
-
-
-
-95
-96
-97
-
-
# File 'app/models/citation.rb', line 95
-
-def Citation.to_enw(array_of_citations)
-  array_of_citations.collect { |citation| citation.to_enw }.join("\n") + "\n"
-end
-
-
- -
-

- - + (Object) type_from_ris_type(type) - - - - - -

- - - - -
-
-
-
-118
-119
-120
-121
-122
-123
-124
-125
-126
-127
-128
-129
-130
-131
-132
-133
-134
-135
-
-
# File 'app/models/citation.rb', line 118
-
-def Citation.type_from_ris_type(type)
-  case type
-  when 'JOUR', 'MGZN'
-    ArticleCitation
-  when 'BOOK'
-    BookCitation
-  when 'CHAP'
-    ChapterCitation
-  when 'CONF'
-    ConferenceCitation
-  when 'RPRT'
-    ReportCitation
-  when 'THES'
-    ThesisCitation
-  else
-    Citation
-  end
-end
-
-
- -
- -
-

Instance Method Details

- - -
-

- - - (Object) author_block - - - - - -

- - - - -
-
-
-
-212
-213
-214
-
-
# File 'app/models/citation.rb', line 212
-
-def author_block
-  block(authors)
-end
-
-
- -
-

- - - (Object) author_block=(string_of_authors = '') - - - - - -

- - - - -
-
-
-
-216
-217
-218
-
-
# File 'app/models/citation.rb', line 216
-
-def author_block=(string_of_authors = '')
-  set_as_block('Author', string_of_authors)
-end
-
-
- -
-

- - - (Object) authors_from_ris_authors(ris_authors) - - - - - -

- - - - -
-
-
-
-206
-207
-208
-209
-210
-
-
# File 'app/models/citation.rb', line 206
-
-def authors_from_ris_authors(ris_authors)
-  ris_authors.each_with_index do |author_name, index|
-    self.authors.create(:name => author_name, :seniority => index)
-  end
-end
-
-
- -
-

- - - (Object) bib_hash - - - - - -

- - - - -
-
-
-
-256
-257
-258
-259
-260
-261
-262
-263
-264
-265
-266
-267
-268
-269
-270
-271
-272
-273
-274
-
-
# File 'app/models/citation.rb', line 256
-
-def bib_hash
-  hash = {
-    :abstract   => abstract,
-    :author     => authors.collect { |author| author.full_name }.join(' and '),
-    :editor     => editors.collect { |editor| editor.full_name }.join(' and '),
-    :title      => title,
-    :publisher  => publisher,
-    :year       => pub_year.to_s,
-    :address    => address,
-    :note       => notes,
-    :journal    => publication,
-    :pages      => page_numbers,
-    :volume     => volume,
-    :number     => issue,
-    :series     => series_title,
-    :doi        => doi,
-    :isbn       => isbn}
-  hash.delete_if { |key, value| value.blank? }
-end
-
-
- -
-

- - - (Boolean) book? - - - - - -

-
- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-239
-240
-241
-
-
# File 'app/models/citation.rb', line 239
-
-def book?
-  citation_type.try(:name) == 'book'
-end
-
-
- -
-

- - - (Object) date_from_ris_date(ris_date) - - - - - -

- - - - -
-
-
-
-185
-186
-187
-188
-189
-190
-191
-
-
# File 'app/models/citation.rb', line 185
-
-def date_from_ris_date(ris_date)
-  if ris_date.to_i != 0 #it is just an integer string
-    self.pub_date = Date.new(ris_date.to_i)
-  else
-    self.pub_date = Date.parse(ris_date)
-  end
-end
-
-
- -
-

- - - (Object) editor_block - - - - - -

- - - - -
-
-
-
-227
-228
-229
-
-
# File 'app/models/citation.rb', line 227
-
-def editor_block
-  block(editors)
-end
-
-
- -
-

- - - (Object) editor_block=(string_of_editors = '') - - - - - -

- - - - -
-
-
-
-231
-232
-233
-
-
# File 'app/models/citation.rb', line 231
-
-def editor_block=(string_of_editors = '')
-  set_as_block('Editor', string_of_editors)
-end
-
-
- -
-

- - - (Object) file_title - - - - - -

- - - - -
-
-
-
-235
-236
-237
-
-
# File 'app/models/citation.rb', line 235
-
-def file_title
-  "#{self.id}-#{self.title}-#{self.pub_year}"
-end
-
-
- -
-

- - - (Object) formatted(options = {}) - - - - - -

- - - - -
-
-
-
-243
-244
-245
-
-
# File 'app/models/citation.rb', line 243
-
-def formatted(options={})
-  book? ? formatted_book(options) : formatted_article(options)
-end
-
-
- -
-

- - - (Object) get_attribute_from_ris_stanza(stanza, attribute_name, ris_name = nil) - - - - - -

- - - - -
-
-
-
-153
-154
-155
-156
-
-
# File 'app/models/citation.rb', line 153
-
-def get_attribute_from_ris_stanza(stanza, attribute_name, ris_name=nil)
-  ris_name = attribute_name.to_sym unless ris_name
-  self.send(attribute_name + "=", stanza[ris_name])
-end
-
-
- -
-

- - - (Object) get_attributes_from_ris_stanza(stanza, attribute_array) - - - - - -

- - - - -
-
-
-
-158
-159
-160
-161
-162
-
-
# File 'app/models/citation.rb', line 158
-
-def get_attributes_from_ris_stanza(stanza, attribute_array)
-  attribute_array.each do |attribute_name|
-    get_attribute_from_ris_stanza(stanza, attribute_name)
-  end
-end
-
-
- -
-

- - - (Object) make_pdf_private - - - - - -

- - - - -
-
-
-
-308
-309
-310
-
-
# File 'app/models/citation.rb', line 308
-
-def make_pdf_private
-  self.pdf.s3_object.acl = :authenticated_read
-end
-
-
- -
-

- - - (Object) make_pdf_public - - - - - -

- - - - -
-
-
-
-304
-305
-306
-
-
# File 'app/models/citation.rb', line 304
-
-def make_pdf_public
-  self.pdf.s3_object.acl = :public_read
-end
-
-
- -
-

- - - (Object) page_number_from_ris(start_page, end_page) - - - - - -

-
- -

don't even try to parse the page number

- - -
-
-
- - -
- - - - -
-
-
-
-148
-149
-150
-151
-
-
# File 'app/models/citation.rb', line 148
-
-def page_number_from_ris(start_page, end_page)
-  self.start_page_number = start_page
-  self.ending_page_number = end_page
-end
-
-
- -
-

- - - (Object) pdf_from_ris_pdf(ris_pdf, pdf_folder) - - - - - -

- - - - -
-
-
-
-193
-194
-195
-196
-197
-198
-199
-200
-201
-202
-203
-204
-
-
# File 'app/models/citation.rb', line 193
-
-def pdf_from_ris_pdf(ris_pdf, pdf_folder)
-  ris_pdf.each_line do |line|
-    not_internal_path = line.sub('internal-pdf://', '')
-    not_internal_path.strip!
-    real_path = Rails.root.to_s + '/' + pdf_folder + '/' + not_internal_path
-    if File.exist?(real_path)
-      self.pdf = File.open(real_path)
-    else
-      p "No such file: #{real_path}"
-    end
-  end
-end
-
-
- -
-

- - - (Object) short_author_string - - - - - -

- - - - -
-
-
-
-290
-291
-292
-293
-294
-295
-296
-297
-298
-
-
# File 'app/models/citation.rb', line 290
-
-def short_author_string
-  if authors.length > 3
-    return authors.first.formatted + ', et.al. '
-  elsif authors.length > 0
-    author_string
-  else
-    ''
-  end
-end
-
-
- -
-

- - - (Object) to_bib - - - - - -

- - - - -
-
-
-
-247
-248
-249
-250
-251
-252
-253
-254
-
-
# File 'app/models/citation.rb', line 247
-
-def to_bib
-  entry = BibTeX::Entry.new
-  entry.type = bibtex_type.to_s
-  entry.key = "citation_#{id}"
-  entry << bib_hash
-
-  entry
-end
-
-
- -
-

- - - (Object) to_enw - - - - - -

- - - - -
-
-
-
-276
-277
-278
-279
-280
-281
-282
-283
-
-
# File 'app/models/citation.rb', line 276
-
-def to_enw
-  endnote = "%0 #{endnote_type}#{title_to_enw}#{authors.to_enw}#{editors.to_enw}#{endnote_publication_data}"
-  endnote += "#{volume_to_enw}#{page_numbers_to_enw}#{pub_year_to_enw}#{abstract_to_enw}#{doi_to_enw}"
-  endnote += "#{publisher_to_enw}#{publisher_url_to_enw}#{isbn_to_enw}#{city_to_enw}"
-  endnote += "#{accession_number_to_enw}"
-  endnote +=  "\n"
-  endnote
-end
-
-
- -
-

- - - (Object) treat_as_token_list(name_of_class, token_string) - - - - - -

- - - - -
-
-
-
-220
-221
-222
-223
-224
-225
-
-
# File 'app/models/citation.rb', line 220
-
-def treat_as_token_list(name_of_class, token_string)
-  token_array = token_string.split(',')
-  token_array.each do |token|
-    self.send(name_of_class.tableize) << name_of_class.constantize.find_by_id(author_id)
-  end
-end
-
-
- -
- -
- - - - - \ No newline at end of file diff --git a/doc/CitationFactory.html b/doc/CitationFactory.html deleted file mode 100644 index 3a2d7d4d4..000000000 --- a/doc/CitationFactory.html +++ /dev/null @@ -1,189 +0,0 @@ - - - - - - Class: CitationFactory - - — Documentation by YARD 0.8.7.6 - - - - - - - - - - - - - - - - - - - - - -

Class: CitationFactory - - - -

- -
- -
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
- - - - - - - - - -
Defined in:
-
app/models/citation_factory.rb
- -
-
- - - - - - - - - -

- Class Method Summary - (collapse) -

- - - - - - -
-

Class Method Details

- - -
-

- - + (Object) from_doi(doi_string) - - - - - -

- - - - -
-
-
-
-2
-3
-4
-
-
# File 'app/models/citation_factory.rb', line 2
-
-def self.from_doi(doi_string)
-  Citation.new
-end
-
-
- -
- -
- - - - - \ No newline at end of file diff --git a/doc/CitationFormat.html b/doc/CitationFormat.html deleted file mode 100644 index a3540fd8e..000000000 --- a/doc/CitationFormat.html +++ /dev/null @@ -1,830 +0,0 @@ - - - - - - Module: CitationFormat - - — Documentation by YARD 0.8.7.6 - - - - - - - - - - - - - - - - - - - - - -

Module: CitationFormat - - - -

- -
- - - - - - - -
Included in:
-
Author, Editor
- - - -
Defined in:
-
lib/citation_format.rb
- -
-
- - -

Constant Summary

- -
- -
SUFFICES = - -
-
['esq','esquire','jr','sr','clu','chfc','cfp','md','phd']
- -
- - - - - - - - - -

- Instance Method Summary - (collapse) -

- - - - - - -
-

Instance Method Details

- - -
-

- - - (Object) extract_suffix(name_array) - - - - - -

- - - - -
-
-
-
-49
-50
-51
-52
-53
-54
-55
-56
-57
-
-
# File 'lib/citation_format.rb', line 49
-
-def extract_suffix(name_array)
-  suffix_text = ''
-  while name_array[-1].present? && SUFFICES.include?(name_array[-1].downcase.delete('.').strip)
-    suffix_text = ', ' + name_array.slice!(-1).strip + suffix_text
-  end
-  self.suffix = suffix_text
-
-  name_array
-end
-
-
- -
-

- - - (Object) first_initial - - - - - -

- - - - -
-
-
-
-17
-18
-19
-
-
# File 'lib/citation_format.rb', line 17
-
-def first_initial
-  given_name[0..0].upcase
-end
-
-
- -
-

- - - (Object) format_as_default - - - - - -

- - - - -
-
-
-
-25
-26
-27
-28
-29
-
-
# File 'lib/citation_format.rb', line 25
-
-def format_as_default
-  given_name_part = has_given_name? ? ", #{first_initial}." : ""
-  middle_name_part = has_middle_name? ? " #{middle_initial}." : ""
-  sur_name.to_s + given_name_part + middle_name_part + suffix_text
-end
-
-
- -
-

- - - (Object) format_as_natural - - - - - -

- - - - -
-
-
-
-31
-32
-33
-34
-35
-
-
# File 'lib/citation_format.rb', line 31
-
-def format_as_natural
-  given_name_part = has_given_name? ? "#{first_initial}. " : ""
-  middle_name_part = has_middle_name? ? "#{middle_initial}. " : ""
-  given_name_part + middle_name_part + sur_name.to_s + suffix_text
-end
-
-
- -
-

- - - (Object) formatted(option = :default) - - - - - -

- - - - -
-
-
-
-5
-6
-7
-8
-9
-10
-11
-
-
# File 'lib/citation_format.rb', line 5
-
-def formatted(option = :default)
-  if option == :natural
-    format_as_natural
-  else
-    format_as_default
-  end
-end
-
-
- -
-

- - - (Object) full_name - - - - - -

- - - - -
-
-
-
-13
-14
-15
-
-
# File 'lib/citation_format.rb', line 13
-
-def full_name
-  given_name_part + middle_name_part + sur_name_part + suffix_text
-end
-
-
- -
-

- - - (Object) middle_initial - - - - - -

- - - - -
-
-
-
-21
-22
-23
-
-
# File 'lib/citation_format.rb', line 21
-
-def middle_initial
-  middle_name[0..0].upcase
-end
-
-
- -
-

- - - (Object) name - - - - - -

- - - - -
-
-
-
-41
-42
-43
-44
-45
-46
-47
-
-
# File 'lib/citation_format.rb', line 41
-
-def name
-  given  = " #{given_name}".presence
-  middle = " #{middle_name}".presence
-  given_and_middle = given || middle ? "," + given.to_s + middle.to_s : ""
-
-  sur_name.to_s + given_and_middle + suffix_text
-end
-
-
- -
-

- - - (Object) name=(name_string = '') - - - - - -

- - - - -
-
-
-
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-
-
# File 'lib/citation_format.rb', line 59
-
-def name=(name_string='')
-  if name_string.match(/^_/) 
-    self.sur_name = name_string[1..-1]
-  else
-    name_array = name_string.split(',')
-    name_array = extract_suffix(name_array)
-    if name_array.count == 1
-      treat_as_first_middle_last(name_array)
-    else
-      treat_as_last_first_middle(name_array)
-    end
-  end
-end
-
-
- -
-

- - - (Object) suffix_text - - - - - -

- - - - -
-
-
-
-37
-38
-39
-
-
# File 'lib/citation_format.rb', line 37
-
-def suffix_text
-  has_suffix? ? suffix : ''
-end
-
-
- -
-

- - - (Object) treat_as_first_middle_last(name_array) - - - - - -

- - - - -
-
-
-
-73
-74
-75
-76
-77
-78
-
-
# File 'lib/citation_format.rb', line 73
-
-def treat_as_first_middle_last(name_array)
-  name_array = name_array[0].split.collect {|part| part.split('.') }.flatten
-  self.given_name = name_array.slice!(0)
-  self.sur_name = name_array.slice!(-1)
-  self.middle_name = name_array.join(' ')
-end
-
-
- -
-

- - - (Object) treat_as_last_first_middle(name_array) - - - - - -

- - - - -
-
-
-
-80
-81
-82
-83
-84
-85
-
-
# File 'lib/citation_format.rb', line 80
-
-def treat_as_last_first_middle(name_array)
-  self.sur_name = name_array.slice!(0)
-  name_array = name_array[0].split.collect {|part| part.split('.') }.flatten
-  self.given_name = name_array.slice!(0)
-  self.middle_name = name_array.join(' ')
-end
-
-
- -
- -
- - - - - \ No newline at end of file diff --git a/doc/CitationType.html b/doc/CitationType.html deleted file mode 100644 index 298b59337..000000000 --- a/doc/CitationType.html +++ /dev/null @@ -1,123 +0,0 @@ - - - - - - Class: CitationType - - — Documentation by YARD 0.8.7.6 - - - - - - - - - - - - - - - - - - - - - -

Class: CitationType - - - -

- -
- -
Inherits:
-
- ActiveRecord::Base - -
    -
  • Object
  • - - - - - -
- show all - -
- - - - - - - - - -
Defined in:
-
app/models/citation_type.rb
- -
-
- - - - - - - - - - - -
- - - - - \ No newline at end of file diff --git a/doc/CitationsController.html b/doc/CitationsController.html deleted file mode 100644 index 98fb18d18..000000000 --- a/doc/CitationsController.html +++ /dev/null @@ -1,1169 +0,0 @@ - - - - - - Class: CitationsController - - — Documentation by YARD 0.8.7.6 - - - - - - - - - - - - - - - - - - - - - -

Class: CitationsController - - - -

- -
- -
Inherits:
-
- ApplicationController - - - show all - -
- - - - - - - - - -
Defined in:
-
app/controllers/citations_controller.rb
- -
-
- - - - - - - - - -

- Instance Method Summary - (collapse) -

- - - - - - - - - - - - - - -
-

Instance Method Details

- - -
-

- - - (Object) biblio - - - - - -

- - - - -
-
-
-
-156
-157
-
-
# File 'app/controllers/citations_controller.rb', line 156
-
-def biblio
-end
-
-
- -
-

- - - (Object) bibliography - - - - - -

- - - - -
-
-
-
-159
-160
-161
-162
-
-
# File 'app/controllers/citations_controller.rb', line 159
-
-def bibliography
-  date = params[:date].presence
-  @citations = date ? Citation.by_date(date) : Citation.all
-end
-
-
- -
-

- - - (Object) create - - - - - -

- - - - -
-
-
-
-117
-118
-119
-120
-121
-122
-123
-124
-
-
# File 'app/controllers/citations_controller.rb', line 117
-
-def create
-  citation_class = params[:citation].try(:delete, :type)
-  @citation = website.citations.new(citation_params)
-  @citation.type = citation_class
-  flash[:notice] = 'Citation was successfully created.' if @citation.save
-
-  respond_with @citation
-end
-
-
- -
-

- - - (Object) destroy - - - - - -

- - - - -
-
-
-
-164
-165
-166
-167
-168
-169
-
-
# File 'app/controllers/citations_controller.rb', line 164
-
-def destroy
-  @citation = Citation.find(params[:id])
-  @citation.destroy
-
-  respond_with @citation, :location=>citations_url
-end
-
-
- -
-

- - - (Object) download - - - - - -

- - - - -
-
-
-
-138
-139
-140
-141
-142
-143
-144
-145
-146
-147
-148
-149
-150
-151
-152
-153
-154
-
-
# File 'app/controllers/citations_controller.rb', line 138
-
-def download
-  head(:not_found) and return unless (citation = Citation.find_by_id(params[:id]))
-  deny_access and return unless citation.open_access || signed_in?
-
-  path = citation.pdf.path(params[:style])
-  if Rails.env.production?
-    if citation.open_access
-      #TODO make this work accross domains not just with lter
-      redirect_to("https://lter.kbs.msu.edu/open-access"+ citation.pdf.path.gsub(/ /, '+'))
-      #redirect_to(citation.pdf.s3_object(params[:style]).public_url.to_s)
-    else
-      redirect_to(citation.pdf.s3_object(params[:style]).url_for(:read ,:secure => true, :expires_in => 10.seconds).to_s)
-    end
-  else
-    send_file  path, :type => 'application/pdf', :disposition => 'inline'
-  end
-end
-
-
- -
-

- - - (Object) edit - - - - - -

- - - - -
-
-
-
-126
-127
-128
-
-
# File 'app/controllers/citations_controller.rb', line 126
-
-def edit
-  @citation = Citation.find(params[:id])
-end
-
-
- -
-

- - - (Object) filtered - - - - - -

- - - - -
-
-
-
-89
-90
-91
-92
-93
-94
-95
-96
-97
-98
-
-
# File 'app/controllers/citations_controller.rb', line 89
-
-def filtered
-  @type = params[:type]
-  @sort_by = params[:sort_by]
-  @citations = apply_scopes(website.citations)
-  @submitted_citations = @citations.
-  @forthcoming_citations = @citations.forthcoming
-  @citations = @citations.published
-
-  index_responder
-end
-
-
- -
-

- - - (Object) find_by_doi - - - - - -

- - - - -
-
-
-
-85
-86
-87
-
-
# File 'app/controllers/citations_controller.rb', line 85
-
-def find_by_doi
-  @citation = CitationFactory.from_doi(params[:doi])
-end
-
-
- -
-

- - - (Object) index - - - - - -

- - - - -
-
-
-
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-36
-37
-38
-39
-40
-41
-42
-43
-44
-45
-46
-47
-48
-
-
# File 'app/controllers/citations_controller.rb', line 13
-
-def index
-  store_location
-  case params[:type]
-  when 'article' 
-    citations = [website.article_citations]
-    @type = 'ArticleCitation'
-  when 'book'
-    citations = [website.citations.bookish]
-    @type = 'BookCitation'
-  when 'thesis'
-    citations = [website.thesis_citations]
-    @type = 'ThesisCitation'
-  when 'report'
-    citations = [website.report_citations]
-    @type = 'ReportCitation'
-  when 'bulletin'
-    citations = [website.bulletin_citations]
-    @type = 'BulletinCitation'
-  else 
-    @type = nil
-    # citations = [website.article_citations, website.book_citations, website.chapter_citations, website.thesis_citations]
-    citations = [website.citations.publications]
-  end
-
-  if params[:treatment]
-    @study= Study.find(params[:treatment])
-    citations = [Citation.from_website(website.id).by_treatment(params[:treatment])]
-  end
-
-  @submitted_citations = citations.collect {|c| c.}.flatten
-  @forthcoming_citations = citations.collect {|c| c.forthcoming}.flatten
-  date = params[:date].presence
-  @citations = date ? citations.collect {|c| c.by_date(date)}.flatten : citations.collect {|c| c.published}.flatten
-
-  index_responder
-end
-
-
- -
-

- - - (Object) index_by_author - - - - - -

- - - - -
-
-
-
-66
-67
-68
-69
-70
-
-
# File 'app/controllers/citations_controller.rb', line 66
-
-def index_by_author
-    citations = [website.citations.publications]
-    @citations = citations.collect {|c| c.includes(:authors).references(:authors).published}.flatten.sort {|a,b| a.authors.first.try(:sur_name) <=> b.authors.first.try(:sur_name) }
-    index_responder
-end
-
-
- -
-

- - - (Object) index_by_treatment - - - - - -

- - - - -
-
-
-
-56
-57
-58
-59
-60
-61
-62
-63
-64
-
-
# File 'app/controllers/citations_controller.rb', line 56
-
-def index_by_treatment
-  @studies = Study.by_id
-
-  #@treatments  = Treatment.find(:all, :order => 'priority')
-  respond_to do |format|
-    format.html 
-    format.xml {render  :xml => @studies.to_xml}
-  end
-end
-
-
- -
-

- - - (Object) new - - - - - -

- - - - -
-
-
-
-112
-113
-114
-115
-
-
# File 'app/controllers/citations_controller.rb', line 112
-
-def new
-  @citation = Citation.new
-  @citation.type = 'ArticleCitation'
-end
-
-
- -
-

- - - (Object) search - - - - - -

- - - - -
-
-
-
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-
-
# File 'app/controllers/citations_controller.rb', line 72
-
-def search
-  @word = params[:word]
-  if @word.present?
-    @word.sub!(/\?|~|\\|\*|@|(?:=>)/, "")
-  end
-  if @word.empty?
-    redirect_to citations_url
-  else
-    @citations = Citation.search @word, with: { website_id: website.id }, order: "pub_year desc", star: true, per_page: 500
-    index_responder
-  end
-end
-
-
- -
-

- - - (Object) show - - - - - -

- - - - -
-
-
-
-100
-101
-102
-103
-104
-105
-106
-107
-108
-109
-110
-
-
# File 'app/controllers/citations_controller.rb', line 100
-
-def show
-  @citation = Citation.find(params[:id].to_i)
-  @website = website
-  store_location
-  file_title = @citation.file_title
-  respond_to do |format|
-    format.html
-    format.enw { send_data @citation.to_enw, :filename => "#{file_title}.enw" }
-    format.bib { send_data @citation.to_bib, :filename => "#{file_title}.bib" }
-  end
-end
-
-
- -
-

- - - (Object) submitted - - - - - -

- - - - -
-
-
-
-50
-51
-52
-53
-54
-
-
# File 'app/controllers/citations_controller.rb', line 50
-
-def  
-    citations = [website.citations.publications]
-    @citations = citations.collect {|c| c.}.flatten
-    index_responder
-end
-
-
- -
-

- - - (Object) update - - - - - -

- - - - -
-
-
-
-130
-131
-132
-133
-134
-135
-136
-
-
# File 'app/controllers/citations_controller.rb', line 130
-
-def update
-  @citation = Citation.find(params[:id])
-  @citation.type = params[:citation].try(:delete, 'type')
-  @citation.update_attributes(citation_params)
-  @citation.touch
-  respond_with @citation, :location=>citation_url
-end
-
-
- -
- -
- - - - - \ No newline at end of file diff --git a/doc/CitationsHelper.html b/doc/CitationsHelper.html deleted file mode 100644 index 886b6cd94..000000000 --- a/doc/CitationsHelper.html +++ /dev/null @@ -1,182 +0,0 @@ - - - - - - Module: CitationsHelper - - — Documentation by YARD 0.8.7.6 - - - - - - - - - - - - - - - - - - - - - -

Module: CitationsHelper - - - -

- -
- - - - - - - - -
Defined in:
-
app/helpers/citations_helper.rb
- -
-
- - - - - - - - - -

- Instance Method Summary - (collapse) -

- - - - - - -
-

Instance Method Details

- - -
-

- - - (Object) publication_url(citation) - - - - - -

- - - - -
-
-
-
-2
-3
-4
-5
-6
-7
-8
-
-
# File 'app/helpers/citations_helper.rb', line 2
-
-def publication_url(citation) 
-  if citation.open_access
-    download_citation_url(citation) + "/#{citation.pdf_file_name}"
-  else
-    download_citation_url(citation)
-  end
-end
-
-
- -
- -
- - - - - \ No newline at end of file diff --git a/doc/ClimdbController.html b/doc/ClimdbController.html deleted file mode 100644 index aac3d0721..000000000 --- a/doc/ClimdbController.html +++ /dev/null @@ -1,221 +0,0 @@ - - - - - - Class: ClimdbController - - — Documentation by YARD 0.8.7.6 - - - - - - - - - - - - - - - - - - - - - -

Class: ClimdbController - - - -

- -
- -
Inherits:
-
- ApplicationController - - - show all - -
- - - - - - - - - -
Defined in:
-
app/controllers/climdb_controller.rb
- -
-
- -

Overview

-
- -

This controller is here because climdb only allows one url per site, so i -needed some way to aggreagte the different weather datasets on this side.

- - -
-
-
- - -
- - - - - - - -

- Instance Method Summary - (collapse) -

- - - - - - - - - - - - - - -
-

Instance Method Details

- - -
-

- - - (Object) index - - - - - -

- - - - -
-
-
-
-6
-7
-8
-9
-10
-11
-12
-
-
# File 'app/controllers/climdb_controller.rb', line 6
-
-def index
-  lterws = Datatable.find(175)
-  coopws = Datatable.find(300)
-  kzoo   = Datatable.find(301)
-  @data = lterws.to_climdb + coopws.to_climdb + kzoo.to_climdb
-  @data.delete("\n\n")
-end
-
-
- -
- -
- - - - - \ No newline at end of file diff --git a/doc/Collection.html b/doc/Collection.html deleted file mode 100644 index 20d5716a4..000000000 --- a/doc/Collection.html +++ /dev/null @@ -1,504 +0,0 @@ - - - - - - Class: Collection - - — Documentation by YARD 0.8.7.6 - - - - - - - - - - - - - - - - - - - - - -

Class: Collection - - - -

- -
- -
Inherits:
-
- ActiveRecord::Base - -
    -
  • Object
  • - - - - - -
- show all - -
- - - - - - - - - -
Defined in:
-
app/models/collection.rb
- -
-
- - - - - - - - - -

- Instance Method Summary - (collapse) -

- - - - - - - -
-

Instance Method Details

- - -
-

- - - (Object) dataset - - - - - -

- - - - -
-
-
-
-6
-7
-8
-
-
# File 'app/models/collection.rb', line 6
-
-def dataset
-  self.datatable.dataset
-end
-
-
- -
-

- - - (Object) keywords - - - - - -

- - - - -
-
-
-
-10
-11
-12
-
-
# File 'app/models/collection.rb', line 10
-
-def keywords
-  self.datatable.keywords
-end
-
-
- -
-

- - - (Object) perform_query - - - - - -

- - - - -
-
-
-
-14
-15
-16
-
-
# File 'app/models/collection.rb', line 14
-
-def perform_query
-  datatable.perform_query
-end
-
-
- -
-

- - - (Object) protocols - - - - - -

- - - - -
-
-
-
-18
-19
-20
-
-
# File 'app/models/collection.rb', line 18
-
-def protocols
-  self.dataset.protocols
-end
-
-
- -
-

- - - (Object) title_and_years - - - - - -

- - - - -
-
-
-
-22
-23
-24
-
-
# File 'app/models/collection.rb', line 22
-
-def title_and_years
-  self.datatable.title_and_years
-end
-
-
- -
-

- - - (Object) values - - - - - -

- - - - -
-
-
-
-26
-27
-28
-
-
# File 'app/models/collection.rb', line 26
-
-def values
-  @values ||= self.perform_query
-end
-
-
- -
-

- - - (Object) variates - - - - - -

- - - - -
-
-
-
-30
-31
-32
-
-
# File 'app/models/collection.rb', line 30
-
-def variates
-  self.datatable.variates
-end
-
-
- -
- -
- - - - - \ No newline at end of file diff --git a/doc/CollectionsController.html b/doc/CollectionsController.html deleted file mode 100644 index 1d4958bbb..000000000 --- a/doc/CollectionsController.html +++ /dev/null @@ -1,267 +0,0 @@ - - - - - - Class: CollectionsController - - — Documentation by YARD 0.8.7.6 - - - - - - - - - - - - - - - - - - - - - -

Class: CollectionsController - - - -

- -
- -
Inherits:
-
- ApplicationController - - - show all - -
- - - - - - - - - -
Defined in:
-
app/controllers/collections_controller.rb
- -
-
- -

Overview

-
- -

This controller allows searching and sorting of a datatable's data -through a “collection” of its data.

- - -
-
-
- - -
- - - - - - - -

- Instance Method Summary - (collapse) -

- - - - - - - - - - - - - - -
-

Instance Method Details

- - -
-

- - - (Object) index - - - - - -

- - - - -
-
-
-
-7
-8
-9
-
-
# File 'app/controllers/collections_controller.rb', line 7
-
-def index
-  @collections = Collection.all
-end
-
-
- -
-

- - - (Object) show - - - - - -

- - - - -
-
-
-
-11
-12
-13
-14
-
-
# File 'app/controllers/collections_controller.rb', line 11
-
-def show
-  @collection = Collection.find(params[:id])
-  @customizer = Customizer.new(params, @collection.values)
-end
-
-
- -
- -
- - - - - \ No newline at end of file diff --git a/doc/ConferenceCitation.html b/doc/ConferenceCitation.html deleted file mode 100644 index 1056a06b4..000000000 --- a/doc/ConferenceCitation.html +++ /dev/null @@ -1,137 +0,0 @@ - - - - - - Class: ConferenceCitation - - — Documentation by YARD 0.8.7.6 - - - - - - - - - - - - - - - - - - - - - -

Class: ConferenceCitation - - - -

- -
- -
Inherits:
-
- Citation - -
    -
  • Object
  • - - - - - - - -
- show all - -
- - - - - - - - - -
Defined in:
-
app/models/conference_citation.rb
- -
-
- - - - - - - - - - - - - - - -

Method Summary

- -

Methods inherited from Citation

-

#author_block, #author_block=, #authors_from_ris_authors, #bib_hash, #book?, by_date, by_treatment, by_type, citation_from_ris_stanza, #date_from_ris_date, #editor_block, #editor_block=, #file_title, #formatted, from_ris, from_website, #get_attribute_from_ris_stanza, #get_attributes_from_ris_stanza, #make_pdf_private, #make_pdf_public, #page_number_from_ris, #pdf_from_ris_pdf, select_options, #short_author_string, sorted_by, #to_bib, to_bib, to_enw, #to_enw, #treat_as_token_list, type_from_ris_type

- - - - -
- - - - - \ No newline at end of file diff --git a/doc/CoreArea.html b/doc/CoreArea.html deleted file mode 100644 index 74d598315..000000000 --- a/doc/CoreArea.html +++ /dev/null @@ -1,123 +0,0 @@ - - - - - - Class: CoreArea - - — Documentation by YARD 0.8.7.6 - - - - - - - - - - - - - - - - - - - - - -

Class: CoreArea - - - -

- -
- -
Inherits:
-
- ActiveRecord::Base - -
    -
  • Object
  • - - - - - -
- show all - -
- - - - - - - - - -
Defined in:
-
app/models/core_area.rb
- -
-
- - - - - - - - - - - -
- - - - - \ No newline at end of file diff --git a/doc/Customizer.html b/doc/Customizer.html deleted file mode 100644 index 3620c068b..000000000 --- a/doc/Customizer.html +++ /dev/null @@ -1,1329 +0,0 @@ - - - - - - Class: Customizer - - — Documentation by YARD 0.8.7.6 - - - - - - - - - - - - - - - - - - - - - -

Class: Customizer - - - -

- -
- -
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
- - - - - - - - - -
Defined in:
-
lib/customizer.rb
- -
-
- -

Overview

-
- -

Allows customization of search results without using javascript

- - -
-
-
- - -
- - - - - - - -

- Class Method Summary - (collapse) -

- - - -

- Instance Method Summary - (collapse) -

- - - - -
-

Constructor Details

- -
-

- - - (Customizer) initialize(params, values) - - - - - -

-
- -

Returns a new instance of Customizer

- - -
-
-
- - -
- - - - -
-
-
-
-3
-4
-5
-6
-
-
# File 'lib/customizer.rb', line 3
-
-def initialize(params, values)
-  @params = params
-  @values = values
-end
-
-
- -
- - -
-

Class Method Details

- - -
-

- - + (Object) normalize(array) - - - - - -

-
- -

Class Methods#

- - -
-
-
- - -
- - - - -
-
-
-
-10
-11
-12
-13
-14
-
-
# File 'lib/customizer.rb', line 10
-
-def self.normalize(array)
-  array.compact!
-  array.uniq!
-  array.sort!
-end
-
-
- -
- -
-

Instance Method Details

- - -
-

- - - (Boolean) accepts?(row) - - - - - -

-
- -

Instance Methods#

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-18
-19
-20
-21
-22
-23
-
-
# File 'lib/customizer.rb', line 18
-
-def accepts?(row)
-  value = row[self.limitby]
-  self.accepts_by_contains?(value) &&
-      self.accepts_by_max(value) &&
-      self.accepts_by_min(value) rescue true
-end
-
-
- -
-

- - - (Boolean) accepts_by_contains?(value) - - - - - -

-
- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-25
-26
-27
-
-
# File 'lib/customizer.rb', line 25
-
-def accepts_by_contains?(value)
-  self.contains.blank? || value.casecmp(self.contains) == 0
-end
-
-
- -
-

- - - (Object) accepts_by_max(value) - - - - - -

- - - - -
-
-
-
-29
-30
-31
-
-
# File 'lib/customizer.rb', line 29
-
-def accepts_by_max(value)
-  self.limit_max.blank? || value.casecmp(self.limit_max) <= 0
-end
-
-
- -
-

- - - (Object) accepts_by_min(value) - - - - - -

- - - - -
-
-
-
-33
-34
-35
-
-
# File 'lib/customizer.rb', line 33
-
-def accepts_by_min(value)
-  self.limit_min.blank? || value.casecmp(self.limit_min) >= 0
-end
-
-
- -
-

- - - (Object) contains - - - - - -

- - - - -
-
-
-
-74
-75
-76
-
-
# File 'lib/customizer.rb', line 74
-
-def contains
-  @params[:contains] unless self.new_limitby?
-end
-
-
- -
-

- - - (Object) customize - - - - - -

- - - - -
-
-
-
-37
-38
-39
-
-
# File 'lib/customizer.rb', line 37
-
-def customize
-  @params[:custom]
-end
-
-
- -
-

- - - (Object) limit_max - - - - - -

- - - - -
-
-
-
-61
-62
-63
-
-
# File 'lib/customizer.rb', line 61
-
-def limit_max
-  @params[:limit_max] unless self.new_limitby?
-end
-
-
- -
-

- - - (Object) limit_min - - - - - -

- - - - -
-
-
-
-57
-58
-59
-
-
# File 'lib/customizer.rb', line 57
-
-def limit_min
-  @params[:limit_min] unless self.new_limitby?
-end
-
-
- -
-

- - - (Object) limitby - - - - - -

- - - - -
-
-
-
-41
-42
-43
-
-
# File 'lib/customizer.rb', line 41
-
-def limitby
-  @params[:limitby]
-end
-
-
- -
-

- - - (Object) limitoptions - - - - - -

- - - - -
-
-
-
-45
-46
-47
-
-
# File 'lib/customizer.rb', line 45
-
-def limitoptions
-  @limitoptions ||= self.setlimitoptions
-end
-
-
- -
-

- - - (Object) limitrange - - - - - -

- - - - -
-
-
-
-65
-66
-67
-
-
# File 'lib/customizer.rb', line 65
-
-def limitrange
-  @limitrange ||= self.setlimitrange
-end
-
-
- -
-

- - - (Boolean) new_limitby? - - - - - -

-
- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-82
-83
-84
-
-
# File 'lib/customizer.rb', line 82
-
-def new_limitby?
-  self.limitby != self.oldlimitby
-end
-
-
- -
-

- - - (Object) oldlimitby - - - - - -

- - - - -
-
-
-
-78
-79
-80
-
-
# File 'lib/customizer.rb', line 78
-
-def oldlimitby
-  @params[:oldlimitby] || self.limitby
-end
-
-
- -
-

- - - (Object) setlimitoptions - - - - - -

- - - - -
-
-
-
-49
-50
-51
-52
-53
-54
-55
-
-
# File 'lib/customizer.rb', line 49
-
-def setlimitoptions
-  limitoptions = @values.fields.collect do |field|
-    next if field == "id"
-    [field.titleize, field]
-  end
-  limitoptions = Customizer.normalize(limitoptions)
-end
-
-
- -
-

- - - (Object) setlimitrange - - - - - -

- - - - -
-
-
-
-69
-70
-71
-72
-
-
# File 'lib/customizer.rb', line 69
-
-def setlimitrange
-  limitrange = @values.collect {|row| row[self.limitby]}
-  limitrange = Customizer.normalize(limitrange)
-end
-
-
- -
-

- - - (Object) sort_direction - - - - - -

- - - - -
-
-
-
-90
-91
-92
-
-
# File 'lib/customizer.rb', line 90
-
-def sort_direction
-  @params[:sort_direction]
-end
-
-
- -
-

- - - (Object) sortby - - - - - -

- - - - -
-
-
-
-86
-87
-88
-
-
# File 'lib/customizer.rb', line 86
-
-def sortby
-  @params[:sortby]
-end
-
-
- -
-

- - - (Object) sorted_values - - - - - -

- - - - -
-
-
-
-94
-95
-96
-97
-
-
# File 'lib/customizer.rb', line 94
-
-def sorted_values
-  values = @values.sort {|firstrow, secondrow| firstrow[self.sortby]<=>secondrow[self.sortby] rescue 0}
-  self.sort_direction == "Descending" ? values.reverse : values
-end
-
-
- -
- -
- - - - - \ No newline at end of file diff --git a/doc/DataContribution.html b/doc/DataContribution.html deleted file mode 100644 index 8c8f65fd5..000000000 --- a/doc/DataContribution.html +++ /dev/null @@ -1,123 +0,0 @@ - - - - - - Class: DataContribution - - — Documentation by YARD 0.8.7.6 - - - - - - - - - - - - - - - - - - - - - -

Class: DataContribution - - - -

- -
- -
Inherits:
-
- ActiveRecord::Base - -
    -
  • Object
  • - - - - - -
- show all - -
- - - - - - - - - -
Defined in:
-
app/models/data_contribution.rb
- -
-
- - - - - - - - - - - -
- - - - - \ No newline at end of file diff --git a/doc/DataQuery.html b/doc/DataQuery.html deleted file mode 100644 index 710dd7bcb..000000000 --- a/doc/DataQuery.html +++ /dev/null @@ -1,326 +0,0 @@ - - - - - - Class: DataQuery - - — Documentation by YARD 0.8.7.6 - - - - - - - - - - - - - - - - - - - - - -

Class: DataQuery - - - -

- -
- -
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
- - - - - - - - - -
Defined in:
-
app/models/data_query.rb
- -
-
- -

Overview

-
- -

WARNING this is postgres specific

- - -
-
-
- - -
- - - - - - - -

- Class Method Summary - (collapse) -

- - - - - - -
-

Class Method Details

- - -
-

- - + (Object) find(query) - - - - - -

- - - - -
-
-
-
-18
-19
-20
-
-
# File 'app/models/data_query.rb', line 18
-
-def self.find(query)
-  ActiveRecord::Base.connection.execute(query)
-end
-
-
- -
-

- - + (Object) find_in_batches_as_csv(query, options = {}) - - - - - -

- - - - -
-
-
-
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-
-
# File 'app/models/data_query.rb', line 5
-
-def self.find_in_batches_as_csv(query, options={})
-  options.assert_valid_keys(:start, :batch_size)
-
-  start = options[:start]
-  batch_size = options[:batch_size] || 500
-
-  count = ActiveRecord::Base.connection.execute("Select count(*) as c from (#{query}) as foo").values.flatten.first.to_i
-  (0..count).step(batch_size) do |offset|
-    batch_query = "Select * from (#{query}) as foo limit #{batch_size} offset #{offset}"
-    yield  self.to_csv_rows(self.find(batch_query))
-  end
-end
-
-
- -
-

- - + (Object) to_csv_rows(results) - - - - - -

- - - - -
-
-
-
-22
-23
-24
-25
-26
-
-
# File 'app/models/data_query.rb', line 22
-
-def self.to_csv_rows(results)
-  results.collect do |row|
-    CSV::Row.new(row.keys, row.values).to_s
-  end.join
-end
-
-
- -
- -
- - - - - \ No newline at end of file diff --git a/doc/Dataset.html b/doc/Dataset.html deleted file mode 100644 index 1f87fe219..000000000 --- a/doc/Dataset.html +++ /dev/null @@ -1,2997 +0,0 @@ - - - - - - Class: Dataset - - — Documentation by YARD 0.8.7.6 - - - - - - - - - - - - - - - - - - - - - -

Class: Dataset - - - -

- -
- -
Inherits:
-
- ActiveRecord::Base - -
    -
  • Object
  • - - - - - -
- show all - -
- - - - - - - - - -
Defined in:
-
app/models/dataset.rb,
- lib/load_theme_affiliations.rb
-
- -
-
- - - - - - - - - -

- Class Method Summary - (collapse) -

- - - -

- Instance Method Summary - (collapse) -

- - - - - - - -
-

Class Method Details

- - -
-

- - + (Object) from_eml(eml_text) - - - - - -

- - - - -
-
-
-
-36
-37
-38
-39
-40
-41
-42
-43
-44
-
-
# File 'app/models/dataset.rb', line 36
-
-def self.from_eml(eml_text)
-  if eml_text.start_with?('http://')
-    eml_doc = Nokogiri::XML(open(eml_text))
-  else
-    eml_doc = Nokogiri::XML(eml_text)
-  end
-
-  validation_errors(eml_doc).presence || self.new.from_eml(eml_doc)
-end
-
-
- -
-

- - + (Object) from_eml_file(file) - - - - - -

- - - - -
-
-
-
-32
-33
-34
-
-
# File 'app/models/dataset.rb', line 32
-
-def self.from_eml_file(file)
-  from_eml(file.read)
-end
-
-
- -
-

- - + (Object) validation_errors(eml_doc) - - - - - -

- - - - -
-
-
-
-46
-47
-48
-49
-50
-51
-52
-53
-
-
# File 'app/models/dataset.rb', line 46
-
-def self.validation_errors(eml_doc)
-  xsd = nil
-  Dir.chdir("#{Rails.root}/test/data/eml-2.1.0") do
-    xsd = Nokogiri::XML::Schema(File.read('eml.xsd'))
-  end
-
-  xsd.validate(eml_doc)
-end
-
-
- -
- -
-

Instance Method Details

- - -
-

- - - (Object) associated_models_from_eml(dataset_eml) - - - - - -

- - - - -
-
-
-
-433
-434
-435
-436
-437
-438
-439
-440
-441
-442
-443
-444
-445
-446
-447
-448
-449
-450
-451
-
-
# File 'app/models/dataset.rb', line 433
-
-def associated_models_from_eml(dataset_eml)
-  dataset_eml.parent.css('methods methodStep protocol').each do |protocol_eml|
-    self.protocols << Protocol.from_eml(protocol_eml)
-  end
-
-  dataset_eml.css('associatedParty').each do |person_eml|
-    self.people << Person.from_eml(person_eml)
-  end
-
-  dataset_eml.css('dataTable').each do |datatable_eml|
-    self.datatables.new.from_eml(datatable_eml)
-  end
-
-  dataset_eml.css('keywordSet keyword').each do |keyword_eml|
-    self.keyword_list << keyword_eml.text
-  end
-
-  save
-end
-
-
- -
-

- - - (Object) basic_attributes_from_eml(dataset_eml) - - - - - -

- - - - -
-
-
-
-425
-426
-427
-428
-429
-430
-431
-
-
# File 'app/models/dataset.rb', line 425
-
-def basic_attributes_from_eml(dataset_eml)
-  self.title = dataset_eml.at_css('title').text
-  self.abstract = dataset_eml.css('abstract para').text
-  self.initiated = dataset_eml.css('temporalCoverage rangeOfDates beginDate calendarDate').text
-  self.completed = dataset_eml.css('temporalCoverage rangeOfDates endDate calendarDate').text
-  save
-end
-
-
- -
-

- - - (Object) begin_date - - - - - -

- - - - -
-
-
-
-157
-158
-159
-
-
# File 'app/models/dataset.rb', line 157
-
-def begin_date
-  self.initiated || '1988-1-1'
-end
-
-
- -
-

- - - (Object) contact_info - - - - - -

- - - - -
-
-
-
-374
-375
-376
-377
-378
-379
-380
-381
-382
-383
-384
-385
-386
-387
-388
-
-
# File 'app/models/dataset.rb', line 374
-
-def contact_info
-  @eml.contact do
-    @eml.organizationName 'Kellogg Biological Station'
-    @eml.positionName 'Data Manager'
-    p = Person.new( organization:   'Kellogg Biological Station',
-                    street_address: '3700 East Gull Lake Drive',
-                    city:           'Hickory Corners',
-                    locale:         'Mi',
-                    postal_code:    '49060',
-                    country:        'USA')
-    p.eml_address(@eml)
-    @eml.electronicMailAddress 'lter.data.manager@kbs.msu.edu'
-    @eml.onlineUrl 'http://lter.kbs.msu.edu'
-  end
-end
-
-
- -
-

- - - (Object) core_areas - - - - - -

- - - - -
-
-
-
-184
-185
-186
-
-
# File 'app/models/dataset.rb', line 184
-
-def core_areas
-  datatables.map {|x| x.core_areas }.flatten.uniq
-end
-
-
- -
-

- - - (Object) creators - - - - - -

- - - - -
-
-
-
-179
-180
-181
-182
-
-
# File 'app/models/dataset.rb', line 179
-
-def creators
-  datatable_leads = datatables.collect {|x| x.leads}.compact
-  [leads, datatable_leads].flatten.uniq.compact
-end
-
-
- -
-

- - - (Object) custom_units - - - - - -

- - - - -
-
-
-
-169
-170
-171
-172
-173
-174
-175
-176
-177
-
-
# File 'app/models/dataset.rb', line 169
-
-def custom_units
-  self.datatables.collect do | datatable |
-    datatable.variates.collect do | variate |
-      next unless variate.unit
-      next if variate.unit.in_eml
-      variate.unit
-    end
-  end.flatten.compact.uniq
-end
-
-
- -
-

- - - (Object) datatable_people - - - - - -

- - - - -
-
-
-
-76
-77
-78
-
-
# File 'app/models/dataset.rb', line 76
-
-def datatable_people
-  datatables.collect { |table| table.datatable_personnel.keys }.flatten
-end
-
-
- -
-

- - - (Object) datatable_protocols - - - - - -

- - - - -
-
-
-
-119
-120
-121
-
-
# File 'app/models/dataset.rb', line 119
-
-def datatable_protocols
-  datatables.where(:on_web => true).collect {|datatable| datatable.protocols}
-end
-
-
- -
-

- - - (Object) date_range - - - - - -

- - - - -
-
-
-
-285
-286
-287
-288
-289
-290
-291
-292
-293
-294
-295
-296
-
-
# File 'app/models/dataset.rb', line 285
-
-def date_range
-  daterange = temporal_extent
-  starting = daterange[:begin_date]
-  ending   = daterange[:end_date]
-  if starting && ending
-    " (#{starting.year} to #{ending.year})"
-  elsif starting
-    " (#{starting.year})"
-  else
-    ""
-  end
-end
-
-
- -
-

- - - (Object) eml_abstract - - - - - -

- - - - -
-
-
-
-325
-326
-327
-328
-329
-330
-331
-332
-333
-334
-335
-336
-337
-
-
# File 'app/models/dataset.rb', line 325
-
-def eml_abstract
-  if abstract
-    unless abstract.empty?
-      @eml.abstract do
-        @eml.section do 
-          @eml.title 'Dataset Abstract'
-          @eml.para EML.text_sanitize(textilize(abstract))
-          @eml.para "original data source http://lter.kbs.msu.edu/datasets/#{id}"
-        end
-      end
-    end
-  end
-end
-
-
- -
-

- - - (Object) eml_access - - - - - -

- - - - -
-
-
-
-224
-225
-226
-227
-228
-229
-230
-231
-232
-
-
# File 'app/models/dataset.rb', line 224
-
-def eml_access
-  @eml.access scope: 'document', order: 'allowFirst', authSystem: 'knb' do
-    eml_allow('uid=KBS,o=lter,dc=ecoinformatics,dc=org', 'all')
-    eml_allow('uid=sbohm,o=lter,dc=ecoinformatics,dc=org', 'all')
-    if on_web
-      eml_allow('public','read')
-    end
-  end
-end
-
-
- -
-

- - - (Object) eml_allow(principal, permission) - - - - - -

- - - - -
-
-
-
-234
-235
-236
-237
-238
-239
-
-
# File 'app/models/dataset.rb', line 234
-
-def eml_allow(principal, permission)
-  @eml.allow do
-    @eml.principal principal
-    @eml.permission permission
-  end
-end
-
-
- -
-

- - - (Object) eml_coverage - - - - - -

- - - - -
-
-
-
-390
-391
-392
-393
-394
-395
-396
-397
-398
-399
-400
-401
-402
-403
-404
-405
-
-
# File 'app/models/dataset.rb', line 390
-
-def eml_coverage
-  @eml.coverage do 
-    @eml.geographicCoverage do
-      @eml.geographicDescription 'The areas around the Kellogg Biological Station in southwest Michigan'
-      @eml.boundingCoordinates do
-        @eml.westBoundingCoordinate -85.404699
-        @eml.eastBoundingCoordinate -85.366857
-        @eml.northBoundingCoordinate 42.420265
-        @eml.southBoundingCoordinate 42.391019
-      end
-    end
-    if initiated.present? && data_end_date.present?
-      eml_temporal_coverage
-    end
-  end
-end
-
-
- -
-

- - - (Object) eml_creator - - - - - -

- - - - -
-
-
-
-298
-299
-300
-301
-302
-303
-304
-305
-306
-307
-308
-309
-310
-
-
# File 'app/models/dataset.rb', line 298
-
-def eml_creator
-    if creators.empty?
-      @eml.creator do 
-        @eml.positionName 'Data Manager'
-      end
-    else
-      creators.each do |person|
-        @eml.creator do
-          person.eml_party(@eml)
-        end
-      end
-  end
-end
-
-
- -
-

- - - (Object) eml_custom_unit_list - - - - - -

-
- -

private

- - -
-
-
- - -
- - - - -
-
-
-
-190
-191
-192
-193
-194
-195
-196
-197
-198
-199
-200
-201
-202
-203
-204
-205
-206
-207
-208
-209
-210
-211
-212
-213
-214
-215
-216
-217
-218
-219
-220
-221
-222
-
-
# File 'app/models/dataset.rb', line 190
-
-def eml_custom_unit_list
-  @eml. do
-    @eml. do
-      @eml.tag!('stmml:unitList',
-                'xmlns:stmml'        => 'http://www.xml-cml.org/schema/stmml-1.1',
-                'xmlns'              => 'http://www.xml-cml.org/schema/stmml',
-                'xsi:schemaLocation' => 'http://www.xml-cml.org/schema/stmml-1.1 http://nis.lternet.edu/schemas/EML/eml-2.1.0/stmml.xsd') do
-        logger.info custom_units
-        custom_units.each do |unit|
-          case unit
-          when unit.multiplier_to_si  && unit.parent_si  &&  unit.unit_type then
-            @eml.tag!('stmml:unit',
-                      id:             unit.name,
-                      multiplierToSI: unit.multiplier_to_si,
-                      parentSI:       unit.parent_si,
-                      unitType:       unit.unit_type,
-                      name:           unit.name)
-          when unit.multiplier_to_si && unit.parent_si then
-            @eml.tag!('stmml:unit',
-                      id:             unit.name,
-                      multiplierToSI: unit.multiplier_to_si,
-                      parentSI:       unit.parent_si,
-                      name:           unit.name)
-          else
-            @eml.tag!('stmml:unit',
-                      id:   unit.name,
-                      name: unit.name)
-          end
-        end
-      end
-    end
-  end
-end
-
-
- -
-

- - - (Object) eml_dataset - - - - - -

- - - - -
-
-
-
-255
-256
-257
-258
-259
-260
-261
-262
-263
-264
-265
-
-
# File 'app/models/dataset.rb', line 255
-
-def eml_dataset
-  @eml.dataset 'id' => Rails.application.routes.url_helpers.dataset_path(self, :format => 'eml') do
-    eml_resource_group
-    contact_info
-    @eml.publisher do
-      @eml.organizationName "KBS LTER"
-    end
-    eml_methods
-    datatables.each { |table| table.to_eml(@eml) if table.on_web && table.valid_for_eml? && !table.is_restricted }
-  end
-end
-
-
- -
-

- - - (Object) eml_intellectual_rights - - - - - -

- - - - -
-
-
-
-279
-280
-281
-282
-283
-284
-
-
# File 'app/models/dataset.rb', line 279
-
-def eml_intellectual_rights
-  @eml.intellectualRights do
-    @eml.para "Data in the KBS LTER core database may not be published without written permission of the lead investigator or project director. These restrictions are intended mainly to preserve the primary investigators' rights to first publication and to ensure that data users are aware of the limitations that may be associated with any specific data set. These restrictions apply to both the baseline data set and to the data sets associated with specific LTER-supported subprojects."
-      @eml.para "All publications of KBS data and images must acknowledge KBS LTER support."
-  end
-end
-
-
- -
-

- - - (Object) eml_keyword_sets - - - - - -

- - - - -
-
-
-
-343
-344
-345
-346
-347
-348
-349
-350
-351
-352
-353
-354
-355
-356
-357
-358
-359
-360
-361
-362
-363
-364
-365
-366
-367
-368
-369
-370
-371
-372
-
-
# File 'app/models/dataset.rb', line 343
-
-def eml_keyword_sets
-  @eml.keywordSet do
-    place_keyword_set.each do| keyword |
-      @eml.keyword keyword, keywordType: 'place'
-    end
-  end
-  datatable_keywords = datatables.collect {|x| x.keyword_names}.flatten.uniq
-  unless datatable_keywords.empty?
-    @eml.keywordSet do
-      datatable_keywords.each do |keyword|
-        @eml.keyword keyword
-      end
-    end
-  end
-  if core_areas.present?
-    @eml.keywordSet do
-      core_areas.each do |keyword|
-        @eml.keyword  keyword.name
-      end
-      @eml.keywordThesaurus 'LTER Core Research Area'
-    end
-  end
-  if keyword_list.present?
-    @eml.keywordSet do
-      keyword_list.each do |keyword_tag|
-        @eml.keyword keyword_tag.to_s
-      end
-    end
-  end
-end
-
-
- -
-

- - - (Object) eml_methods - - - - - -

- - - - -
-
-
-
-245
-246
-247
-248
-249
-250
-251
-252
-253
-
-
# File 'app/models/dataset.rb', line 245
-
-def eml_methods
-  if eml_protocols.size > 0
-    @eml.methods do
-      eml_protocols.each do | protocol |
-        protocol.to_eml(@eml)
-      end
-    end
-  end
-end
-
-
- -
-

- - - (Object) eml_people - - - - - -

- - - - -
-
-
-
-316
-317
-318
-319
-320
-321
-322
-323
-
-
# File 'app/models/dataset.rb', line 316
-
-def eml_people
-  [people, datatable_people].flatten.uniq.compact.each do |person|
-    role = datatables.collect {|x| x.which_roles(person)}.flatten.compact.first
-    role = which_roles(person).first unless role
-    role_name = role.name if role
-    person.to_eml(@eml, role_name)
-  end
-end
-
-
- -
-

- - - (Object) eml_protocols - - - - - -

- - - - -
-
-
-
-241
-242
-243
-
-
# File 'app/models/dataset.rb', line 241
-
-def eml_protocols
-  (protocols + datatable_protocols).flatten.uniq.keep_if { |protocol| protocol.valid_for_eml? }
-end
-
-
- -
-

- - - (Object) eml_pubdate - - - - - -

- - - - -
-
-
-
-312
-313
-314
-
-
# File 'app/models/dataset.rb', line 312
-
-def eml_pubdate
-  @eml.pubDate Date.today
-end
-
-
- -
-

- - - (Object) eml_resource_group - - - - - -

- - - - -
-
-
-
-268
-269
-270
-271
-272
-273
-274
-275
-276
-277
-
-
# File 'app/models/dataset.rb', line 268
-
-def eml_resource_group
-  @eml.title title + " at the Kellogg Biological Station, Hickory Corners, MI " + date_range
-  eml_creator
-  eml_people
-  eml_pubdate
-  eml_abstract
-  eml_keyword_sets
-  eml_intellectual_rights
-  eml_coverage
-end
-
-
- -
-

- - - (Object) eml_temporal_coverage - - - - - -

- - - - -
-
-
-
-407
-408
-409
-410
-411
-412
-413
-414
-
-
# File 'app/models/dataset.rb', line 407
-
-def eml_temporal_coverage
-  @eml.temporalCoverage do
-    @eml.rangeOfDates do
-      @eml.beginDate { @eml.calendarDate initiated.to_s }
-      @eml.endDate   { @eml.calendarDate data_end_date.to_s }
-    end
-  end
-end
-
-
- -
-

- - - (Object) end_date - - - - - -

- - - - -
-
-
-
-161
-162
-163
-
-
# File 'app/models/dataset.rb', line 161
-
-def end_date
-  self.data_end_date || Date.today
-end
-
-
- -
-

- - - (Object) from_eml(eml_doc) - - - - - -

- - - - -
-
-
-
-55
-56
-57
-58
-59
-60
-61
-
-
# File 'app/models/dataset.rb', line 55
-
-def from_eml(eml_doc)
-  dataset_eml = eml_doc.css('dataset').first
-  basic_attributes_from_eml(dataset_eml)
-  associated_models_from_eml(dataset_eml)
-
-  self
-end
-
-
- -
-

- - - (Object) increment_version - - - - - -

- - - - -
-
-
-
-71
-72
-73
-74
-
-
# File 'app/models/dataset.rb', line 71
-
-def increment_version
-  self.version = self.version + 1
-  save
-end
-
-
- -
-

- - - (Object) leads - - - - - -

- - - - -
-
-
-
-84
-85
-86
-87
-
-
# File 'app/models/dataset.rb', line 84
-
-def leads
-  lead_investigator = Role.find_by_name('lead investigator')
-  affiliations.collect {|affiliation| affiliation.person if affiliation.role == lead_investigator}.compact
-end
-
-
- -
-

- - - (Object) package_id - - - - - -

-
- -

unpack and populate datatables and variates def from_eml(dataset)

- -
dataset.elements.each do |element|
-  self.send(element.name, element.value)
-end
-dataset.elements['//dataTable'].each do |datatable|
-  dtable = DataTable.new
-  dtable.from_eml(datatable)
-  datatables << dtable
-end
-
- -

end

- - -
-
-
- - -
- - - - -
-
-
-
-115
-116
-117
-
-
# File 'app/models/dataset.rb', line 115
-
-def package_id
-  "knb-lter-kbs.#{metacat_id || self.id}.#{version}"
-end
-
-
- -
-

- - - (Object) place_keyword_set - - - - - -

- - - - -
-
-
-
-339
-340
-341
-
-
# File 'app/models/dataset.rb', line 339
-
-def place_keyword_set
-  ['LTER','KBS','Kellogg Biological Station', 'Hickory Corners', 'Michigan', 'Great Lakes']
-end
-
-
- -
-

- - - (Boolean) restricted_to_members? - - - - - -

-
- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-165
-166
-167
-
-
# File 'app/models/dataset.rb', line 165
-
-def restricted_to_members?
-  sponsor.try(:data_restricted?)
-end
-
-
- -
-

- - - (Object) temporal_extent - - - - - -

- - - - -
-
-
-
-139
-140
-141
-142
-143
-144
-145
-146
-147
-148
-
-
# File 'app/models/dataset.rb', line 139
-
-def temporal_extent
-  begin_date, end_date = nil
-  datatables.where(:on_web => true).each do |datatable |
-    dates = {:begin_date => datatable.begin_date, :end_date => datatable.end_date }
-    next unless dates[:begin_date] && dates[:end_date]
-    begin_date = [begin_date, dates[:begin_date]].compact.min
-    end_date   = [end_date, dates[:end_date]].compact.max
-  end
-  {:begin_date => begin_date, :end_date => end_date}
-end
-
-
- -
-

- - - (Object) to_eml - - - - - -

- - - - -
-
-
-
-123
-124
-125
-126
-127
-128
-129
-130
-131
-132
-133
-134
-135
-136
-137
-
-
# File 'app/models/dataset.rb', line 123
-
-def to_eml
-  @eml = ::Builder::XmlMarkup.new
-  @eml.instruct! :xml, version: '1.0'
-  @eml.tag!('eml:eml',
-      'xmlns:eml'           => 'eml://ecoinformatics.org/eml-2.1.1',
-      'xmlns:stmml'         => 'http://www.xml-cml.org/schema/stmml-1.1',
-      'xmlns:xsi'           => 'http://www.w3.org/2001/XMLSchema-instance',
-      'xsi:schemaLocation'  => 'eml://ecoinformatics.org/eml-2.1.1 http://lter.kbs.msu.edu/docs/eml/eml.xsd',
-      'packageId'           => package_id,
-      'system'              => 'KBS LTER') do
-    eml_access
-    eml_dataset
-    eml_custom_unit_list if custom_units.present?
-  end
-end
-
-
- -
-

- - - (Object) to_label - - - - - -

- - - - -
-
-
-
-63
-64
-65
-
-
# File 'app/models/dataset.rb', line 63
-
-def to_label
-  "#{title} (#{dataset})"
-end
-
-
- -
-

- - - (Object) to_s - - - - - -

- - - - -
-
-
-
-67
-68
-69
-
-
# File 'app/models/dataset.rb', line 67
-
-def to_s
-  "#{dataset}"
-end
-
-
- -
-

- - - (Object) update_temporal_extent - - - - - -

- - - - -
-
-
-
-150
-151
-152
-153
-154
-155
-
-
# File 'app/models/dataset.rb', line 150
-
-def update_temporal_extent
-  dates = temporal_extent
-  self.initiated = dates[:begin_date] if dates[:begin_date]
-  self.data_end_date = dates[:end_date] if dates[:end_date]
-  save
-end
-
-
- -
-

- - - (Boolean) valid_request?(subdomain) - - - - - -

-
- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-89
-90
-91
-
-
# File 'app/models/dataset.rb', line 89
-
-def valid_request?(subdomain)
-  website_name.blank? || (website_name == subdomain)
-end
-
-
- -
-

- - - (Object) website_name - - - - - -

- - - - -
-
-
-
-93
-94
-95
-
-
# File 'app/models/dataset.rb', line 93
-
-def website_name
-  website.try(:name)
-end
-
-
- -
-

- - - (Object) which_roles(person) - - - - - -

- - - - -
-
-
-
-80
-81
-82
-
-
# File 'app/models/dataset.rb', line 80
-
-def which_roles(person)
-  affiliations.collect {|affiliation | affiliation.role if affiliation.person == person }.compact
-end
-
-
- -
-

- - - (Boolean) within_interval?(start_date, end_date) - - - - - -

-
- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-97
-98
-99
-100
-101
-
-
# File 'app/models/dataset.rb', line 97
-
-def within_interval?(start_date, end_date)
-  sdate = start_date.to_date
-  edate = end_date.to_date
-  datatables.index { |table| table.within_interval?(sdate, edate) }.present?
-end
-
-
- -
- -
- - - - - \ No newline at end of file diff --git a/doc/DatasetFile.html b/doc/DatasetFile.html deleted file mode 100644 index 9d685fa83..000000000 --- a/doc/DatasetFile.html +++ /dev/null @@ -1,123 +0,0 @@ - - - - - - Class: DatasetFile - - — Documentation by YARD 0.8.7.6 - - - - - - - - - - - - - - - - - - - - - -

Class: DatasetFile - - - -

- -
- -
Inherits:
-
- ActiveRecord::Base - -
    -
  • Object
  • - - - - - -
- show all - -
- - - - - - - - - -
Defined in:
-
app/models/dataset_file.rb
- -
-
- - - - - - - - - - - -
- - - - - \ No newline at end of file diff --git a/doc/DatasetFilesController.html b/doc/DatasetFilesController.html deleted file mode 100644 index 87e736828..000000000 --- a/doc/DatasetFilesController.html +++ /dev/null @@ -1,213 +0,0 @@ - - - - - - Class: DatasetFilesController - - — Documentation by YARD 0.8.7.6 - - - - - - - - - - - - - - - - - - - - - -

Class: DatasetFilesController - - - -

- -
- -
Inherits:
-
- ApplicationController - - - show all - -
- - - - - - - - - -
Defined in:
-
app/controllers/dataset_files_controller.rb
- -
-
- - - - - - - - - -

- Instance Method Summary - (collapse) -

- - - - - - - - - - - - - - -
-

Instance Method Details

- - -
-

- - - (Object) show - - - - - -

- - - - -
-
-
-
-2
-3
-4
-5
-6
-7
-8
-9
-10
-
-
# File 'app/controllers/dataset_files_controller.rb', line 2
-
-def show 
-  dataset_file = DatasetFile.find(params[:id])
-  path = dataset_file.data.path(params[:style])
-  if Rails.env.production?
-    redirect_to(dataset_file.data.s3_object(params[:style]).url_for(:read ,:secure => true, :expires_in => 10.seconds).to_s)
-  else
-    send_file  path, :type => 'application/pdf', :disposition => 'inline'
-  end
-end
-
-
- -
- -
- - - - - \ No newline at end of file diff --git a/doc/DatasetsController.html b/doc/DatasetsController.html deleted file mode 100644 index 99714812a..000000000 --- a/doc/DatasetsController.html +++ /dev/null @@ -1,922 +0,0 @@ - - - - - - Class: DatasetsController - - — Documentation by YARD 0.8.7.6 - - - - - - - - - - - - - - - - - - - - - -

Class: DatasetsController - - - -

- -
- -
Inherits:
-
- ApplicationController - - - show all - -
- - - - - - - - - -
Defined in:
-
app/controllers/datasets_controller.rb
- -
-
- - - - - - - - - -

- Instance Method Summary - (collapse) -

- - - - - - - - - - - - - - -
-

Instance Method Details

- - -
-

- - - (Object) create - - - - - -

-
- -

POST /datasets POST /datasets.xml

- - -
-
-
- - -
- - - - -
-
-
-
-93
-94
-95
-96
-97
-98
-99
-100
-101
-102
-103
-104
-105
-106
-107
-108
-109
-
-
# File 'app/controllers/datasets_controller.rb', line 93
-
-def create
-  if params[:eml_link].present?
-    @dataset = Dataset.from_eml(params[:eml_link])
-  elsif params[:dataset][:eml_file].present?
-    @dataset = Dataset.from_eml_file(params[:dataset][:eml_file])
-  else
-    @dataset = Dataset.new(dataset_params)
-  end
-  unless @dataset.class == Dataset #if not a Dataset, it will be an array of errors
-    flash[:notice] = "Eml import had errors: " + @dataset.collect{|error| error.to_s}.join(' ')
-    @dataset = Dataset.new
-  end
-  if @dataset.save
-    flash[:notice] = 'Dataset was successfully created.'
-  end
-  respond_with @dataset
-end
-
-
- -
-

- - - (Object) destroy - - - - - -

-
- -

DELETE /datasets/1 DELETE /datasets/1.xml

- - -
-
-
- - -
- - - - -
-
-
-
-124
-125
-126
-127
-128
-129
-130
-131
-
-
# File 'app/controllers/datasets_controller.rb', line 124
-
-def destroy
-  @dataset.destroy
-
-  respond_to do |format|
-    format.html { redirect_to datasets_url }
-    format.xml  { head :ok }
-  end
-end
-
-
- -
-

- - - (Object) edit - - - - - -

-
- -

GET /datasets/1;edit

- - -
-
-
- - -
- - - - -
-
-
-
-62
-63
-64
-65
-66
-67
-68
-69
-
-
# File 'app/controllers/datasets_controller.rb', line 62
-
-def edit
-  @people   = Person.by_sur_name
-  @studies = Study.by_weight
-  @themes = Theme.by_weight
-  @roles  = dataset_roles 
-  @websites = Website.all.collect {|website| [website.name, website.id]}
-  @sponsors = Sponsor.all.collect {|sponsor| [sponsor.name, sponsor.id]}
-end
-
-
- -
-

- - - (Object) index - - - - - -

-
- -

GET /datasets GET /datasets.xml

- - -
-
-
- - -
- - - - -
-
-
-
-18
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-
-
# File 'app/controllers/datasets_controller.rb', line 18
-
-def index
-  request.format  = :eml if params[:Dataset]
-  @keyword_list   = params['keyword_list']
-  @people         = Person.find_all_with_dataset
-  @themes         = Theme.by_weight
-  @datasets       = Dataset.where(:on_web => true).where(:website_id => website.id)
-  @studies        = collect_and_normalize_studies(@datasets)
-  @crumbs         = []
-  respond_to do |format|
-    format.html {redirect_to datatables_path unless params[:really]}
-    format.xml  { render :xml => @datasets.to_xml }
-    format.eml { render :eml => @datasets }
-  end
-end
-
-
- -
-

- - - (Object) knb - - - - - -

- - - - -
-
-
-
-49
-50
-51
-52
-53
-54
-
-
# File 'app/controllers/datasets_controller.rb', line 49
-
-def knb
-  scopre, identifier = params[:id].split(/\./)
-  @dataset = Dataset.where(:metacat_id => identifier).first
-  @dataset = Dataset.where(:id => identifer).first unless @dataset
-  redirect_to @dataset
-end
-
-
- -
-

- - - (Object) new - - - - - -

-
- -

GET /datasets/new

- - -
-
-
- - -
- - - - -
-
-
-
-57
-58
-59
-
-
# File 'app/controllers/datasets_controller.rb', line 57
-
-def new
-  @dataset = Dataset.new
-end
-
-
- -
-

- - - (Object) set_affiliation_for - - - - - -

-
- -

POST /dataset/new_affiliation

- - -
-
-
- - -
- - - - -
-
-
-
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-89
-
-
# File 'app/controllers/datasets_controller.rb', line 72
-
-def set_affiliation_for
-  @affiliation = Affiliation.new
-  people = Person.by_sur_name_asc
-  roles = dataset_roles
-
-  respond_to do |format|
-    format.html
-    format.js do
-      render :update do |page|
-        page.insert_html :bottom, 'affiliations',
-          :partial  => "affiliation",
-          :locals   => {:roles        => roles,
-                        :people       => people,
-                        :affiliation  => @affiliation}
-      end
-    end
-  end
-end
-
-
- -
-

- - - (Object) show - - - - - -

-
- -

GET /datasets/1 GET /datasets/1.xml GET /dataset/1.eml

- - -
-
-
- - -
- - - - -
-
-
-
-36
-37
-38
-39
-40
-41
-42
-43
-44
-45
-46
-47
-
-
# File 'app/controllers/datasets_controller.rb', line 36
-
-def show
-  @title = @dataset.title
-
-  if @dataset.valid_request?(@subdomain_request)
-    respond_with @dataset do |format|
-      format.eml { render :xml => @dataset.to_eml }
-      # format.eml { render :eml => @dataset}
-    end
-  else
-    redirect_to datasets_url
-  end
-end
-
-
- -
-

- - - (Object) update - - - - - -

-
- -

PUT /datasets/1 PUT /datasets/1.xml

- - -
-
-
- - -
- - - - -
-
-
-
-113
-114
-115
-116
-117
-118
-119
-120
-
-
# File 'app/controllers/datasets_controller.rb', line 113
-
-def update
-  @sponsors = Sponsor.all.collect {|sponsor| [sponsor.name, sponsor.id]}
-  @websites = Website.all.collect {|website| [website.name, website.id]}
-  if @dataset.update_attributes(dataset_params)
-    flash[:notice] = 'Dataset was successfully updated.'
-  end
-  respond_with @dataset
-end
-
-
- -
-

- - - (Object) upload - - - - - -

-
- -

POST /dataset

- - -
-
-
- - -
- - - - -
-
-
-
-11
-12
-13
-14
-
-
# File 'app/controllers/datasets_controller.rb', line 11
-
-def upload
-  file = params[:file]
-  @dataset = Dataset.new
-end
-
-
- -
- -
- - - - - \ No newline at end of file diff --git a/doc/Datatable.html b/doc/Datatable.html deleted file mode 100644 index 6122ebb80..000000000 --- a/doc/Datatable.html +++ /dev/null @@ -1,4362 +0,0 @@ - - - - - - Class: Datatable - - — Documentation by YARD 0.8.7.6 - - - - - - - - - - - - - - - - - - - - - -

Class: Datatable - - - -

- -
- -
Inherits:
-
- ActiveRecord::Base - -
    -
  • Object
  • - - - - - -
- show all - -
- - - - - - -
Includes:
-
Workflow
- - - - - -
Defined in:
-
lib/load_variates.rb,
- app/models/datatable.rb
-
- -
-
- - - - - -

Instance Attribute Summary (collapse)

- - - - - - -

- Class Method Summary - (collapse) -

- - - -

- Instance Method Summary - (collapse) -

- - - - - - - -
-

Instance Attribute Details

- - - -
-

- - - (Object) materialized_datatable_id - - - - - -

-
- -

Returns the value of attribute materialized_datatable_id

- - -
-
-
- - -
- - - - -
-
-
-
-9
-10
-11
-
-
# File 'app/models/datatable.rb', line 9
-
-def materialized_datatable_id
-  @materialized_datatable_id
-end
-
-
- -
- - -
-

Class Method Details

- - -
-

- - + (Object) from_eml(datatable_eml) - - - - - -

- - - - -
-
-
-
-83
-84
-85
-86
-87
-
-
# File 'app/models/datatable.rb', line 83
-
-def self.from_eml(datatable_eml)
-  url = datatable_eml.css('physical distribution online url').text
-  table_id = url.split('/')[-1].to_s.gsub('.csv', '')
-  find_by_id(table_id.to_i) || new.from_eml(datatable_eml)
-end
-
-
- -
- -
-

Instance Method Details

- - -
-

- - - (Object) all_data - - - - - -

- - - - -
-
-
-
-459
-460
-461
-
-
# File 'app/models/datatable.rb', line 459
-
-def all_data
-  DataQuery.find(self.object)
-end
-
-
- -
-

- - - (Object) approve_data - - - - - -

- - - - -
-
-
-
-478
-479
-480
-
-
# File 'app/models/datatable.rb', line 478
-
-def approve_data
-  self.number_of_released_records = total_records
-end
-
-
- -
-

- - - (Object) approved_csv - - - - - -

- - - - -
-
-
-
-353
-354
-355
-
-
# File 'app/models/datatable.rb', line 353
-
-def approved_csv
-  convert_to_csv(approved_data)
-end
-
-
- -
-

- - - (Object) approved_data - - - - - -

- - - - -
-
-
-
-455
-456
-457
-
-
# File 'app/models/datatable.rb', line 455
-
-def approved_data
-  DataQuery.find(approved_data_query)
-end
-
-
- -
-

- - - (Object) approved_data_query - - - - - -

- - - - -
-
-
-
-447
-448
-449
-450
-451
-452
-453
-
-
# File 'app/models/datatable.rb', line 447
-
-def approved_data_query
-  query = self.object
-  if self.number_of_released_records
-    query = query + " offset #{offset}"
-  end
-  query
-end
-
-
- -
-

- - - (Object) associated_models_from_eml(datatable_eml) - - - - - -

- - - - -
-
-
-
-100
-101
-102
-103
-104
-105
-106
-107
-108
-109
-
-
# File 'app/models/datatable.rb', line 100
-
-def associated_models_from_eml(datatable_eml)
-  datatable_eml.css('methods methodStep').each do |protocol_eml|
-    protocol_id = protocol_eml.css('protocol references').text.gsub('protocol_', '')
-    self.protocols << Protocol.where(:id => protocol_id)
-  end
-
-  datatable_eml.css('attributeList attribute').each do |variate_eml|
-    self.variates << Variate.from_eml(variate_eml)
-  end
-end
-
-
- -
-

- - - (Boolean) can_be_downloaded_by?(user) - - - - - -

-
- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-236
-237
-238
-239
-240
-241
-242
-243
-244
-245
-246
-247
-248
-249
-
-
# File 'app/models/datatable.rb', line 236
-
-def can_be_downloaded_by?(user)
-  if self.is_restricted?
-    user.try(:admin?) ||
-    permitted?(user) ||
-    owned_by?(user)
-  elsif restricted_to_members?
-    user.try(:admin?) ||
-    permitted?(user) ||
-    owned_by?(user) ||
-    member?(user)
-  else
-    true
-  end
-end
-
-
- -
-

- - - (Boolean) can_be_qcd_by?(user) - - - - - -

-
- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-226
-227
-228
-229
-230
-231
-232
-233
-234
-
-
# File 'app/models/datatable.rb', line 226
-
-def can_be_qcd_by?(user)
-  if sponsor_name == 'lter'
-    user.try(:admin?) || member?(user)
-  elsif sponsor_name == 'glbrc'
-    user.try(:admin?) || owned_by?(user)
-  else
-    false
-  end
-end
-
-
- -
-

- - - (Object) compile_personnel(source, personnel = {}) - - - - - -

- - - - -
-
-
-
-139
-140
-141
-142
-143
-144
-145
-146
-147
-148
-
-
# File 'app/models/datatable.rb', line 139
-
-def compile_personnel(source, personnel={})
-  source.each do |contribution|
-    if personnel[contribution.person]
-      personnel[contribution.person].push((contribution.role.try(:name)))
-    else
-      personnel[contribution.person] = [contribution.role.try(:name)].to_a
-    end
-  end
-  personnel
-end
-
-
- -
-

- - - (Object) complete - - - - - -

- - - - -
-
-
-
-78
-79
-80
-81
-
-
# File 'app/models/datatable.rb', line 78
-
-def complete
-  self.completed_on = Date.today
-  save
-end
-
-
- -
-

- - - (Object) completed - - - - - -

- - - - -
-
-
-
-315
-316
-317
-
-
# File 'app/models/datatable.rb', line 315
-
-def completed
-  dataset.try(:completed)
-end
-
-
- -
-

- - - (Object) convert_to_csv(values, units = true) - - - - - -

- - - - -
-
-
-
-357
-358
-359
-360
-361
-362
-363
-364
-365
-366
-367
-368
-369
-370
-371
-372
-373
-
-
# File 'app/models/datatable.rb', line 357
-
-def convert_to_csv(values, units=true)
-  csv_string = CSV.generate do |csv|
-    vars = variate_names
-    csv << vars
-    if units
-      csv << variate_units
-    end
-    fields = values.fields
-    unless fields.join(' ') =~ /[A-Z]/
-      vars =  variates.collect {|variate| variate.name.downcase }
-    end
-    values.each do |row|
-      csv << vars.collect { |variate| row[variate] }
-    end
-  end
-  csv_string
-end
-
-
- -
-

- - - (Object) csv_headers - - - - - -

- - - - -
-
-
-
-327
-328
-329
-330
-331
-332
-333
-334
-335
-336
-337
-
-
# File 'app/models/datatable.rb', line 327
-
-def csv_headers
-  [
-  "# #{title}\n",
-  data_source,
-  terms_of_use,
-  variate_table,
-  data_comments,
-  variate_names.join(",") + "\n",
-  variate_units.join(",") + "\n"
-  ].join
-end
-
-
- -
-

- - - (Object) data_comments - - - - - -

- - - - -
-
-
-
-388
-389
-390
-391
-392
-393
-394
-
-
# File 'app/models/datatable.rb', line 388
-
-def data_comments
-  if comments
-    "#\n#        DATA TABLE CORRECTIONS AND COMMENTS\n" + comments.gsub(/^/,'#') + "\n#\n"
-  else
-    "\n"
-  end
-end
-
-
- -
-

- - - (Object) data_preview - - - - - -

- - - - -
-
-
-
-438
-439
-440
-441
-442
-443
-444
-445
-
-
# File 'app/models/datatable.rb', line 438
-
-def data_preview
-  unless @data_preview
-    limit = self.excerpt_limit || 5
-    query = "#{self.object}  offset #{offset} limit #{limit}"
-    @data_preview = ActiveRecord::Base.connection.execute(query)
-  end
-  @data_preview
-end
-
-
- -
-

- - - (Object) data_source - - - - - -

- - - - -
-
-
-
-396
-397
-398
-399
-400
-401
-402
-403
-404
-
-
# File 'app/models/datatable.rb', line 396
-
-def data_source
-  <<-END
-#
-# Original Data Source: http://#{website_name}.kbs.msu.edu/datatables/#{self.id}
-# The newest version of the data http://#{website_name}.kbs.msu.edu/datatables/#{self.id}.csv
-# Full EML Metadata: http://#{website_name}.kbs.msu.edu/datatables/#{self.dataset.id}.eml
-# 
-  END
-end
-
-
- -
-

- - - (Object) database_date_field - - - - - -

- - - - -
-
-
-
-406
-407
-408
-409
-410
-411
-412
-413
-414
-415
-416
-
-
# File 'app/models/datatable.rb', line 406
-
-def database_date_field
-  values = ActiveRecord::Base.connection.execute(object)
-  case
-    when values.fields.member?('sample_date') then 'sample_date'
-    when values.fields.member?('obs_date') then 'obs_date'
-    when values.fields.member?('date') then 'date'
-    when values.fields.member?('datetime') then 'datetime'
-    when values.fields.member?('harvest_date') then 'harvest_date'
-    when values.fields.member?('year') then 'year'
-  end
-end
-
-
- -
-

- - - (Object) dataset_personnel - - - - - -

- - - - -
-
-
-
-135
-136
-137
-
-
# File 'app/models/datatable.rb', line 135
-
-def dataset_personnel
-  compile_personnel(dataset.affiliations)
-end
-
-
- -
-

- - - (Object) datatable_personnel - - - - - -

- - - - -
-
-
-
-131
-132
-133
-
-
# File 'app/models/datatable.rb', line 131
-
-def datatable_personnel
-  compile_personnel(data_contributions)
-end
-
-
- -
-

- - - (Object) deniers_of(user) - - - - - -

- - - - -
-
-
-
-214
-215
-216
-
-
# File 'app/models/datatable.rb', line 214
-
-def deniers_of(user)
-  permissions.where(:user_id => user, :decision => 'denied').collect(&:owner)
-end
-
-
- -
-

- - - (Object) from_eml(datatable_eml) - - - - - -

- - - - -
-
-
-
-89
-90
-91
-92
-93
-94
-95
-96
-97
-98
-
-
# File 'app/models/datatable.rb', line 89
-
-def from_eml(datatable_eml)
-  self.name = datatable_eml.attributes['id'].try(:value)
-  self.title = datatable_eml.css('entityName').text
-  self.description = datatable_eml.css('entityDescription').text
-  self.data_url = datatable_eml.css('physical distribution online url').text
-  associated_models_from_eml(datatable_eml)
-  self.save
-
-  self
-end
-
-
- -
-

- - - (Object) keyword_names - - - - - -

- - - - -
-
-
-
-160
-161
-162
-
-
# File 'app/models/datatable.rb', line 160
-
-def keyword_names
-  keywords.collect {|x| x.name}
-end
-
-
- -
-

- - - (Object) leads - - - - - -

- - - - -
-
-
-
-154
-155
-156
-157
-
-
# File 'app/models/datatable.rb', line 154
-
-def leads
-  lead_investigator = Role.find_by_name('lead investigator')
-  data_contributions.collect { |affiliation| affiliation.person if affiliation.role == lead_investigator }.compact
-end
-
-
- -
-

- - - (Boolean) member?(user) - - - - - -

-
- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-255
-256
-257
-258
-
-
# File 'app/models/datatable.rb', line 255
-
-def member?(user)
-  sponsors = user.try(:sponsors).to_a
-  sponsors.include?(self.dataset.try(:sponsor))
-end
-
-
- -
-

- - - (Object) non_dataset_protocols - - - - - -

- - - - -
-
-
-
-287
-288
-289
-
-
# File 'app/models/datatable.rb', line 287
-
-def non_dataset_protocols
-  protocols.reject { |protocol| dataset.protocols.include?(protocol) }.compact
-end
-
-
- -
-

- - - (Object) number_of_header_lines - - - - - -

- - - - -
-
-
-
-516
-517
-518
-
-
# File 'app/models/datatable.rb', line 516
-
-def number_of_header_lines
-  csv_headers.lines.to_a.size
-end
-
-
- -
-

- - - (Object) offset - - - - - -

- - - - -
-
-
-
-463
-464
-465
-466
-467
-
-
# File 'app/models/datatable.rb', line 463
-
-def offset
-  self.number_of_released_records ||= total_records
-  result = total_records - number_of_released_records
-  result < 0 ? 0 :result
-end
-
-
- -
-

- - - (Boolean) ongoing? - - - - - -

-
- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-280
-281
-282
-283
-284
-285
-
-
# File 'app/models/datatable.rb', line 280
-
-def ongoing?
-  return false if self.completed?
-  next_expected_update = update_frequency_days.present? ? update_frequency_days : 365
-  expected_update = end_date.year + next_expected_update/265 + 2
-  expected_update > Time.now.year
-end
-
-
- -
-

- - - (Boolean) owned_by?(user) - - - - - -

-
- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-251
-252
-253
-
-
# File 'app/models/datatable.rb', line 251
-
-def owned_by?(user)
-  owners.include?(user)
-end
-
-
- -
-

- - - (Object) pending_requesters - - - - - -

- - - - -
-
-
-
-206
-207
-208
-
-
# File 'app/models/datatable.rb', line 206
-
-def pending_requesters
-  requesters.collect { |user| user unless self.permitted?(user) }.compact
-end
-
-
- -
-

- - - (Object) perform_query - - - - - -

- - - - -
-
-
-
-482
-483
-484
-485
-
-
# File 'app/models/datatable.rb', line 482
-
-def perform_query
-  query =  self.object
-  ActiveRecord::Base.connection.execute(query)
-end
-
-
- -
-

- - - (Boolean) permitted?(user) - - - - - -

-
- -

checks if the user has the right to perform the action

- - -
-
-
-

Parameters:

-
    - -
  • - - user - - - (user) - - - - — -
    -

    the user object to be queried

    -
    - -
  • - -
- -

Returns:

-
    - -
  • - - - (Boolean) - - - - — -
    -

    true if the action is allowed and false if not

    -
    - -
  • - -
- -
- - - - -
-
-
-
-200
-201
-202
-203
-204
-
-
# File 'app/models/datatable.rb', line 200
-
-def permitted?(user)
-  user.present? && owners.present? && owners.all? do |owner|
-    user.has_permission_from?(owner, self)
-  end
-end
-
-
- -
-

- - - (Object) personnel - - - - - -

- - - - -
-
-
-
-127
-128
-129
-
-
# File 'app/models/datatable.rb', line 127
-
-def personnel
-  datatable_personnel.presence || dataset_personnel
-end
-
-
- -
-

- - - (Object) protocols_with_backup - - - - - -

- - - - -
-
-
-
-119
-120
-121
-
-
# File 'app/models/datatable.rb', line 119
-
-def protocols_with_backup
-  protocols.presence || dataset.protocols.presence
-end
-
-
- -
-

- - - (Object) publish - - - - - -

-
- -

publish a dataset to S3 for caching

- - -
-
-
- - -
- - - - -
-
-
-
-173
-174
-175
-176
-177
-178
-179
-180
-181
-182
-183
-184
-185
-
-
# File 'app/models/datatable.rb', line 173
-
-def publish
-  begin
-    file = Tempfile.new('csv_cache')
-    file << self.approved_csv
-    self.csv_cache = file
-    self.csv_cache_file_name = "#{id}.csv"
-    self.csv_cache_content_type = 'text/csv'
-    save!
-  ensure
-    file.close
-    file.unlink
-  end
-end
-
-
- -
-

- - - (Object) raw_csv(units = true) - - - - - -

- - - - -
-
-
-
-349
-350
-351
-
-
# File 'app/models/datatable.rb', line 349
-
-def raw_csv(units=true)
-  convert_to_csv(all_data, units)
-end
-
-
- -
- - - - - -
-
-
-
-491
-492
-493
-
-
# File 'app/models/datatable.rb', line 491
-
-def related_files
-  self.dataset.dataset_files
-end
-
-
- -
- - - - - -
-
-
-
-163
-164
-165
-166
-167
-168
-169
-170
-
-
# File 'app/models/datatable.rb', line 163
-
-def related_keywords
-  #http://vocab.lternet.edu/webservice/keywordlist.php/all/csv
-  agent = Mechanize.new
-  keywords.collect do |keyword|
-    terms = agent.get("http://vocab.lternet.edu/webservice/keywordlist.php/all/csv/#{keyword}")
-    CSV.parse(terms)
-  end.flatten.sort.uniq
-end
-
-
- -
- - - - - -
-
-
-
-487
-488
-489
-
-
# File 'app/models/datatable.rb', line 487
-
-def related_tables
-  self.dataset.datatables - [self]
-end
-
-
- -
-

- - - (Boolean) requested_by?(user) - - - - - -

-
- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-210
-211
-212
-
-
# File 'app/models/datatable.rb', line 210
-
-def requested_by?(user)
-  requesters.include?(user)
-end
-
-
- -
-

- - - (Boolean) restricted_to_members? - - - - - -

-
- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-193
-194
-195
-
-
# File 'app/models/datatable.rb', line 193
-
-def restricted_to_members?
-  dataset.restricted_to_members?
-end
-
-
- -
-

- - - (Object) retract - - - - - -

-
- -

remove a dataset from S3 caching

- - -
-
-
- - -
- - - - -
-
-
-
-188
-189
-190
-191
-
-
# File 'app/models/datatable.rb', line 188
-
-def retract
-  csv_cache.destroy
-  save
-end
-
-
- -
-

- - - (Object) revert - - - - - -

- - - - -
-
-
-
-73
-74
-75
-76
-
-
# File 'app/models/datatable.rb', line 73
-
-def revert
-  self.completed_on = nil
-  save
-end
-
-
- -
- - - - - -
-
-
-
-218
-219
-220
-
-
# File 'app/models/datatable.rb', line 218
-
-def sponsor
-  dataset.sponsor
-end
-
-
- -
- - - - - -
-
-
-
-222
-223
-224
-
-
# File 'app/models/datatable.rb', line 222
-
-def sponsor_name
-  sponsor.name
-end
-
-
- -
-

- - - (Object) status - - - - - -

- - - - -
-
-
-
-319
-320
-321
-322
-323
-324
-325
-
-
# File 'app/models/datatable.rb', line 319
-
-def status
-  if workflow_state
-    workflow_state
-  else
-    dataset.try(:status)
-  end
-end
-
-
- -
- - - - - -
-
-
-
-503
-504
-505
-
-
# File 'app/models/datatable.rb', line 503
-
-def study_link_for(website)
-  study.try(:study_url, website)
-end
-
-
- -
-

- - - (Object) study_name - - - - - -

- - - - -
-
-
-
-507
-508
-509
-
-
# File 'app/models/datatable.rb', line 507
-
-def study_name
-  study.try(:name).to_s
-end
-
-
- -
-

- - - (Object) supercession_candidates - - - - - -

-
- -

a datatable should not be superceded by itself

- - -
-
-
- - -
- - - - -
-
-
-
-521
-522
-523
-
-
# File 'app/models/datatable.rb', line 521
-
-def supercession_candidates
-  Datatables.where('id <> ?', id).all
-end
-
-
- -
-

- - - (Object) temporal_extent - - - - - -

- - - - -
-
-
-
-418
-419
-420
-421
-422
-423
-424
-425
-426
-427
-428
-
-
# File 'app/models/datatable.rb', line 418
-
-def temporal_extent
-  data_start_date = data_end_date = nil
-  if is_sql
-    date_field = database_date_field
-    if date_field
-      query = "select max(#{date_field}), min(#{date_field}) from (#{object}) as t1"
-      data_start_date, data_end_date = query_datatable_for_temporal_extent(query)
-    end
-  end
-  {:begin_date => data_start_date,:end_date => data_end_date}
-end
-
-
- -
-

- - - (Object) terms_of_use - - - - - -

- - - - -
-
-
-
-379
-380
-381
-382
-383
-384
-385
-386
-
-
# File 'app/models/datatable.rb', line 379
-
-def terms_of_use
-  <<-END
-# These Data are copyrighted and use in a publication requires permission
-# as detailed in our Terms of use:  http://lter.kbs.msu.edu/data/terms-of-use/
-# Use of the data constitutes acceptance of the terms.
-#
-END
-end
-
-
- -
-

- - - (Object) title_and_years - - - - - -

- - - - -
-
-
-
-267
-268
-269
-270
-271
-272
-273
-274
-275
-276
-277
-278
-
-
# File 'app/models/datatable.rb', line 267
-
-def title_and_years
-  return title if (self.begin_date.nil? or self.end_date.nil?)
-  year_end = end_date.year
-  year_start = begin_date.year
-  years = ""
-  if year_end == year_start
-      years = " (#{year_start})"
-  else
-      years = " (#{year_start} to #{ ongoing? ? 'present': year_end})"
-  end
-  title + years
-end
-
-
- -
-

- - - (Object) to_climdb - - - - - -

- - - - -
-
-
-
-375
-376
-377
-
-
# File 'app/models/datatable.rb', line 375
-
-def to_climdb
-  "!#{raw_csv(false)}" # no units
-end
-
-
- -
-

- - - (Object) to_eml(xml = ::Builder::XmlMarkup.new) - - - - - -

- - - - -
-
-
-
-291
-292
-293
-294
-295
-296
-297
-298
-299
-300
-301
-302
-303
-
-
# File 'app/models/datatable.rb', line 291
-
-def to_eml(xml = ::Builder::XmlMarkup.new)
-  @eml = xml
-  @eml.dataTable 'id' => Rails.application.routes.url_helpers.datatable_path(self) do
-    @eml.entityName "Kellogg Biological Station LTER: #{title} (#{name})"
-    if description
-      text =  description.gsub(/<\/?[^>]*>/, "")
-      @eml.entityDescription EML.text_sanitize(text) unless text.strip.empty?
-    end
-#      eml_protocols if non_dataset_protocols.present?
-    eml_physical
-    eml_attributes
-  end
-end
-
-
- -
-

- - - (Object) to_label - - - - - -

- - - - -
-
-
-
-123
-124
-125
-
-
# File 'app/models/datatable.rb', line 123
-
-def to_label
-  "#{title} (#{name})"
-end
-
-
- -
-

- - - (Object) total_records - - - - - -

- - - - -
-
-
-
-469
-470
-471
-472
-473
-474
-475
-476
-
-
# File 'app/models/datatable.rb', line 469
-
-def total_records
-  unless @total_records
-    query = "select count(*) as count from (#{self.object}) as t1"
-    result = ActiveRecord::Base.connection.execute(query).first
-    @total_records = result['count'].to_i
-  end
-  @total_records
-end
-
-
- -
-

- - - (Object) update_temporal_extent - - - - - -

- - - - -
-
-
-
-430
-431
-432
-433
-434
-435
-436
-
-
# File 'app/models/datatable.rb', line 430
-
-def update_temporal_extent
-  dates = temporal_extent
-  self.begin_date = dates[:begin_date] if dates[:begin_date]
-  self.end_date = dates[:end_date] if dates[:end_date]
-  save
-  dataset.update_temporal_extent
-end
-
-
- -
-

- - - (Boolean) valid_for_eml? - - - - - -

-
- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-111
-112
-113
-
-
# File 'app/models/datatable.rb', line 111
-
-def valid_for_eml?
-  valid_variates.any?
-end
-
-
- -
-

- - - (Object) valid_variates - - - - - -

- - - - -
-
-
-
-115
-116
-117
-
-
# File 'app/models/datatable.rb', line 115
-
-def valid_variates
-  self.variates.valid_for_eml
-end
-
-
- -
-

- - - (Object) values - - - - - -

- - - - -
-
-
-
-511
-512
-513
-514
-
-
# File 'app/models/datatable.rb', line 511
-
-def values
-  values = nil
-  values = self.perform_query if self.is_sql
-end
-
-
- -
-

- - - (Object) variate_names - - - - - -

- - - - -
-
-
-
-305
-306
-307
-
-
# File 'app/models/datatable.rb', line 305
-
-def variate_names
-  variates.collect {|variate| variate.try(:name)}
-end
-
-
- -
-

- - - (Object) variate_table - - - - - -

- - - - -
-
-
-
-339
-340
-341
-342
-343
-344
-345
-346
-347
-
-
# File 'app/models/datatable.rb', line 339
-
-def variate_table
-  result = "#     VARIATE TABLE\n"
-  result += variates.collect do |variate| 
-    unit = variate.try(:unit)
-    "# " + [variate.try(:name), unit.try(:name), variate.try(:description)].join("\t") + "\n"
-  end.join
-  result += "#\n"
-  result
-end
-
-
- -
-

- - - (Object) variate_units - - - - - -

- - - - -
-
-
-
-309
-310
-311
-312
-313
-
-
# File 'app/models/datatable.rb', line 309
-
-def variate_units
-  units = variates.collect {|variate| variate.unit.name if variate.unit }
-  units[0] = "##{units[0]}"
-  units
-end
-
-
- -
-

- - - (Object) website_name - - - - - -

- - - - -
-
-
-
-499
-500
-501
-
-
# File 'app/models/datatable.rb', line 499
-
-def website_name
-  dataset.website.try(:name) || 'lter'
-end
-
-
- -
-

- - - (Object) which_roles(person) - - - - - -

- - - - -
-
-
-
-150
-151
-152
-
-
# File 'app/models/datatable.rb', line 150
-
-def which_roles(person)
-  data_contributions.collect {|affiliation | affiliation.role if affiliation.person == person }.compact
-end
-
-
- -
-

- - - (Boolean) within_interval?(start_date, end_date) - - - - - -

-
- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-260
-261
-262
-263
-264
-265
-
-
# File 'app/models/datatable.rb', line 260
-
-def within_interval?(start_date, end_date)
-  extent = temporal_extent
-
-  extent[:begin_date] &&
-      extent[:begin_date] >= start_date && extent[:end_date] <= end_date
-end
-
-
- -
- -
- - - - - \ No newline at end of file diff --git a/doc/DatatablesController.html b/doc/DatatablesController.html deleted file mode 100644 index c970a0bed..000000000 --- a/doc/DatatablesController.html +++ /dev/null @@ -1,1116 +0,0 @@ - - - - - - Class: DatatablesController - - — Documentation by YARD 0.8.7.6 - - - - - - - - - - - - - - - - - - - - - -

Class: DatatablesController - - - -

- -
- -
Inherits:
-
- ApplicationController - - - show all - -
- - - - - - - - - -
Defined in:
-
app/controllers/datatables_controller.rb
- -
-
- - - - - - - - - -

- Instance Method Summary - (collapse) -

- - - - - - - - - - - - - - -
-

Instance Method Details

- - -
-

- - - (Object) approve_records - - - - - -

- - - - -
-
-
-
-160
-161
-162
-163
-164
-
-
# File 'app/controllers/datatables_controller.rb', line 160
-
-def approve_records
-  datatable.approve_data
-  datatable.save
-  redirect_to edit_datatable_path(datatable)
-end
-
-
- -
-

- - - (Object) create - - - - - -

-
- -

POST /datatables POST /datatables.xml

- - -
-
-
- - -
- - - - -
-
-
-
-100
-101
-102
-103
-104
-105
-106
-107
-108
-109
-110
-111
-
-
# File 'app/controllers/datatables_controller.rb', line 100
-
-def create
-  @core_areas = CoreArea.by_name.collect { |area| [area.name, area.id] }
-  @studies = Study.all.collect{ |study| [study.name, study.id] }
-  @people = Person.all
-  @units = Unit.all
-
-  if datatable.save
-    flash[:notice] = 'Datatable was successfully created.'
-  end
-
-  respond_with datatable
-end
-
-
- -
-

- - - (Object) destroy - - - - - -

-
- -

DELETE /datatables/1 DELETE /datatables/1.xml

- - -
-
-
- - -
- - - - -
-
-
-
-130
-131
-132
-133
-
-
# File 'app/controllers/datatables_controller.rb', line 130
-
-def destroy
-  datatable.destroy
-  respond_with datatable
-end
-
-
- -
-

- - - (Object) edit - - - - - -

-
- -

GET /datatables/1;edit

- - -
-
-
- - -
- - - - -
-
-
-
-91
-92
-93
-94
-95
-96
-
-
# File 'app/controllers/datatables_controller.rb', line 91
-
-def edit
-  @core_areas = CoreArea.by_name.collect { |area| [area.name, area.id] }
-  @studies = Study.all.collect{ |study| [study.name, study.id] }
-  @people = Person.all
-  # @units = Unit.order(:name).all
-end
-
-
- -
-

- - - (Object) index - - - - - -

-
- -

GET /datatables GET /datatables.xml

- - -
-
-
- - -
- - - - -
-
-
-
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
-23
-24
-
-
# File 'app/controllers/datatables_controller.rb', line 13
-
-def index
-  @website = website
-  @area = params[:area]
-  store_location
-  retrieve_datatables('keyword_list' =>'')
-
-  if Rails.env == 'production' #and stale? etag: @datatables
-    respond_with @datatables do |format|
-      format.rss {render :rss => @datatables}
-    end
-  end
-end
-
-
- -
-

- - - (Object) new - - - - - -

-
- -

GET /datatables/new

- - -
-
-
- - -
- - - - -
-
-
-
-82
-83
-84
-85
-86
-87
-88
-
-
# File 'app/controllers/datatables_controller.rb', line 82
-
-def new
-  @core_areas = CoreArea.by_name.collect { |area| [area.name, area.id] }
-  @studies = Study.all.collect{ |study| [study.name, study.id] }
-  @people = Person.all
-  @units = Unit.all
-  @datatable = Datatable.new
-end
-
-
- -
-

- - - (Object) publish - - - - - -

-
- -

PUT publish

- - -
-
-
- - -
- - - - -
-
-
-
-75
-76
-77
-78
-
-
# File 'app/controllers/datatables_controller.rb', line 75
-
-def publish
-  datatable.publish
-  render :nothing => true
-end
-
-
- -
-

- - - (Object) qc - - - - - -

- - - - -
-
-
-
-71
-72
-
-
# File 'app/controllers/datatables_controller.rb', line 71
-
-def qc
-end
-
-
- -
-

- - - (Object) search - - - - - -

- - - - -
-
-
-
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-
-
# File 'app/controllers/datatables_controller.rb', line 26
-
-def search
-  @website = website
-  query =  {'keyword_list' => ''}
-  query.merge!(params)
-  if query['keyword_list'].empty?
-    redirect_to datatables_url
-  else
-    retrieve_datatables(query)
-  end
-end
-
-
- -
-

- - - (Object) show - - - - - -

-
- -

GET /datatables/1 GET /datatables/1.xml GET /datatables/1.csv

- - -
-
-
- - -
- - - - -
-
-
-
-40
-41
-42
-43
-44
-45
-46
-47
-48
-49
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-
-
# File 'app/controllers/datatables_controller.rb', line 40
-
-def show
-  expires_in 5.minutes
-  @website = website
-
-  store_location #in case we have to log in and come back here
-  if datatable.dataset.valid_request?(@subdomain_request)
-    respond_to do |format|
-      format.html
-      format.fasta
-      format.csv do
-        unless csv_ok
-          render :text => "You do not have permission to download this datatable"
-        end
-
-        if current_user.try(:role) == 'admin'
-          render_admin_csv
-        else
-          render_csv
-        end
-      end
-      format.climdb do
-        unless csv_ok
-          redirect_to datatable_url(datatable)
-        end
-      end
-    end
-  else
-    redirect_to datatables_url
-  end
-end
-
-
- -
-

- - - (Object) suggest - - - - - -

-
- -

TODO only return the ones for the right website.

- - -
-
-
- - -
- - - - -
-
-
-
-136
-137
-138
-139
-140
-141
-142
-143
-144
-145
-146
-147
-148
-
-
# File 'app/controllers/datatables_controller.rb', line 136
-
-def suggest
-  term = params[:term]
-
-  list = ActsAsTaggableOn::Tag.where("lower(name) like ?", term.downcase + '%').select("DISTINCT tags.name")
-  list = list + Person.where('lower(sur_name) like ?', term.downcase + '%').select('DISTINCT sur_name as name')
-  list = list + Theme.where('lower(name) like ?', term.downcase + '%').select('DISTINCT name')
-  list = list + CoreArea.where('lower(name) like ?', term.downcase + '%').select('DISTINCT name')
-
-  keywords = list.collect {|x| x.name.downcase }.sort.uniq
-  respond_to do |format|
-    format.json {render :json => keywords}
-  end
-end
-
-
- -
-

- - - (Object) update - - - - - -

-
- -

PUT /datatables/1 PUT /datatables/1.xml

- - -
-
-
- - -
- - - - -
-
-
-
-115
-116
-117
-118
-119
-120
-121
-122
-123
-124
-125
-126
-
-
# File 'app/controllers/datatables_controller.rb', line 115
-
-def update
-  @core_areas = CoreArea.by_name.collect { |area| [area.name, area.id] }
-  @studies = Study.all.collect{ |study| [study.name, study.id]}
-  @people = Person.all
-  @units = Unit.all
-
-  if datatable.update_attributes(datatable_params)
-    flash[:notice] = 'Datatable was successfully updated.'
-  end
-
-  respond_with datatable
-end
-
-
- -
-

- - - (Object) update_temporal_extent - - - - - -

- - - - -
-
-
-
-150
-151
-152
-153
-154
-155
-156
-157
-158
-
-
# File 'app/controllers/datatables_controller.rb', line 150
-
-def update_temporal_extent
-  datatable.update_temporal_extent
-  datatable.save
-  #TODO write test to make sure the js fragment get's rendered
-  respond_to do |format|
-    format.json 
-    format.html {render :nothing => true}
-  end
-end
-
-
- -
- -
- - - - - \ No newline at end of file diff --git a/doc/DatatablesHelper.html b/doc/DatatablesHelper.html deleted file mode 100644 index 30f1df08b..000000000 --- a/doc/DatatablesHelper.html +++ /dev/null @@ -1,422 +0,0 @@ - - - - - - Module: DatatablesHelper - - — Documentation by YARD 0.8.7.6 - - - - - - - - - - - - - - - - - - - - - -

Module: DatatablesHelper - - - -

- -
- - - - - - - - -
Defined in:
-
app/helpers/datatables_helper.rb
- -
-
- - - - - - - - - -

- Instance Method Summary - (collapse) -

- - - - - - -
-

Instance Method Details

- - -
-

- - - (Boolean) ok_to_qc?(datatable) - - - - - -

-
- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-10
-11
-12
-
-
# File 'app/helpers/datatables_helper.rb', line 10
-
-def ok_to_qc?(datatable)
-  datatable.can_be_qcd_by?(current_user)
-end
-
-
- -
-

- - - (Object) options_for_data_type(variate) - - - - - -

- - - - -
-
-
-
-19
-20
-21
-22
-
-
# File 'app/helpers/datatables_helper.rb', line 19
-
-def options_for_data_type(variate)
-  options_for_select(['text','datetime','integer','real','text'],
-      variate.data_type)
-end
-
-
- -
-

- - - (Object) options_for_measurement_scale(variate) - - - - - -

- - - - -
-
-
-
-14
-15
-16
-17
-
-
# File 'app/helpers/datatables_helper.rb', line 14
-
-def options_for_measurement_scale(variate)
-  options_for_select(['nominal','interval','ratio', 'datetime'],
-      variate.measurement_scale)
-end
-
-
- -
-

- - - (Object) permission_request_email_list(datatable) - - - - - -

- - - - -
-
-
-
-3
-4
-5
-6
-7
-8
-
-
# File 'app/helpers/datatables_helper.rb', line 3
-
-def permission_request_email_list(datatable)
-  emails = datatable.owners.collect {|owner| owner.email}
-  emails << 'glbrc.data@kbs.msu.edu'
-  emails << 'sippel@msu.edu'
-  emails.join(',')
-end
-
-
- -
-

- - - (Object) render_study(options) - - - - - -

- - - - -
-
-
-
-24
-25
-26
-27
-28
-29
-30
-
-
# File 'app/helpers/datatables_helper.rb', line 24
-
-def render_study(options)
-  study = Study.where(options).first
-
-  if study
-    render :partial => 'study',  :locals => {study: study, themes: @themes, datatables: @datatables, website: @website}
-  end
-end
-
-
- -
- -
- - - - - \ No newline at end of file diff --git a/doc/DatatablesVariates.html b/doc/DatatablesVariates.html deleted file mode 100644 index c8587c084..000000000 --- a/doc/DatatablesVariates.html +++ /dev/null @@ -1,123 +0,0 @@ - - - - - - Class: DatatablesVariates - - — Documentation by YARD 0.8.7.6 - - - - - - - - - - - - - - - - - - - - - -

Class: DatatablesVariates - - - -

- -
- -
Inherits:
-
- ActiveRecord::Base - -
    -
  • Object
  • - - - - - -
- show all - -
- - - - - - - - - -
Defined in:
-
app/models/datatables_variates.rb
- -
-
- - - - - - - - - - - -
- - - - - \ No newline at end of file diff --git a/doc/EML.html b/doc/EML.html deleted file mode 100644 index 42373fbcf..000000000 --- a/doc/EML.html +++ /dev/null @@ -1,180 +0,0 @@ - - - - - - Module: EML - - — Documentation by YARD 0.8.7.6 - - - - - - - - - - - - - - - - - - - - - -

Module: EML - - - -

- -
- - - - - - - - -
Defined in:
-
lib/eml.rb
- -
-
- - - - - - - - - -

- Class Method Summary - (collapse) -

- - - - - - -
-

Class Method Details

- - -
-

- - + (Object) text_sanitize(text) - - - - - -

- - - - -
-
-
-
-2
-3
-4
-5
-6
-7
-
-
# File 'lib/eml.rb', line 2
-
-def EML.text_sanitize(text)
- doc = Nokogiri::HTML(text)
- doc.css('script').each {|node| node.remove }
- doc.css('link').each {|node| node.remove }
- doc.text.squeeze(" ").squeeze("\n")
-end
-
-
- -
- -
- - - - - \ No newline at end of file diff --git a/doc/ENW.html b/doc/ENW.html deleted file mode 100644 index 1d6bb49e6..000000000 --- a/doc/ENW.html +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - Class: ENW - - — Documentation by YARD 0.8.7.6 - - - - - - - - - - - - - - - - - - - - - -

Class: ENW - - - -

- -
- -
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
- - - - - - - - - -
Defined in:
-
app/models/to_enw.rb
- -
-
- - - - - - - - - - -
- - - - - \ No newline at end of file diff --git a/doc/EbookCitation.html b/doc/EbookCitation.html deleted file mode 100644 index 22b80ca63..000000000 --- a/doc/EbookCitation.html +++ /dev/null @@ -1,137 +0,0 @@ - - - - - - Class: EbookCitation - - — Documentation by YARD 0.8.7.6 - - - - - - - - - - - - - - - - - - - - - -

Class: EbookCitation - - - -

- -
- -
Inherits:
-
- Citation - -
    -
  • Object
  • - - - - - - - -
- show all - -
- - - - - - - - - -
Defined in:
-
app/models/ebook_citation.rb
- -
-
- - - - - - - - - - - - - - - -

Method Summary

- -

Methods inherited from Citation

-

#author_block, #author_block=, #authors_from_ris_authors, #bib_hash, #book?, by_date, by_treatment, by_type, citation_from_ris_stanza, #date_from_ris_date, #editor_block, #editor_block=, #file_title, #formatted, from_ris, from_website, #get_attribute_from_ris_stanza, #get_attributes_from_ris_stanza, #make_pdf_private, #make_pdf_public, #page_number_from_ris, #pdf_from_ris_pdf, select_options, #short_author_string, sorted_by, #to_bib, to_bib, to_enw, #to_enw, #treat_as_token_list, type_from_ris_type

- - - - -
- - - - - \ No newline at end of file diff --git a/doc/Editor.html b/doc/Editor.html deleted file mode 100644 index 3e512cef7..000000000 --- a/doc/Editor.html +++ /dev/null @@ -1,283 +0,0 @@ - - - - - - Class: Editor - - — Documentation by YARD 0.8.7.6 - - - - - - - - - - - - - - - - - - - - - -

Class: Editor - - - -

- -
- -
Inherits:
-
- ActiveRecord::Base - -
    -
  • Object
  • - - - - - -
- show all - -
- - - - - - -
Includes:
-
CitationFormat
- - - - - -
Defined in:
-
app/models/editor.rb
- -
-
- - -

Constant Summary

- - - - -

Constant Summary

- -

Constants included - from CitationFormat

-

CitationFormat::SUFFICES

- - - - - - -

- Class Method Summary - (collapse) -

- - - -

- Instance Method Summary - (collapse) -

- - - - - - - - - - - - - -

Methods included from CitationFormat

-

#extract_suffix, #first_initial, #format_as_default, #format_as_natural, #formatted, #full_name, #middle_initial, #name, #name=, #suffix_text, #treat_as_first_middle_last, #treat_as_last_first_middle

- - - -
-

Class Method Details

- - -
-

- - + (Object) to_enw - - - - - -

- - - - -
-
-
-
-10
-11
-12
-
-
# File 'app/models/editor.rb', line 10
-
-def Editor.to_enw
-  all.collect { |editor| editor.to_enw }.join
-end
-
-
- -
- -
-

Instance Method Details

- - -
-

- - - (Object) to_enw - - - - - -

- - - - -
-
-
-
-14
-15
-16
-
-
# File 'app/models/editor.rb', line 14
-
-def to_enw
-  "\n%E #{formatted}"
-end
-
-
- -
- -
- - - - - \ No newline at end of file diff --git a/doc/ElementHandler.html b/doc/ElementHandler.html deleted file mode 100644 index 3332cff3e..000000000 --- a/doc/ElementHandler.html +++ /dev/null @@ -1,419 +0,0 @@ - - - - - - Class: ElementHandler - - — Documentation by YARD 0.8.7.6 - - - - - - - - - - - - - - - - - - - - - -

Class: ElementHandler - - - -

- -
- -
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
- - - - - - - - - -
Defined in:
-
lib/element_handler.rb
- -
-
- - - - - - - - - -

- Instance Method Summary - (collapse) -

- - - - - - -
-

Instance Method Details

- - -
-

- - - (Object) apply(element) - - - - - -

- - - - -
-
-
-
-3
-4
-5
-
-
# File 'lib/element_handler.rb', line 3
-
-def apply element
-  element.each { |node| handle(node)} if element
-end
-
-
- -
-

- - - (Object) default_handler(element) - - - - - -

- - - - -
-
-
-
-26
-27
-28
-
-
# File 'lib/element_handler.rb', line 26
-
-def default_handler element
-  handle element
-end
-
-
- -
-

- - - (Object) handle(node) - - - - - -

- - - - -
-
-
-
-7
-8
-9
-10
-11
-12
-13
-14
-15
-
-
# File 'lib/element_handler.rb', line 7
-
-def handle node
-  if node.kind_of? REXML::Text
-    handleTextNode(node)
-  elsif node.kind_of? REXML::Element
-    handle_element node
-  else
-    return #ignore comments and processing instructions
-  end
-end
-
-
- -
-

- - - (Object) handle_element(element) - - - - - -

- - - - -
-
-
-
-17
-18
-19
-20
-21
-22
-23
-24
-
-
# File 'lib/element_handler.rb', line 17
-
-def handle_element element
-  handler_method = "handle_" + element.name.tr("-","_")
-  if self.respond_to? handler_method
-    self.send(handler_method, element)
-  else
-    default_handler(element)
-  end
-end
-
-
- -
-

- - - (Object) handleTextNode(textNode) - - - - - -

- - - - -
-
-
-
-30
-31
-32
-
-
# File 'lib/element_handler.rb', line 30
-
-def handleTextNode textNode
-  textNode.value
-end
-
-
- -
- -
- - - - - \ No newline at end of file diff --git a/doc/EmlDatatableBuilder.html b/doc/EmlDatatableBuilder.html deleted file mode 100644 index 2e9dee9a2..000000000 --- a/doc/EmlDatatableBuilder.html +++ /dev/null @@ -1,629 +0,0 @@ - - - - - - Class: EmlDatatableBuilder - - — Documentation by YARD 0.8.7.6 - - - - - - - - - - - - - - - - - - - - - -

Class: EmlDatatableBuilder - - - -

- -
- -
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
- - - - - - - - - -
Defined in:
-
lib/eml_datatable_builder.rb
- -
-
- - - - - -

Instance Attribute Summary (collapse)

- - - - - - -

- Instance Method Summary - (collapse) -

- - - - - -
-

Instance Attribute Details

- - - -
-

- - - (Object) datatable - - - - - -

-
- -

Returns the value of attribute datatable

- - -
-
-
- - -
- - - - -
-
-
-
-2
-3
-4
-
-
# File 'lib/eml_datatable_builder.rb', line 2
-
-def datatable
-  @datatable
-end
-
-
- - - -
-

- - - (Object) eml - - - - - -

-
- -

Returns the value of attribute eml

- - -
-
-
- - -
- - - - -
-
-
-
-3
-4
-5
-
-
# File 'lib/eml_datatable_builder.rb', line 3
-
-def eml
-  @eml
-end
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - - (Object) build(eml) - - - - - -

- - - - -
-
-
-
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-
-
# File 'lib/eml_datatable_builder.rb', line 5
-
-def build(eml)
-  @eml.dataTable 'id' => Rails.application.routes.url_helpers.datatable_path(datatable.id) do
-    @eml.entityName "Kellogg Biological Station LTER: #{datatable.title}"
-    if datatable.description.present?
-      text =  datatable.description.gsub(/<\/?[^>]*>/, "")
-      @eml.entityDescription EML.text_sanitize(text) unless text.strip.empty?
-    end
-#      eml_protocols if non_dataset_protocols.present?
-    eml_physical
-    eml_attributes
-  end
-end
-
-
- -
-

- - - (Object) eml_attributes - - - - - -

- - - - -
-
-
-
-58
-59
-60
-61
-62
-63
-64
-
-
# File 'lib/eml_datatable_builder.rb', line 58
-
-def eml_attributes
-  @eml.attributeList do
-    valid_variates.each do |variate|
-      variate.to_eml(@eml)
-    end
-  end
-end
-
-
- -
-

- - - (Object) eml_data_format - - - - - -

- - - - -
-
-
-
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-36
-37
-38
-39
-
-
# File 'lib/eml_datatable_builder.rb', line 24
-
-def eml_data_format
-  @eml.dataFormat do
-    @eml.textFormat do
-      @eml.numHeaderLines number_of_header_lines.to_s
-      @eml.numFooterLines 1
-      @eml.recordDelimiter '\n'
-      @eml.attributeOrientation 'column'
-      @eml.simpleDelimited do
-        @eml.fieldDelimiter ','
-        @eml.collapseDelimiters 'no'
-        @eml.quoteCharacter '"'
-        @eml.literalCharacter '\\'
-      end
-    end
-  end
-end
-
-
- -
-

- - - (Object) eml_physical - - - - - -

- - - - -
-
-
-
-41
-42
-43
-44
-45
-46
-47
-48
-49
-50
-51
-52
-53
-54
-55
-56
-
-
# File 'lib/eml_datatable_builder.rb', line 41
-
-def eml_physical
-  @eml.physical do
-    @eml.objectName title
-    @eml.encodingMethod "None"
-    eml_data_format
-    @eml.distribution do
-      @eml.online do
-        if is_sql
-          @eml.url "http://#{website_name}.kbs.msu.edu/datatables/#{self.id}.csv"
-        else
-          @eml.url data_url
-        end
-      end
-    end
-  end
-end
-
-
- -
-

- - - (Object) eml_protocols - - - - - -

- - - - -
-
-
-
-18
-19
-20
-21
-22
-
-
# File 'lib/eml_datatable_builder.rb', line 18
-
-def eml_protocols
-  # @eml.methods do
-  #   non_dataset_protocols.each { |protocol| protocol.to_eml_ref(@eml) }
-  # end
-end
-
-
- -
- -
- - - - - \ No newline at end of file diff --git a/doc/Invite.html b/doc/Invite.html deleted file mode 100644 index 42ae8cf8e..000000000 --- a/doc/Invite.html +++ /dev/null @@ -1,443 +0,0 @@ - - - - - - Class: Invite - - — Documentation by YARD 0.8.7.6 - - - - - - - - - - - - - - - - - - - - - -

Class: Invite - - - -

- -
- -
Inherits:
-
- ActiveRecord::Base - -
    -
  • Object
  • - - - - - -
- show all - -
- - - - - - - - - -
Defined in:
-
app/models/invite.rb
- -
-
- - - - - - - - - -

- Class Method Summary - (collapse) -

- - - -

- Instance Method Summary - (collapse) -

- - - - - - - -
-

Class Method Details

- - -
-

- - + (Object) find_redeemable(invite_code) - - - - - -

- - - - -
-
-
-
-22
-23
-24
-
-
# File 'app/models/invite.rb', line 22
-
-def self.find_redeemable(invite_code)
-  self.where(:redeemed_at => nil, :invite_code => invite_code).first
-end
-
-
- -
-

- - + (Object) unsent_invitations - - - - - -

- - - - -
-
-
-
-8
-9
-10
-
-
# File 'app/models/invite.rb', line 8
-
-def self.unsent_invitations
-  self.where(redeemed_at: nil, invite_code: nil)
-end
-
-
- -
- -
-

Instance Method Details

- - -
-

- - - (Object) invite! - - - - - -

- - - - -
-
-
-
-16
-17
-18
-19
-20
-
-
# File 'app/models/invite.rb', line 16
-
-def invite!
-  self.invite_code = Digest::SHA1.hexdigest("--#{Time.now.utc.to_s}--#{self.email}--")
-  self.invited_at = Time.now.utc
-  self.save!
-end
-
-
- -
-

- - - (Boolean) invited? - - - - - -

-
- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-12
-13
-14
-
-
# File 'app/models/invite.rb', line 12
-
-def invited?
-  self.invite_code.present? && self.invited_at.present?
-end
-
-
- -
-

- - - (Object) redeemed! - - - - - -

- - - - -
-
-
-
-26
-27
-28
-29
-
-
# File 'app/models/invite.rb', line 26
-
-def redeemed!
-  self.redeemed_at = Time.now.utc
-  self.save!
-end
-
-
- -
- -
- - - - - \ No newline at end of file diff --git a/doc/InviteMailer.html b/doc/InviteMailer.html deleted file mode 100644 index eefed2388..000000000 --- a/doc/InviteMailer.html +++ /dev/null @@ -1,196 +0,0 @@ - - - - - - Class: InviteMailer - - — Documentation by YARD 0.8.7.6 - - - - - - - - - - - - - - - - - - - - - -

Class: InviteMailer - - - -

- -
- -
Inherits:
-
- ActionMailer::Base - -
    -
  • Object
  • - - - - - -
- show all - -
- - - - - - - - - -
Defined in:
-
app/mailers/invite_mailer.rb
- -
-
- - - - - - - - - -

- Instance Method Summary - (collapse) -

- - - - - - - -
-

Instance Method Details

- - -
-

- - - (Object) invitation(invite) - - - - - -

- - - - -
-
-
-
-4
-5
-6
-7
-8
-
-
# File 'app/mailers/invite_mailer.rb', line 4
-
-def invitation(invite)
-  @invite = invite
-  mail(:to => invite.email,
-       :subject => "Welcome to the GLBRC Sustainability Data Catalog")
-end
-
-
- -
- -
- - - - - \ No newline at end of file diff --git a/doc/InvitesController.html b/doc/InvitesController.html deleted file mode 100644 index ce1820fb4..000000000 --- a/doc/InvitesController.html +++ /dev/null @@ -1,732 +0,0 @@ - - - - - - Class: InvitesController - - — Documentation by YARD 0.8.7.6 - - - - - - - - - - - - - - - - - - - - - -

Class: InvitesController - - - -

- -
- -
Inherits:
-
- ApplicationController - - - show all - -
- - - - - - - - - -
Defined in:
-
app/controllers/invites_controller.rb
- -
-
- - - - - - - - - -

- Instance Method Summary - (collapse) -

- - - - - - - - - - - - - - -
-

Instance Method Details

- - -
-

- - - (Object) create - - - - - -

-
- -

POST /invites POST /invites.xml

- - -
-
-
- - -
- - - - -
-
-
-
-43
-44
-45
-46
-47
-48
-49
-50
-51
-52
-53
-54
-55
-
-
# File 'app/controllers/invites_controller.rb', line 43
-
-def create
-  @invite = Invite.new(invite_params)
-
-  respond_to do |format|
-    if @invite.save
-      format.html { redirect_to(@invite, :notice => 'Invite was successfully created.') }
-      format.xml  { render :xml => @invite, :status => :created, :location => @invite }
-    else
-      format.html { render "new" }
-      format.xml  { render :xml => @invite.errors, :status => :unprocessable_entity }
-    end
-  end
-end
-
-
- -
-

- - - (Object) destroy - - - - - -

-
- -

DELETE /invites/1 DELETE /invites/1.xml

- - -
-
-
- - -
- - - - -
-
-
-
-73
-74
-75
-76
-77
-78
-79
-80
-
-
# File 'app/controllers/invites_controller.rb', line 73
-
-def destroy
-  @invite.destroy
-
-  respond_to do |format|
-    format.html { redirect_to(invites_url) }
-    format.xml  { head :ok }
-  end
-end
-
-
- -
-

- - - (Object) edit - - - - - -

-
- -

GET /invites/1/edit

- - -
-
-
- - -
- - - - -
-
-
-
-38
-39
-
-
# File 'app/controllers/invites_controller.rb', line 38
-
-def edit
-end
-
-
- -
-

- - - (Object) index - - - - - -

-
- -

GET /invites GET /invites.xml

- - -
-
-
- - -
- - - - -
-
-
-
-8
-9
-10
-11
-12
-13
-14
-15
-
-
# File 'app/controllers/invites_controller.rb', line 8
-
-def index
-  @invites = Invite.all
-
-  respond_to do |format|
-    format.html # index.html.erb
-    format.xml  { render :xml => @invites }
-  end
-end
-
-
- -
-

- - - (Object) new - - - - - -

-
- -

GET /invites/new GET /invites/new.xml

- - -
-
-
- - -
- - - - -
-
-
-
-28
-29
-30
-31
-32
-33
-34
-35
-
-
# File 'app/controllers/invites_controller.rb', line 28
-
-def new
-  @invite = Invite.new
-
-  respond_to do |format|
-    format.html # new.html.erb
-    format.xml  { render :xml => @invite }
-  end
-end
-
-
- -
-

- - - (Object) send_invitation - - - - - -

- - - - -
-
-
-
-82
-83
-84
-85
-86
-87
-
-
# File 'app/controllers/invites_controller.rb', line 82
-
-def send_invitation
-  @invite.invite!
-  InviteMailer.invitation(@invite).deliver
-  flash[:notice] = "Invite sent to #{@invite.email}"
-  redirect_to(invites_url)
-end
-
-
- -
-

- - - (Object) show - - - - - -

-
- -

GET /invites/1 GET /invites/1.xml

- - -
-
-
- - -
- - - - -
-
-
-
-19
-20
-21
-22
-23
-24
-
-
# File 'app/controllers/invites_controller.rb', line 19
-
-def show
-  respond_to do |format|
-    format.html # show.html.erb
-    format.xml  { render :xml => @invite }
-  end
-end
-
-
- -
-

- - - (Object) update - - - - - -

-
- -

PUT /invites/1 PUT /invites/1.xml

- - -
-
-
- - -
- - - - -
-
-
-
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-
-
# File 'app/controllers/invites_controller.rb', line 59
-
-def update
-  respond_to do |format|
-    if @invite.update_attributes(invite_params)
-      format.html { redirect_to(@invite, :notice => 'Invite was successfully updated.') }
-      format.xml  { head :ok }
-    else
-      format.html { render "edit" }
-      format.xml  { render :xml => @invite.errors, :status => :unprocessable_entity }
-    end
-  end
-end
-
-
- -
- -
- - - - - \ No newline at end of file diff --git a/doc/MeasurementScale.html b/doc/MeasurementScale.html deleted file mode 100644 index d8af6be01..000000000 --- a/doc/MeasurementScale.html +++ /dev/null @@ -1,123 +0,0 @@ - - - - - - Class: MeasurementScale - - — Documentation by YARD 0.8.7.6 - - - - - - - - - - - - - - - - - - - - - -

Class: MeasurementScale - - - -

- -
- -
Inherits:
-
- ActiveRecord::Base - -
    -
  • Object
  • - - - - - -
- show all - -
- - - - - - - - - -
Defined in:
-
app/models/measurement_scale.rb
- -
-
- - - - - - - - - - - -
- - - - - \ No newline at end of file diff --git a/doc/Meeting.html b/doc/Meeting.html deleted file mode 100644 index 7100ebfba..000000000 --- a/doc/Meeting.html +++ /dev/null @@ -1,248 +0,0 @@ - - - - - - Class: Meeting - - — Documentation by YARD 0.8.7.6 - - - - - - - - - - - - - - - - - - - - - -

Class: Meeting - - - -

- -
- -
Inherits:
-
- ActiveRecord::Base - -
    -
  • Object
  • - - - - - -
- show all - -
- - - - - - - - - -
Defined in:
-
app/models/meeting.rb
- -
-
- - - - - - - - - -

- Instance Method Summary - (collapse) -

- - - - - - - -
-

Instance Method Details

- - -
-

- - - (Object) poster_abstracts - - - - - -

- - - - -
-
-
-
-7
-8
-9
-10
-
-
# File 'app/models/meeting.rb', line 7
-
-def poster_abstracts
-  type = MeetingAbstractType.where(name: "Poster").first
-  abstracts.where(meeting_abstract_type_id: type.id)
-end
-
-
- -
-

- - - (Object) presentation_abstracts - - - - - -

- - - - -
-
-
-
-12
-13
-14
-15
-
-
# File 'app/models/meeting.rb', line 12
-
-def presentation_abstracts
-  type = MeetingAbstractType.where(name: "Presentation").first
-  abstracts.where(meeting_abstract_type_id: type.id)
-end
-
-
- -
- -
- - - - - \ No newline at end of file diff --git a/doc/MeetingAbstractType.html b/doc/MeetingAbstractType.html deleted file mode 100644 index ae700937c..000000000 --- a/doc/MeetingAbstractType.html +++ /dev/null @@ -1,123 +0,0 @@ - - - - - - Class: MeetingAbstractType - - — Documentation by YARD 0.8.7.6 - - - - - - - - - - - - - - - - - - - - - -

Class: MeetingAbstractType - - - -

- -
- -
Inherits:
-
- ActiveRecord::Base - -
    -
  • Object
  • - - - - - -
- show all - -
- - - - - - - - - -
Defined in:
-
app/models/meeting_abstract_type.rb
- -
-
- - - - - - - - - - - -
- - - - - \ No newline at end of file diff --git a/doc/MeetingsController.html b/doc/MeetingsController.html deleted file mode 100644 index 43d6e0280..000000000 --- a/doc/MeetingsController.html +++ /dev/null @@ -1,604 +0,0 @@ - - - - - - Class: MeetingsController - - — Documentation by YARD 0.8.7.6 - - - - - - - - - - - - - - - - - - - - - -

Class: MeetingsController - - - -

- -
- -
Inherits:
-
- ApplicationController - - - show all - -
- - - - - - - - - -
Defined in:
-
app/controllers/meetings_controller.rb
- -
-
- - - - - - - - - -

- Instance Method Summary - (collapse) -

- - - - - - - - - - - - - - -
-

Instance Method Details

- - -
-

- - - (Object) create - - - - - -

- - - - -
-
-
-
-39
-40
-41
-42
-43
-44
-45
-46
-47
-48
-49
-50
-51
-
-
# File 'app/controllers/meetings_controller.rb', line 39
-
-def create
-  @meeting = Meeting.new(meeting_params)
-  respond_to do |format|
-    if @meeting.save
-      flash[:notice] = 'Meeting was successfully created.'
-      format.html { redirect_to meetings_url }
-      format.xml  { head :created, :location => meeting_url(@meeting) }
-    else
-      format.html { render "new" }
-      format.xml  { render :xml => @meeting.errors.to_xml }
-    end
-  end
-end
-
-
- -
-

- - - (Object) destroy - - - - - -

- - - - -
-
-
-
-67
-68
-69
-70
-71
-72
-73
-74
-
-
# File 'app/controllers/meetings_controller.rb', line 67
-
-def destroy
-  @meeting.destroy
-   respond_to do |format|
-     format.html { redirect_to meetings_url }
-     format.xml  { head :ok }
-     format.js   { render :nothing => true }
-   end
-end
-
-
- -
-

- - - (Object) edit - - - - - -

- - - - -
-
-
-
-36
-37
-
-
# File 'app/controllers/meetings_controller.rb', line 36
-
-def edit
-end
-
-
- -
-

- - - (Object) index - - - - - -

- - - - -
-
-
-
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
-
-
# File 'app/controllers/meetings_controller.rb', line 7
-
-def index
-  # venue = 1 # KBS
-  # venue = 2 if params[:location] == 'national'
-
-  @local_venue = VenueType.find(1)
-  @local_meetings = @local_venue.meetings
-
-  @national_venue = VenueType.find(2)
-  @national_meetings = @national_venue.meetings
-
-  respond_to do |format|
-    format.html #index.html
-    format.xml { render :xml => @meetings.to_xml}
-  end
-end
-
-
- -
-

- - - (Object) new - - - - - -

- - - - -
-
-
-
-32
-33
-34
-
-
# File 'app/controllers/meetings_controller.rb', line 32
-
-def new
-  @meeting = Meeting.new
-end
-
-
- -
-

- - - (Object) show - - - - - -

-
- -

GET /meeting/1 GET /meeting/1.xml

- - -
-
-
- - -
- - - - -
-
-
-
-25
-26
-27
-28
-29
-30
-
-
# File 'app/controllers/meetings_controller.rb', line 25
-
-def show
-  respond_to do |format|
-    format.html
-    format.xml  { render :xml => @person.to_xml }
-  end
-end
-
-
- -
-

- - - (Object) update - - - - - -

- - - - -
-
-
-
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-
-
# File 'app/controllers/meetings_controller.rb', line 53
-
-def update
-  respond_to do |format|
-     if @meeting.update_attributes(meeting_params)
-       flash[:notice] = 'Meetings was successfully updated.'
-       format.html { redirect_to meeting_url(@meeting) }
-       format.xml  { head :ok }
-     else
-       @venues = VenueType.find(:all).collect { |type| [type.name, type.id] }
-       format.html { render "edit" }
-       format.xml  { render :xml => @meeting.errors.to_xml }
-     end
-   end
-end
-
-
- -
- -
- - - - - \ No newline at end of file diff --git a/doc/Membership.html b/doc/Membership.html deleted file mode 100644 index 924617278..000000000 --- a/doc/Membership.html +++ /dev/null @@ -1,123 +0,0 @@ - - - - - - Class: Membership - - — Documentation by YARD 0.8.7.6 - - - - - - - - - - - - - - - - - - - - - -

Class: Membership - - - -

- -
- -
Inherits:
-
- ActiveRecord::Base - -
    -
  • Object
  • - - - - - -
- show all - -
- - - - - - - - - -
Defined in:
-
app/models/membership.rb
- -
-
- - - - - - - - - - - -
- - - - - \ No newline at end of file diff --git a/doc/Ownership.html b/doc/Ownership.html deleted file mode 100644 index 99ce2da7d..000000000 --- a/doc/Ownership.html +++ /dev/null @@ -1,200 +0,0 @@ - - - - - - Class: Ownership - - — Documentation by YARD 0.8.7.6 - - - - - - - - - - - - - - - - - - - - - -

Class: Ownership - - - -

- -
- -
Inherits:
-
- ActiveRecord::Base - -
    -
  • Object
  • - - - - - -
- show all - -
- - - - - - - - - -
Defined in:
-
app/models/ownership.rb
- -
-
- - - - - - - - - -

- Class Method Summary - (collapse) -

- - - - - - - -
-

Class Method Details

- - -
-

- - + (Object) create_ownerships(users, datatables, overwrite = false) - - - - - -

- - - - -
-
-
-
-10
-11
-12
-13
-14
-15
-16
-
-
# File 'app/models/ownership.rb', line 10
-
-def Ownership.create_ownerships(users, datatables, overwrite=false)
-  datatables.each { |datatable| destroy_all(:datatable_id => datatable) } if overwrite
-  users.product(datatables).each do |user, table|
-    ownership = Ownership.new(:user_id => user, :datatable_id => table)
-    ownership.save
-  end
-end
-
-
- -
- -
- - - - - \ No newline at end of file diff --git a/doc/OwnershipsController.html b/doc/OwnershipsController.html deleted file mode 100644 index 72ec393a1..000000000 --- a/doc/OwnershipsController.html +++ /dev/null @@ -1,477 +0,0 @@ - - - - - - Class: OwnershipsController - - — Documentation by YARD 0.8.7.6 - - - - - - - - - - - - - - - - - - - - - -

Class: OwnershipsController - - - -

- -
- -
Inherits:
-
- ApplicationController - - - show all - -
- - - - - - - - - -
Defined in:
-
app/controllers/ownerships_controller.rb
- -
-
- - - - - - - - - -

- Instance Method Summary - (collapse) -

- - - - - - - - - - - - - - -
-

Instance Method Details

- - -
-

- - - (Object) create - - - - - -

- - - - -
-
-
-
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-36
-37
-38
-39
-40
-41
-42
-
-
# File 'app/controllers/ownerships_controller.rb', line 22
-
-def create
-  users = params[:users]
-  @datatable = Datatable.find(params[:datatable]) if params[:datatable]
-  overwrite = @datatable.present?
-  datatables = @datatable ? [@datatable.id] : params[:datatables]
-  if users.present? && datatables.present?
-    Ownership.create_ownerships(users, datatables, overwrite)
-    if @datatable
-      redirect_to ownership_path(:id => @datatable.id)
-    else
-      redirect_to ownerships_path
-    end
-  else
-    @datatables = Datatable.by_name unless @datatable
-    @users = User.by_email
-    @ownership = Ownership.new
-    @user_count = 1
-    @datatable_count = 1 unless @datatable
-    render 'new'
-  end
-end
-
-
- -
-

- - - (Object) index - - - - - -

- - - - -
-
-
-
-5
-6
-7
-
-
# File 'app/controllers/ownerships_controller.rb', line 5
-
-def index
-  @datatables = Datatable.by_name
-end
-
-
- -
-

- - - (Object) new - - - - - -

- - - - -
-
-
-
-13
-14
-15
-16
-17
-18
-19
-20
-
-
# File 'app/controllers/ownerships_controller.rb', line 13
-
-def new
-  @datatable = Datatable.find(params[:datatable]) if params[:datatable]
-  @datatables = Datatable.by_name unless @datatable
-  @users = User.by_email
-  @ownership = Ownership.new
-  @user_count = 1
-  @datatable_count = 1 unless @datatable
-end
-
-
- -
-

- - - (Object) revoke - - - - - -

- - - - -
-
-
-
-44
-45
-46
-47
-48
-49
-50
-51
-52
-53
-54
-55
-56
-57
-
-
# File 'app/controllers/ownerships_controller.rb', line 44
-
-def revoke
-  user = User.find(params[:user])
-  datatable = Datatable.find(params[:datatable])
-  ownerships = Ownership.where(user_id: user, datatable_id: datatable)
-  ownerships.each do |ownership|
-    ownership.destroy
-  end
-
-  respond_to do |format|
-    flash[:notice] = 'Ownership has been revoked from ' + user.email
-    format.html { redirect_to ownership_path(datatable) }
-    format.xml  { head :ok }
-  end
-end
-
-
- -
-

- - - (Object) show - - - - - -

- - - - -
-
-
-
-9
-10
-11
-
-
# File 'app/controllers/ownerships_controller.rb', line 9
-
-def show
-  get_datatable
-end
-
-
- -
- -
- - - - - \ No newline at end of file diff --git a/doc/Page.html b/doc/Page.html deleted file mode 100644 index 77b277d78..000000000 --- a/doc/Page.html +++ /dev/null @@ -1,123 +0,0 @@ - - - - - - Class: Page - - — Documentation by YARD 0.8.7.6 - - - - - - - - - - - - - - - - - - - - - -

Class: Page - - - -

- -
- -
Inherits:
-
- ActiveRecord::Base - -
    -
  • Object
  • - - - - - -
- show all - -
- - - - - - - - - -
Defined in:
-
app/models/page.rb
- -
-
- - - - - - - - - - - -
- - - - - \ No newline at end of file diff --git a/doc/PageImage.html b/doc/PageImage.html deleted file mode 100644 index fe3504d30..000000000 --- a/doc/PageImage.html +++ /dev/null @@ -1,123 +0,0 @@ - - - - - - Class: PageImage - - — Documentation by YARD 0.8.7.6 - - - - - - - - - - - - - - - - - - - - - -

Class: PageImage - - - -

- -
- -
Inherits:
-
- ActiveRecord::Base - -
    -
  • Object
  • - - - - - -
- show all - -
- - - - - - - - - -
Defined in:
-
app/models/page_image.rb
- -
-
- - - - - - - - - - - -
- - - - - \ No newline at end of file diff --git a/doc/PagesController.html b/doc/PagesController.html deleted file mode 100644 index 961b21aad..000000000 --- a/doc/PagesController.html +++ /dev/null @@ -1,537 +0,0 @@ - - - - - - Class: PagesController - - — Documentation by YARD 0.8.7.6 - - - - - - - - - - - - - - - - - - - - - -

Class: PagesController - - - -

- -
- -
Inherits:
-
- ApplicationController - - - show all - -
- - - - - - - - - -
Defined in:
-
app/controllers/pages_controller.rb
- -
-
- - - - - - - - - -

- Instance Method Summary - (collapse) -

- - - - - - - - - - - - - - -
-

Instance Method Details

- - -
-

- - - (Object) create - - - - - -

- - - - -
-
-
-
-20
-21
-22
-23
-24
-25
-26
-27
-
-
# File 'app/controllers/pages_controller.rb', line 20
-
-def create
-  @page = Page.new(page_params)
-  if @page.save
-    flash[:notice] = 'Page was successfully created.'
-  end
-
-  respond_with @page
-end
-
-
- -
-

- - - (Object) destroy - - - - - -

- - - - -
-
-
-
-41
-42
-43
-44
-
-
# File 'app/controllers/pages_controller.rb', line 41
-
-def destroy 
-  page.destroy
-  redirect_to :action => 'index'
-end
-
-
- -
-

- - - (Object) edit - - - - - -

- - - - -
-
-
-
-29
-30
-31
-
-
# File 'app/controllers/pages_controller.rb', line 29
-
-def edit
-  @page = page
-end
-
-
- -
-

- - - (Object) index - - - - - -

- - - - -
-
-
-
-6
-7
-8
-
-
# File 'app/controllers/pages_controller.rb', line 6
-
-def index
-  return head :bad_request
-end
-
-
- -
-

- - - (Object) new - - - - - -

- - - - -
-
-
-
-15
-16
-17
-18
-
-
# File 'app/controllers/pages_controller.rb', line 15
-
-def new
-  @page = Page.new
-  @page.page_images << PageImage.new
-end
-
-
- -
-

- - - (Object) show - - - - - -

- - - - -
-
-
-
-10
-11
-12
-13
-
-
# File 'app/controllers/pages_controller.rb', line 10
-
-def show
-  @page = page
-  @title = @page.title
-end
-
-
- -
-

- - - (Object) update - - - - - -

- - - - -
-
-
-
-33
-34
-35
-36
-37
-38
-39
-
-
# File 'app/controllers/pages_controller.rb', line 33
-
-def update
-  if page.update_attributes(page_params)
-    flash[:notice] = 'Page was successfully updated.'
-  end
-
-  respond_with page
-end
-
-
- -
- -
- - - - - \ No newline at end of file diff --git a/doc/PeopleController.html b/doc/PeopleController.html deleted file mode 100644 index 82bb83a5e..000000000 --- a/doc/PeopleController.html +++ /dev/null @@ -1,814 +0,0 @@ - - - - - - Class: PeopleController - - — Documentation by YARD 0.8.7.6 - - - - - - - - - - - - - - - - - - - - - -

Class: PeopleController - - - -

- -
- -
Inherits:
-
- ApplicationController - - - show all - -
- - - - - - - - - -
Defined in:
-
app/controllers/people_controller.rb
- -
-
- - - - - - - - - -

- Instance Method Summary - (collapse) -

- - - - - - - - - - - - - - -
-

Instance Method Details

- - -
-

- - - (Object) alphabetical - - - - - -

- - - - -
-
-
-
-19
-20
-21
-22
-23
-24
-
-
# File 'app/controllers/people_controller.rb', line 19
-
-def alphabetical
-  @title = 'KBS LTER Directory (alphabetical)'
-  respond_to do |format|
-    format.html # index.rhtml
-  end
-end
-
-
- -
-

- - - (Object) create - - - - - -

-
- -

POST /people POST /people.xml

- - -
-
-
- - -
- - - - -
-
-
-
-56
-57
-58
-59
-60
-61
-62
-
-
# File 'app/controllers/people_controller.rb', line 56
-
-def create
-  @person = Person.new(person_params)
-  if @person.save
-    flash[:notice] = 'Person was successfully created.'
-  end
-  respond_with @person
-end
-
-
- -
-

- - - (Object) destroy - - - - - -

-
- -

DELETE /people/1 DELETE /people/1.xml

- - -
-
-
- - -
- - - - -
-
-
-
-75
-76
-77
-78
-79
-80
-81
-82
-
-
# File 'app/controllers/people_controller.rb', line 75
-
-def destroy
-  person.destroy
-
-  respond_to do |format|
-    format.html { redirect_to people_url }
-    format.xml  { head :ok }
-  end
-end
-
-
- -
-

- - - (Object) edit - - - - - -

-
- -

GET /people/1/edit

- - -
-
-
- - -
- - - - -
-
-
-
-49
-50
-51
-52
-
-
# File 'app/controllers/people_controller.rb', line 49
-
-def edit
-  @title = 'Edit ' + person.full_name
-  @roles = lter_roles
-end
-
-
- -
-

- - - (Object) emeritus - - - - - -

- - - - -
-
-
-
-26
-27
-28
-29
-30
-31
-
-
# File 'app/controllers/people_controller.rb', line 26
-
-def emeritus
-  @roles = RoleType.find_by_name('lter').roles.order('seniority').where('name like ?','Emeritus%')
-  respond_to do |format|
-    format.html # emeritus.rhtml
-  end
-end
-
-
- -
-

- - - (Object) index - - - - - -

-
- -

GET /people GET /people.xml

- - -
-
-
- - -
- - - - -
-
-
-
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-
-
# File 'app/controllers/people_controller.rb', line 7
-
-def index
-  # expires_in 6.minutes, :public=>true
-
-  roleType = RoleType.find_by(name: 'lter')
-  if roleType
-    @roles = roleType.roles.order('seniority').where('name not like ?','Emeritus%')
-  end
-  respond_to do |format|
-    format.html # index.rhtml
-  end
-end
-
-
- -
-

- - - (Object) new - - - - - -

-
- -

GET /people/new

- - -
-
-
- - -
- - - - -
-
-
-
-43
-44
-45
-46
-
-
# File 'app/controllers/people_controller.rb', line 43
-
-def new
-  @person = Person.new
-  @roles = lter_roles 
-end
-
-
- -
-

- - - (Object) show - - - - - -

-
- -

GET /people/1 GET /people/1.xml

- - -
-
-
- - -
- - - - -
-
-
-
-38
-39
-40
-
-
# File 'app/controllers/people_controller.rb', line 38
-
-def show
-  respond_with person
-end
-
-
- -
-

- - - (Object) show_all - - - - - -

- - - - -
-
-
-
-33
-34
-
-
# File 'app/controllers/people_controller.rb', line 33
-
-def show_all
-end
-
-
- -
-

- - - (Object) update - - - - - -

-
- -

PUT /people/1 PUT /people/1.xml

- - -
-
-
- - -
- - - - -
-
-
-
-66
-67
-68
-69
-70
-71
-
-
# File 'app/controllers/people_controller.rb', line 66
-
-def update
-  if person.update_attributes(person_params)
-    flash[:notice] = 'Person was successfully updated.'
-  end
-  respond_with person
-end
-
-
- -
- -
- - - - - \ No newline at end of file diff --git a/doc/PeopleHelper.html b/doc/PeopleHelper.html deleted file mode 100644 index 9a345498a..000000000 --- a/doc/PeopleHelper.html +++ /dev/null @@ -1,364 +0,0 @@ - - - - - - Module: PeopleHelper - - — Documentation by YARD 0.8.7.6 - - - - - - - - - - - - - - - - - - - - - -

Module: PeopleHelper - - - -

- -
- - - - - - - - -
Defined in:
-
app/helpers/people_helper.rb
- -
-
- - - - - - - - - -

- Instance Method Summary - (collapse) -

- - - - - - -
-

Instance Method Details

- - -
-

- - - (Object) committee_affiliations(committee, role) - - - - - -

- - - - -
-
-
-
-13
-14
-15
-16
-
-
# File 'app/helpers/people_helper.rb', line 13
-
-def committee_affiliations(committee, role)
-  affiliations = role.people.collect {|x| x.affiliations.where(:role_id => role).where(:title => committee)}
-  affiliations.flatten.uniq #.sort {|a,b| a.seniority <=> b.seniority }
-end
-
-
- -
- - - - - -
-
-
-
-3
-4
-5
-
-
# File 'app/helpers/people_helper.rb', line 3
-
-def contact_link(email)
-  "#{email.gsub(/@/,' at ')}"
-end
-
-
- -
-

- - - (Object) parenthize(string) - - - - - -

- - - - -
-
-
-
-7
-8
-9
-10
-11
-
-
# File 'app/helpers/people_helper.rb', line 7
-
-def parenthize(string)
-  return string if string.nil?
-  return string if string.strip == ""
-  return "("+string+")"
-end
-
-
- -
-

- - - (Object) show_committee(committee, role) - - - - - -

- - - - -
-
-
-
-18
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-
-
# File 'app/helpers/people_helper.rb', line 18
-
-def show_committee(committee,role)
-  first_one = true
-  html = "<li>#{committee}:  "
-  committee_people = committee_affiliations(committee, role).collect {|x| x.person }
-  committee_people.each do |person|
-    if first_one
-      html += link_to "#{person.full_name}", person_path(person)
-      first_one = false
-    else
-      html += ", "
-      html += link_to "#{person.full_name}", person_path(person)
-    end 
-
-  end
-  html += "</li>"
-  html
-end
-
-
- -
- -
- - - - - \ No newline at end of file diff --git a/doc/Permission.html b/doc/Permission.html deleted file mode 100644 index 86d8bdd42..000000000 --- a/doc/Permission.html +++ /dev/null @@ -1,567 +0,0 @@ - - - - - - Class: Permission - - — Documentation by YARD 0.8.7.6 - - - - - - - - - - - - - - - - - - - - - -

Class: Permission - - - -

- -
- -
Inherits:
-
- ActiveRecord::Base - -
    -
  • Object
  • - - - - - -
- show all - -
- - - - - - - - - -
Defined in:
-
app/models/permission.rb
- -
-
- - - - - - - - - -

- Class Method Summary - (collapse) -

- - - -

- Instance Method Summary - (collapse) -

- - - - - - - -
-

Class Method Details

- - -
-

- - + (Object) permitted_users - - - - - -

- - - - -
-
-
-
-14
-15
-16
-
-
# File 'app/models/permission.rb', line 14
-
-def Permission.permitted_users
-  all.collect { |permission| permission.user unless permission.denied? }.compact
-end
-
-
- -
- -
-

Instance Method Details

- - -
-

- - - (Boolean) datatable_exists? - - - - - -

-
- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-38
-39
-40
-41
-42
-
-
# File 'app/models/permission.rb', line 38
-
-def datatable_exists?
-  unless datatable && Datatable.find(datatable.id)
-    errors[:base] << 'datatable must exist'
-  end
-end
-
-
- -
-

- - - (Boolean) denied? - - - - - -

-
- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-18
-19
-20
-
-
# File 'app/models/permission.rb', line 18
-
-def denied?
-  decision != 'approved'
-end
-
-
- -
-

- - - (Object) only_owners_can_set_permissions - - - - - -

- - - - -
-
-
-
-22
-23
-24
-
-
# File 'app/models/permission.rb', line 22
-
-def only_owners_can_set_permissions
-  errors[:base] << 'owners only' unless owner.try(:owns?, datatable)
-end
-
-
- -
-

- - - (Boolean) owner_exists? - - - - - -

-
- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-32
-33
-34
-35
-36
-
-
# File 'app/models/permission.rb', line 32
-
-def owner_exists?
-  unless owner && User.find(owner.id)
-    errors[:base] << 'owner must exist'
-  end
-end
-
-
- -
-

- - - (Boolean) user_exists? - - - - - -

-
- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-26
-27
-28
-29
-30
-
-
# File 'app/models/permission.rb', line 26
-
-def user_exists?
-  unless user && User.find(user.id)
-    errors[:base] << 'user must exist'
-  end
-end
-
-
- -
- -
- - - - - \ No newline at end of file diff --git a/doc/PermissionRequest.html b/doc/PermissionRequest.html deleted file mode 100644 index 081ac12ee..000000000 --- a/doc/PermissionRequest.html +++ /dev/null @@ -1,123 +0,0 @@ - - - - - - Class: PermissionRequest - - — Documentation by YARD 0.8.7.6 - - - - - - - - - - - - - - - - - - - - - -

Class: PermissionRequest - - - -

- -
- -
Inherits:
-
- ActiveRecord::Base - -
    -
  • Object
  • - - - - - -
- show all - -
- - - - - - - - - -
Defined in:
-
app/models/permission_request.rb
- -
-
- - - - - - - - - - - -
- - - - - \ No newline at end of file diff --git a/doc/PermissionRequestsController.html b/doc/PermissionRequestsController.html deleted file mode 100644 index 6a886ac8c..000000000 --- a/doc/PermissionRequestsController.html +++ /dev/null @@ -1,211 +0,0 @@ - - - - - - Class: PermissionRequestsController - - — Documentation by YARD 0.8.7.6 - - - - - - - - - - - - - - - - - - - - - -

Class: PermissionRequestsController - - - -

- -
- -
Inherits:
-
- ApplicationController - - - show all - -
- - - - - - - - - -
Defined in:
-
app/controllers/permission_requests_controller.rb
- -
-
- - - - - - - - - -

- Instance Method Summary - (collapse) -

- - - - - - - - - - - - - - -
-

Instance Method Details

- - -
-

- - - (Object) create - - - - - -

- - - - -
-
-
-
-7
-8
-9
-10
-11
-12
-13
-14
-
-
# File 'app/controllers/permission_requests_controller.rb', line 7
-
-def create
-  user = current_user
-  @datatable = Datatable.find(params[:datatable])
-  flash[:notice] = 'Invalid user' unless user
-  permission_request = PermissionRequest.new(:user => user, :datatable => @datatable)
-  permission_request.save
-  render :nothing => true
-end
-
-
- -
- -
- - - - - \ No newline at end of file diff --git a/doc/PermissionsController.html b/doc/PermissionsController.html deleted file mode 100644 index 322792d1f..000000000 --- a/doc/PermissionsController.html +++ /dev/null @@ -1,547 +0,0 @@ - - - - - - Class: PermissionsController - - — Documentation by YARD 0.8.7.6 - - - - - - - - - - - - - - - - - - - - - -

Class: PermissionsController - - - -

- -
- -
Inherits:
-
- ApplicationController - - - show all - -
- - - - - - - - - -
Defined in:
-
app/controllers/permissions_controller.rb
- -
-
- - - - - - - - - -

- Instance Method Summary - (collapse) -

- - - - - - - - - - - - - - -
-

Instance Method Details

- - -
-

- - - (Object) create - - - - - -

- - - - -
-
-
-
-18
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-36
-37
-
-
# File 'app/controllers/permissions_controller.rb', line 18
-
-def create
-  user = User.find_by_email(params[:email])
-  flash[:notice] = 'No user with that email' unless user
-  permission = Permission.where(:user_id => user, :datatable_id => @datatable, :owner_id => current_user.id).first || Permission.new
-  permission.datatable_id = @datatable.id
-  permission.user = user
-  permission.owner = current_user
-  permission.decision = "approved"
-
-  respond_to do |format|
-    if permission.save
-      flash[:notice] = "Permission has been granted to #{user}"
-      format.html { redirect_to permission_path(@datatable.id) }
-      format.xml  { head :created, :location => permission_path(@datatable.id) }
-    else
-      format.html { render "new" }
-      format.xml  { render :xml => permission.errors.to_xml }
-    end
-  end
-end
-
-
- -
-

- - - (Object) deny - - - - - -

- - - - -
-
-
-
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-
-
# File 'app/controllers/permissions_controller.rb', line 54
-
-def deny
-  user = User.find_by_email(params[:email])
-  owner = current_user
-  permission = Permission.where(user_id: user, datatable_id: @datatable, owner_id: owner).first
-  if permission
-    permission.decision = "denied"
-  else
-    permission = Permission.new(:user => user, :datatable => @datatable, :owner => owner, :decision => "denied")
-  end
-
-  permission.save
-  respond_to do |format|
-    flash[:notice] = 'Permission has been denied for ' + user.email
-    format.html { redirect_to permission_path(@datatable) }
-    format.xml { head :ok }
-  end
-end
-
-
- -
-

- - - (Object) destroy - - - - - -

- - - - -
-
-
-
-39
-40
-41
-42
-43
-44
-45
-46
-47
-48
-49
-50
-51
-52
-
-
# File 'app/controllers/permissions_controller.rb', line 39
-
-def destroy
-  user = User.find(params[:user])
-  owner = current_user
-  permissions = Permission.where(user_id: user.id, datatable_id: @datatable.id, owner_id: owner.id)
-  permissions.each do |permission|
-    permission.destroy
-  end
-
-  respond_to do |format|
-    flash[:notice] = 'Permission has been revoked from ' + user.email
-    format.html { redirect_to permission_path(@datatable) }
-    format.xml  { head :ok }
-  end
-end
-
-
- -
-

- - - (Object) index - - - - - -

- - - - -
-
-
-
-5
-6
-7
-
-
# File 'app/controllers/permissions_controller.rb', line 5
-
-def index
-  @datatables = current_user.try(:datatables)
-end
-
-
- -
-

- - - (Object) new - - - - - -

- - - - -
-
-
-
-15
-16
-
-
# File 'app/controllers/permissions_controller.rb', line 15
-
-def new
-end
-
-
- -
-

- - - (Object) show - - - - - -

- - - - -
-
-
-
-9
-10
-11
-12
-13
-
-
# File 'app/controllers/permissions_controller.rb', line 9
-
-def show
-  owner = current_user
-  @permissions = Permission.where(:owner_id => owner.id, :datatable_id => @datatable.id)
-  @permitted_users = @permissions.permitted_users
-end
-
-
- -
- -
- - - - - \ No newline at end of file diff --git a/doc/Person.html b/doc/Person.html deleted file mode 100644 index 8fe3d2e8e..000000000 --- a/doc/Person.html +++ /dev/null @@ -1,1299 +0,0 @@ - - - - - - Class: Person - - — Documentation by YARD 0.8.7.6 - - - - - - - - - - - - - - - - - - - - - -

Class: Person - - - -

- -
- -
Inherits:
-
- ActiveRecord::Base - -
    -
  • Object
  • - - - - - -
- show all - -
- - - - - - - - - -
Defined in:
-
lib/load_roles.rb,
- app/models/person.rb
-
- -
-
- - - - - - - - - -

- Class Method Summary - (collapse) -

- - - -

- Instance Method Summary - (collapse) -

- - - - - - - -
-

Class Method Details

- - -
-

- - + (Object) find_all_with_dataset - - - - - -

- - - - -
-
-
-
-85
-86
-87
-88
-
-
# File 'app/models/person.rb', line 85
-
-def self.find_all_with_dataset
-  people = Person.order('sur_name').collect { |person| person if person.has_dataset? }
-  people.compact
-end
-
-
- -
-

- - + (Object) from_eml(person_eml) - - - - - -

- - - - -
-
-
-
-20
-21
-22
-23
-24
-25
-26
-27
-
-
# File 'app/models/person.rb', line 20
-
-def self.from_eml(person_eml)
-  person = Person.new
-  person.from_eml(person_eml)
-
-  person.save
-
-  person
-end
-
-
- -
- -
-

Instance Method Details

- - -
-

- - - (Object) address - - - - - -

- - - - -
-
-
-
-77
-78
-79
-80
-81
-82
-83
-
-
# File 'app/models/person.rb', line 77
-
-def address
-  if usa_address?
-    "#{street_address} #{city}, #{locale} #{postal_code}"
-  else
-    "#{street_address}\n#{postal_code} #{city} #{country}"
-  end
-end
-
-
- -
-

- - - (Boolean) complete_address? - - - - - -

-
- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-72
-73
-74
-75
-
-
# File 'app/models/person.rb', line 72
-
-def complete_address?
-  !usa_address? ||
-      (city.present? && street_address.present? && postal_code.present? && locale.present?)
-end
-
-
- -
-

- - - (Object) eml_address(eml) - - - - - -

- - - - -
-
-
-
-114
-115
-116
-117
-118
-119
-120
-121
-122
-123
-
-
# File 'app/models/person.rb', line 114
-
-def eml_address(eml)
-  eml.address  do
-    eml.deliveryPoint street_address  unless street_address.blank?
-    eml.city city  unless city.blank?
-    eml.administrativeArea locale unless locale.blank?
-    eml.postalCode postal_code unless postal_code.blank?
-    eml.country country unless country.blank?
-  end
-  eml
-end
-
-
- -
-

- - - (Object) eml_party(eml) - - - - - -

- - - - -
-
-
-
-101
-102
-103
-104
-105
-106
-107
-108
-109
-110
-111
-112
-
-
# File 'app/models/person.rb', line 101
-
-def eml_party(eml)
-  eml_individual_name(eml)
-  eml.organizationName organization unless organization.blank?
-  eml_address(eml)
-  if phone
-    eml.phone phone, 'phonetype' => 'phone'
-  end
-  if fax
-    eml.phone fax, 'phonetype' => 'fax'
-  end
-  eml.electronicMailAddress email  unless email.blank?
-end
-
-
- -
-

- - - (Object) expanded_name - - - - - -

- - - - -
-
-
-
-48
-49
-50
-
-
# File 'app/models/person.rb', line 48
-
-def expanded_name
-  "#{given_name} #{middle_name} #{sur_name}"
-end
-
-
- -
-

- - - (Object) from_eml(person_eml) - - - - - -

- - - - -
-
-
-
-29
-30
-31
-32
-33
-34
-
-
# File 'app/models/person.rb', line 29
-
-def from_eml(person_eml)
-  basic_attributes_from_eml(person_eml)
-  address_from_eml(person_eml.css('address'))
-  person_eml.css('phone').each { |phone_eml| phone_from_eml(phone_eml) }
-  role_from_name(person_eml.css('role').text)
-end
-
-
- -
-

- - - (Object) full_name - - - - - -

- - - - -
-
-
-
-56
-57
-58
-
-
# File 'app/models/person.rb', line 56
-
-def full_name
-  "#{normal_given_name} #{sur_name}"
-end
-
-
- -
-

- - - (Object) get_committee_role_names - - - - - -

- - - - -
-
-
-
-40
-41
-42
-
-
# File 'app/models/person.rb', line 40
-
-def get_committee_role_names
-  affiliations.lter.committees.collect {|affiliation| affiliation.role.committee_role_name }.compact
-end
-
-
- -
-

- - - (Object) get_committee_roles - - - - - -

- - - - -
-
-
-
-36
-37
-38
-
-
# File 'app/models/person.rb', line 36
-
-def get_committee_roles
-  affiliations.lter.committees
-end
-
-
- -
-

- - - (Boolean) has_dataset? - - - - - -

-
- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-90
-91
-92
-
-
# File 'app/models/person.rb', line 90
-
-def has_dataset?
-  self.dataset_roles.size > 0
-end
-
-
- -
-

- - - (Object) last_name_first - - - - - -

- - - - -
-
-
-
-60
-61
-62
-
-
# File 'app/models/person.rb', line 60
-
-def last_name_first
-  sur_name + ', ' + normal_given_name
-end
-
-
- -
-

- - - (Object) normal_given_name - - - - - -

- - - - -
-
-
-
-52
-53
-54
-
-
# File 'app/models/person.rb', line 52
-
-def normal_given_name
-  friendly_name.presence || given_name
-end
-
-
- -
-

- - - (Boolean) only_emeritus? - - - - - -

-
- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-44
-45
-46
-
-
# File 'app/models/person.rb', line 44
-
-def only_emeritus?
-  lter_roles.all? { |role| role.emeritus? }
-end
-
-
- -
-

- - - (Object) short_full_name - - - - - -

- - - - -
-
-
-
-64
-65
-66
-
-
# File 'app/models/person.rb', line 64
-
-def short_full_name
-  full_name.truncate(33)
-end
-
-
- -
-

- - - (Object) to_eml(eml = Builder::XmlMarkup.new, role = 'Investigator') - - - - - -

- - - - -
-
-
-
-94
-95
-96
-97
-98
-99
-
-
# File 'app/models/person.rb', line 94
-
-def to_eml(eml = Builder::XmlMarkup.new, role= 'Investigator')
-  eml.associatedParty do
-    eml_party(eml)
-    eml.role role
-  end
-end
-
-
- -
-

- - - (Object) to_lter_personneldb - - - - - -

- - - - -
-
-
-
-125
-126
-127
-
-
# File 'app/models/person.rb', line 125
-
-def to_lter_personneldb
-  #TODO fill this in
-end
-
-
- -
-

- - - (Boolean) usa_address? - - - - - -

-
- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-68
-69
-70
-
-
# File 'app/models/person.rb', line 68
-
-def usa_address?
-  country.blank? || country.downcase == 'usa' || country.downcase == 'us'
-end
-
-
- -
- -
- - - - - \ No newline at end of file diff --git a/doc/Project.html b/doc/Project.html deleted file mode 100644 index 9acebcb28..000000000 --- a/doc/Project.html +++ /dev/null @@ -1,123 +0,0 @@ - - - - - - Class: Project - - — Documentation by YARD 0.8.7.6 - - - - - - - - - - - - - - - - - - - - - -

Class: Project - - - -

- -
- -
Inherits:
-
- ActiveRecord::Base - -
    -
  • Object
  • - - - - - -
- show all - -
- - - - - - - - - -
Defined in:
-
app/models/project.rb
- -
-
- - - - - - - - - - - -
- - - - - \ No newline at end of file diff --git a/doc/ProjectsController.html b/doc/ProjectsController.html deleted file mode 100644 index eac5a685a..000000000 --- a/doc/ProjectsController.html +++ /dev/null @@ -1,656 +0,0 @@ - - - - - - Class: ProjectsController - - — Documentation by YARD 0.8.7.6 - - - - - - - - - - - - - - - - - - - - - -

Class: ProjectsController - - - -

- -
- -
Inherits:
-
- ApplicationController - - - show all - -
- - - - - - - - - -
Defined in:
-
app/controllers/projects_controller.rb
- -
-
- - - - - - - - - -

- Instance Method Summary - (collapse) -

- - - - - - - - - - - - - - -
-

Instance Method Details

- - -
-

- - - (Object) create - - - - - -

-
- -

POST /projects POST /projects.xml

- - -
-
-
- - -
- - - - -
-
-
-
-44
-45
-46
-47
-48
-49
-50
-
-
# File 'app/controllers/projects_controller.rb', line 44
-
-def create
-  @project = Project.new(project_params)
-  if @project.save
-    flash[:notice] = 'Project was successfully created.'
-  end
-  respond_with @project
-end
-
-
- -
-

- - - (Object) destroy - - - - - -

-
- -

DELETE /projects/1 DELETE /projects/1.xml

- - -
-
-
- - -
- - - - -
-
-
-
-63
-64
-65
-66
-67
-68
-69
-70
-
-
# File 'app/controllers/projects_controller.rb', line 63
-
-def destroy
-  @project.destroy
-
-  respond_to do |format|
-    format.html { redirect_to(projects_url) }
-    format.xml  { head :ok }
-  end
-end
-
-
- -
-

- - - (Object) edit - - - - - -

-
- -

GET /projects/1/edit

- - -
-
-
- - -
- - - - -
-
-
-
-38
-39
-40
-
-
# File 'app/controllers/projects_controller.rb', line 38
-
-def edit
-  @datasets = Dataset.all
-end
-
-
- -
-

- - - (Object) index - - - - - -

-
- -

GET /projects GET /projects.xml

- - -
-
-
- - -
- - - - -
-
-
-
-7
-8
-9
-10
-11
-12
-13
-14
-
-
# File 'app/controllers/projects_controller.rb', line 7
-
-def index
-  @projects = Project.all
-
-  respond_to do |format|
-    format.html # index.html.erb
-    format.xml  { render :xml => @projects }
-  end
-end
-
-
- -
-

- - - (Object) new - - - - - -

-
- -

GET /projects/new GET /projects/new.xml

- - -
-
-
- - -
- - - - -
-
-
-
-27
-28
-29
-30
-31
-32
-33
-34
-35
-
-
# File 'app/controllers/projects_controller.rb', line 27
-
-def new
-  @project = Project.new
-  @datasets = Dataset.all
-
-  respond_to do |format|
-    format.html # new.html.erb
-    format.xml  { render :xml => @project }
-  end
-end
-
-
- -
-

- - - (Object) show - - - - - -

-
- -

GET /projects/1 GET /projects/1.xml

- - -
-
-
- - -
- - - - -
-
-
-
-18
-19
-20
-21
-22
-23
-
-
# File 'app/controllers/projects_controller.rb', line 18
-
-def show
-  respond_to do |format|
-    format.html # show.html.erb
-    format.xml  { render :xml => @project }
-  end
-end
-
-
- -
-

- - - (Object) update - - - - - -

-
- -

PUT /projects/1 PUT /projects/1.xml

- - -
-
-
- - -
- - - - -
-
-
-
-54
-55
-56
-57
-58
-59
-
-
# File 'app/controllers/projects_controller.rb', line 54
-
-def update
-  if @project.update_attributes(project_params)
-    flash[:notice] = 'Project was successfully updated.'
-  end
-  respond_with @project
-end
-
-
- -
- -
- - - - - \ No newline at end of file diff --git a/doc/Protocol.html b/doc/Protocol.html deleted file mode 100644 index 3cc048b17..000000000 --- a/doc/Protocol.html +++ /dev/null @@ -1,655 +0,0 @@ - - - - - - Class: Protocol - - — Documentation by YARD 0.8.7.6 - - - - - - - - - - - - - - - - - - - - - -

Class: Protocol - - - -

- -
- -
Inherits:
-
- ActiveRecord::Base - -
    -
  • Object
  • - - - - - -
- show all - -
- - - - - - - - - -
Defined in:
-
app/models/protocol.rb
- -
-
- - - - - - - - - -

- Class Method Summary - (collapse) -

- - - -

- Instance Method Summary - (collapse) -

- - - - - - - -
-

Class Method Details

- - -
-

- - + (Object) from_eml(protocol_eml) - - - - - -

- - - - -
-
-
-
-30
-31
-32
-33
-34
-35
-36
-37
-38
-39
-40
-
-
# File 'app/models/protocol.rb', line 30
-
-def self.from_eml(protocol_eml)
-  prot_id = protocol_eml.attributes['id'].try(:value).try(:gsub, 'protocol_', '')
-  protocol = find_by_id(prot_id) || new
-  if protocol.new_record?
-    protocol.title = protocol_eml.css('title').text
-    protocol.abstract = protocol_eml.parent.css('abstract').text
-    protocol.save
-  end
-
-  protocol
-end
-
-
- -
- -
-

Instance Method Details

- - -
-

- - - (Object) dataset_description - - - - - -

- - - - -
-
-
-
-85
-86
-87
-
-
# File 'app/models/protocol.rb', line 85
-
-def dataset_description
-  self.dataset.try(:dataset)
-end
-
-
- -
-

- - - (Object) deprecate!(other) - - - - - -

- - - - -
-
-
-
-73
-74
-75
-76
-77
-78
-79
-
-
# File 'app/models/protocol.rb', line 73
-
-def deprecate!(other)
-  other.active = false
-  other.save
-  self.deprecates = other.id
-  self.version_tag = other.version_tag.to_i + 1
-  save
-end
-
-
- -
-

- - - (Object) replaced_by - - - - - -

- - - - -
-
-
-
-81
-82
-83
-
-
# File 'app/models/protocol.rb', line 81
-
-def replaced_by
-  Protocol.where(:deprecates => self.id).first
-end
-
-
- -
-

- - - (Object) to_eml(xml = ::Builder::XmlMarkup.new) - - - - - -

- - - - -
-
-
-
-46
-47
-48
-49
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-
-
# File 'app/models/protocol.rb', line 46
-
-def to_eml(xml = ::Builder::XmlMarkup.new)
-  @eml = xml
-  @eml.methodStep do
-    @eml.description EML.text_sanitize(abstract)
-    @eml.protocol 'id' => "protocol_#{id}" do
-
-      @eml.title  title
-      eml_creator
-      @eml.distribution do
-        @eml.online do
-          website_name = dataset.try(:website).try(:name) || websites.first.try(:name)
-          @eml.url "http://#{website_name}.kbs.msu.edu/protocols/#{id}"
-        end
-      end
-    end
-
-  end
-end
-
-
- -
-

- - - (Object) to_eml_ref(xml = ::Builder::XmlMarkup.new) - - - - - -

- - - - -
-
-
-
-65
-66
-67
-68
-69
-70
-71
-
-
# File 'app/models/protocol.rb', line 65
-
-def to_eml_ref(xml = ::Builder::XmlMarkup.new)
-  # xml.methodStep do
-  #   xml.protocol do
-  #     xml.references "protocol_#{self.id}"
-  #   end
-  # end
-end
-
-
- -
-

- - - (Object) to_s - - - - - -

- - - - -
-
-
-
-26
-27
-28
-
-
# File 'app/models/protocol.rb', line 26
-
-def to_s
-  "#{self.title}"
-end
-
-
- -
-

- - - (Boolean) valid_for_eml? - - - - - -

-
- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-42
-43
-44
-
-
# File 'app/models/protocol.rb', line 42
-
-def valid_for_eml?
-  title.present?
-end
-
-
- -
- -
- - - - - \ No newline at end of file diff --git a/doc/ProtocolsController.html b/doc/ProtocolsController.html deleted file mode 100644 index 0a9898b89..000000000 --- a/doc/ProtocolsController.html +++ /dev/null @@ -1,687 +0,0 @@ - - - - - - Class: ProtocolsController - - — Documentation by YARD 0.8.7.6 - - - - - - - - - - - - - - - - - - - - - -

Class: ProtocolsController - - - -

- -
- -
Inherits:
-
- ApplicationController - - - show all - -
- - - - - - - - - -
Defined in:
-
app/controllers/protocols_controller.rb
- -
-
- - - - - - - - - -

- Instance Method Summary - (collapse) -

- - - - - - - - - - - - - - -
-

Instance Method Details

- - -
-

- - - (Object) create - - - - - -

-
- -

POST /protocols POST /protocols.xml

- - -
-
-
- - -
- - - - -
-
-
-
-54
-55
-56
-57
-58
-59
-60
-61
-62
-
-
# File 'app/controllers/protocols_controller.rb', line 54
-
-def create
-  @protocol = Protocol.new(protocol_params)
-
-  if @protocol.save
-    flash[:notice] = 'Protocol was successfully created.'
-  end
-
-  respond_with @protocol
-end
-
-
- -
-

- - - (Object) download - - - - - -

- - - - -
-
-
-
-82
-83
-84
-85
-86
-87
-88
-89
-90
-
-
# File 'app/controllers/protocols_controller.rb', line 82
-
-def download
-  head(:not_found) and return unless (protocol = Protocol.find_by_id(params[:id]))
-  path = protocol.pdf.path(params[:style])
-  if Rails.env.production?
-      redirect_to(protocol.pdf.s3_object(params[:style]).url_for(:read ,:secure => true, :expires_in => 10.seconds).to_s)
-  else
-    send_file  path, :type => 'application/pdf', :disposition => 'inline'
-  end
-end
-
-
- -
-

- - - (Object) edit - - - - - -

-
- -

GET /protocols/1;edit

- - -
-
-
- - -
- - - - -
-
-
-
-47
-48
-49
-50
-
-
# File 'app/controllers/protocols_controller.rb', line 47
-
-def edit
-  @datasets = Dataset.pluck(:dataset, :id)
-  get_all_websites
-end
-
-
- -
-

- - - (Object) index - - - - - -

-
- -

GET /protocols GET /protocols.xml

- - -
-
-
- - -
- - - - -
-
-
-
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
-
-
# File 'app/controllers/protocols_controller.rb', line 8
-
-def index
-  store_location
-  @website = website
-
-  @protocols = website.protocols.where('active is true').order('title')
-  @protocol_themes = website.protocols.all_tag_counts(:on=>:themes).order('name')
-  @experiment_protocols = website.protocols.tagged_with(:experiments).where(:active => true).order('title')
-
-
-  @untagged_protocols = website.protocols.where(:active=>true).all.collect {|e| e if e.theme_list.blank? }.compact
-  @retired_protocols = website.protocols.where('active is false').order('title')
-
-  respond_with @protocols
-end
-
-
- -
-

- - - (Object) new - - - - - -

-
- -

GET /protocols/new

- - -
-
-
- - -
- - - - -
-
-
-
-40
-41
-42
-43
-44
-
-
# File 'app/controllers/protocols_controller.rb', line 40
-
-def new
-  @protocol = Protocol.new
-  @datasets = Dataset.pluck(:dataset, :id)
-  get_all_websites
-end
-
-
- -
-

- - - (Object) show - - - - - -

-
- -

GET /protocols/1 GET /protocols/1.xml

- - -
-
-
- - -
- - - - -
-
-
-
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-36
-37
-
-
# File 'app/controllers/protocols_controller.rb', line 25
-
-def show
-  store_location
-  @protocol = website.protocols.where("id = ?", params[:id]).first
-
-  if @protocol
-    respond_with @protocol
-  else
-    respond_to do |format|
-      format.html { redirect_to protocols_url}
-      format.xml  { head :not_found}
-    end
-  end
-end
-
-
- -
-

- - - (Object) update - - - - - -

-
- -

PUT /protocols/1 PUT /protocols/1.xml

- - -
-
-
- - -
- - - - -
-
-
-
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-
-
# File 'app/controllers/protocols_controller.rb', line 66
-
-def update
-  params[:protocol].merge!({:updated_by => current_user})
-  get_all_websites
-  if params[:new_version]
-    old_protocol = Protocol.find(params[:id])
-    # Creating a new protocol
-    @protocol = Protocol.new(protocol_params)
-    @protocol.deprecate!(old_protocol)
-  end
-  if @protocol.update_attributes(protocol_params)
-    flash[:notice] = 'Protocol was successfully updated.'
-  end
-
-  respond_with @protocol
-end
-
-
- -
- -
- - - - - \ No newline at end of file diff --git a/doc/ReportCitation.html b/doc/ReportCitation.html deleted file mode 100644 index 3b25f310f..000000000 --- a/doc/ReportCitation.html +++ /dev/null @@ -1,206 +0,0 @@ - - - - - - Class: ReportCitation - - — Documentation by YARD 0.8.7.6 - - - - - - - - - - - - - - - - - - - - - -

Class: ReportCitation - - - -

- -
- -
Inherits:
-
- Citation - -
    -
  • Object
  • - - - - - - - -
- show all - -
- - - - - - - - - -
Defined in:
-
app/models/report_citation.rb
- -
-
- - - - - - - - - -

- Instance Method Summary - (collapse) -

- - - - - - - - - - - - - -

Methods inherited from Citation

-

#author_block, #author_block=, #authors_from_ris_authors, #bib_hash, #book?, by_date, by_treatment, by_type, citation_from_ris_stanza, #date_from_ris_date, #editor_block, #editor_block=, #file_title, from_ris, from_website, #get_attribute_from_ris_stanza, #get_attributes_from_ris_stanza, #make_pdf_private, #make_pdf_public, #page_number_from_ris, #pdf_from_ris_pdf, select_options, #short_author_string, sorted_by, #to_bib, to_bib, to_enw, #to_enw, #treat_as_token_list, type_from_ris_type

- - - - -
-

Instance Method Details

- - -
-

- - - (Object) formatted(options = {}) - - - - - -

- - - - -
-
-
-
-3
-4
-5
-
-
# File 'app/models/report_citation.rb', line 3
-
-def formatted(options={})
-  "#{author_and_year(options)} #{title_and_punctuation} #{editor_string}#{publication_string}#{volume_and_page}#{publisher_string}#{address_and_city}."
-end
-
-
- -
- -
- - - - - \ No newline at end of file diff --git a/doc/Role.html b/doc/Role.html deleted file mode 100644 index 06a9fccdd..000000000 --- a/doc/Role.html +++ /dev/null @@ -1,409 +0,0 @@ - - - - - - Class: Role - - — Documentation by YARD 0.8.7.6 - - - - - - - - - - - - - - - - - - - - - -

Class: Role - - - -

- -
- -
Inherits:
-
- ActiveRecord::Base - -
    -
  • Object
  • - - - - - -
- show all - -
- - - - - - - - - -
Defined in:
-
lib/load_roles.rb,
- app/models/role.rb
-
- -
-
- - - - - - - - - -

- Class Method Summary - (collapse) -

- - - -

- Instance Method Summary - (collapse) -

- - - - - - - -
-

Class Method Details

- - -
-

- - + (Object) data_roles - - - - - -

- - - - -
-
-
-
-14
-15
-16
-
-
# File 'app/models/role.rb', line 14
-
-def self.data_roles
-  self.where(:role_type_id => RoleType.find_by_name('lter_dataset'))
-end
-
-
- -
- -
-

Instance Method Details

- - -
-

- - - (Boolean) committee? - - - - - -

-
- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-10
-11
-12
-
-
# File 'app/models/role.rb', line 10
-
-def committee?
-  name =~ /Committee/ || name =~/Network Representatives/
-end
-
-
- -
-

- - - (Object) committee_role_name - - - - - -

- - - - -
-
-
-
-18
-19
-20
-
-
# File 'app/models/role.rb', line 18
-
-def committee_role_name
-  name.singularize if committee?
-end
-
-
- -
-

- - - (Boolean) emeritus? - - - - - -

-
- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-6
-7
-8
-
-
# File 'app/models/role.rb', line 6
-
-def emeritus?
-  name =~ /^Emeritus/
-end
-
-
- -
- -
- - - - - \ No newline at end of file diff --git a/doc/RoleType.html b/doc/RoleType.html deleted file mode 100644 index 1eb5022cc..000000000 --- a/doc/RoleType.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - Class: RoleType - - — Documentation by YARD 0.8.7.6 - - - - - - - - - - - - - - - - - - - - - -

Class: RoleType - - - -

- -
- -
Inherits:
-
- ActiveRecord::Base - -
    -
  • Object
  • - - - - - -
- show all - -
- - - - - - - - - -
Defined in:
-
lib/load_roles.rb,
- app/models/role_type.rb
-
- -
-
- - - - - - - - - - - -
- - - - - \ No newline at end of file diff --git a/doc/S3_Selector.html b/doc/S3_Selector.html deleted file mode 100644 index a99b61cdb..000000000 --- a/doc/S3_Selector.html +++ /dev/null @@ -1,105 +0,0 @@ - - - - - - Module: S3_Selector - - — Documentation by YARD 0.8.7.6 - - - - - - - - - - - - - - - - - - - - - -

Module: S3_Selector - - - -

- -
- - - - - - - - -
Defined in:
-
lib/s3_selector.rb
- -
-
- - - - - - - - - - -
- - - - - \ No newline at end of file diff --git a/doc/ScoreCard.html b/doc/ScoreCard.html deleted file mode 100644 index a9c82cf8a..000000000 --- a/doc/ScoreCard.html +++ /dev/null @@ -1,834 +0,0 @@ - - - - - - Class: ScoreCard - - — Documentation by YARD 0.8.7.6 - - - - - - - - - - - - - - - - - - - - - -

Class: ScoreCard - - - -

- -
- -
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
- - - - -
Extended by:
-
ActiveModel::Naming
- - - - -
Includes:
-
ActiveModel::Conversion
- - - - - -
Defined in:
-
app/models/score_card.rb
- -
-
- -

Overview

-
- -

scores = Array of structs each an datatable_id, array of scores

- - -
-
-
- - -
- - - -

Instance Attribute Summary (collapse)

- - - - - - -

- Class Method Summary - (collapse) -

- - - -

- Instance Method Summary - (collapse) -

- - - - - - - -
-

Instance Attribute Details

- - - -
-

- - - (Object) db_connection (readonly) - - - - - -

-
- -

Returns the value of attribute db_connection

- - -
-
-
- - -
- - - - -
-
-
-
-8
-9
-10
-
-
# File 'app/models/score_card.rb', line 8
-
-def db_connection
-  @db_connection
-end
-
-
- -
- - -
-

Class Method Details

- - -
-

- - + (Object) scores_to_csv - - - - - -

-
- -

send all of the scores to a csv file

- - -
-
-
- - -
- - - - -
-
-
-
-97
-98
-99
-100
-101
-102
-103
-104
-105
-106
-107
-108
-109
-110
-111
-112
-
-
# File 'app/models/score_card.rb', line 97
-
-def self.scores_to_csv
-  CSV.open('scores.csv', 'w') do |csv|
-    Datatable.all.each do |datatable|
-      next unless datatable.dataset.sponsor_id == 1
-      next unless datatable.is_sql
-      # exclude climdb datatables and archive
-      next if [309, 300, 301,175, 127,82].include? datatable.id
-      s = score(datatable)
-      if s
-        s.each do |a|
-          csv << [datatable.id, datatable.completed, datatable.name, datatable.title, a[0],a[1][:score]]
-        end
-      end
-    end
-  end
-end
-
-
- -
-

- - + (Object) update_all - - - - - -

- - - - -
-
-
-
-88
-89
-90
-91
-92
-93
-94
-
-
# File 'app/models/score_card.rb', line 88
-
-def self.update_all
-  score = ScoreCard.new
-  Datatable.where(:is_sql => true).all.each do |datatable|
-    datatable.scores  = score.score(datatable).to_json
-    datatable.save
-  end
-end
-
-
- -
- -
-

Instance Method Details

- - -
-

- - - (Object) current_year - - - - - -

- - - - -
-
-
-
-84
-85
-86
-
-
# File 'app/models/score_card.rb', line 84
-
-def current_year
-  Time.now().year
-end
-
-
- -
-

- - - (Object) data(datatable, time_key) - - - - - -

- - - - -
-
-
-
-47
-48
-49
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-
-
# File 'app/models/score_card.rb', line 47
-
-def data(datatable, time_key)
-  if time_key =~ /year/i
-    query = "select #{time_key} as year, count(*) from (#{datatable.object}) as t1 group by #{time_key}"
-    approved_query = "select #{time_key} as year, count(*) from (#{datatable.approved_data_query}) as t1 group by #{time_key}"
-  else
-    query = "select date_part('year',#{time_key}) as year, count(*) from (#{datatable.object}) as t1 group by date_part('year',#{time_key})"
-    approved_query = "select date_part('year',#{time_key}) as year, count(*) from (#{datatable.approved_data_query}) as t1 group by date_part('year',#{time_key})"
-  end
-  begin
-    query_result    = db_connection.execute(query)
-    approved_result = db_connection.execute(approved_query)
-
-  rescue Exception => e
-    query_result = []
-    approved_result = []
-  end
-  result = query_result.collect do |row|
-    {:year => row['year'].to_i, :count => row['count'].to_f}
-  end
-
-  approved_result.each do |row|
-    r = result.index {|x| x[:year] == row['year'].to_i}
-    result[r][:approved] = row['count'].to_f
-  end
-
-  result
-end
-
-
- -
-

- - - (Object) fill_to_present(data, update_frequency_years = 1) - - - - - -

- - - - -
-
-
-
-75
-76
-77
-78
-79
-80
-81
-82
-
-
# File 'app/models/score_card.rb', line 75
-
-def fill_to_present(data, update_frequency_years = 1)
-  return if data.empty?
-  max_year_record = data.max {|a,b| a[:year] <=> b[:year]}
-  max_year = max_year_record[:year].to_i
-  max_year += update_frequency_years
-  add_years = (max_year..current_year).step(update_frequency_years).collect { |year| {:year => year, :count => 0} }
-  add_years + data
-end
-
-
- -
-

- - - (Boolean) persisted? - - - - - -

-
- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-10
-11
-12
-
-
# File 'app/models/score_card.rb', line 10
-
-def persisted?
-  false
-end
-
-
- -
-

- - - (Object) score(datatable) - - - - - -

- - - - -
-
-
-
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-36
-37
-38
-
-
# File 'app/models/score_card.rb', line 21
-
-def score(datatable)
-  # exclude climdb datatables and archive
-  return if [309, 300, 301,175, 127,82].include? datatable.id
-  result = {}
-  time_key = datatable.variate_names.grep(/year/i).first
-  unless time_key
-    time_key = datatable.variate_names.grep(/date/i).first
-  end
-
-  if time_key
-    result = data(datatable,time_key)
-
-    result = fill_to_present(result, update_frequency_years(datatable)) unless 'completed' == datatable.status
-    result
-  else
-    []
-  end
-end
-
-
- -
-

- - - (Object) update_frequency_years(datatable) - - - - - -

- - - - -
-
-
-
-40
-41
-42
-43
-44
-45
-
-
# File 'app/models/score_card.rb', line 40
-
-def update_frequency_years(datatable)
-  update_frequency = datatable.update_frequency_days || 365
-  update_frequency = update_frequency / 365
-  update_frequency = 1 if 0 == update_frequency
-  update_frequency
-end
-
-
- -
- -
- - - - - \ No newline at end of file diff --git a/doc/ScoreCardsController.html b/doc/ScoreCardsController.html deleted file mode 100644 index ba7e40823..000000000 --- a/doc/ScoreCardsController.html +++ /dev/null @@ -1,283 +0,0 @@ - - - - - - Class: ScoreCardsController - - — Documentation by YARD 0.8.7.6 - - - - - - - - - - - - - - - - - - - - - -

Class: ScoreCardsController - - - -

- -
- -
Inherits:
-
- ApplicationController - - - show all - -
- - - - - - - - - -
Defined in:
-
app/controllers/score_cards_controller.rb
- -
-
- - - - - - - - - -

- Instance Method Summary - (collapse) -

- - - - - - - - - - - - - - -
-

Instance Method Details

- - -
-

- - - (Object) index - - - - - -

- - - - -
-
-
-
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-
-
# File 'app/controllers/score_cards_controller.rb', line 2
-
-def index
-  # @datatables = Study.includes(:datatables).where('datatables.is_sql is true').where(:code => 'MSCE')
-
-  on_web   = params[:on_web] || true
-  website  = params[:website] || 'lter'
-  study_id = params[:study_id]
-
-  if 'glbrc' == website.downcase
-    @datatables = Datatable.includes(:dataset).where(is_sql: true).where('datasets.website_id = 2')
-                           .where(:on_web => on_web).order(:study_id).order(:theme_id).order('datatables.id').references(:dataset)
-  else
-    @datatables = Datatable.includes(:dataset).where('is_sql is true').where('datasets.website_id = 1')
-                            .where(:on_web => on_web).order(:study_id).order(:theme_id).order('datatables.id').references(:dataset)
-    if study_id
-      @datatables = @datatables.where(:study_id => study_id)
-    end
-  end
-end
-
-
- -
-

- - - (Object) show - - - - - -

- - - - -
-
-
-
-21
-22
-23
-
-
# File 'app/controllers/score_cards_controller.rb', line 21
-
-def show
-  @datatable = Datatable.find(params[:id])
-end
-
-
- -
- -
- - - - - \ No newline at end of file diff --git a/doc/Scribble.html b/doc/Scribble.html deleted file mode 100644 index 91ce3f0e2..000000000 --- a/doc/Scribble.html +++ /dev/null @@ -1,123 +0,0 @@ - - - - - - Class: Scribble - - — Documentation by YARD 0.8.7.6 - - - - - - - - - - - - - - - - - - - - - -

Class: Scribble - - - -

- -
- -
Inherits:
-
- ActiveRecord::Base - -
    -
  • Object
  • - - - - - -
- show all - -
- - - - - - - - - -
Defined in:
-
app/models/scribble.rb
- -
-
- - - - - - - - - - - -
- - - - - \ No newline at end of file diff --git a/doc/SessionsController.html b/doc/SessionsController.html deleted file mode 100644 index dbac149a4..000000000 --- a/doc/SessionsController.html +++ /dev/null @@ -1,262 +0,0 @@ - - - - - - Class: SessionsController - - — Documentation by YARD 0.8.7.6 - - - - - - - - - - - - - - - - - - - - - -

Class: SessionsController - - - -

- -
- -
Inherits:
-
- Clearance::SessionsController - -
    -
  • Object
  • - - - - - -
- show all - -
- - - - - - - - - -
Defined in:
-
app/controllers/sessions_controller.rb
- -
-
- - - - - - - - - -

- Instance Method Summary - (collapse) -

- - - - - - - -
-

Instance Method Details

- - -
-

- - - (Object) create - - - - - -

- - - - -
-
-
-
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-
-
# File 'app/controllers/sessions_controller.rb', line 6
-
-def create
-  if params[:session]
-    session = params[:session]
-  end
-  # set the default user if blank or 'lter'
-  if params[:session]
-    session = params[:session]
-    if session[:email].empty? or session[:email].downcase == 'lter'
-      params[:session][:email] = 'lter@kbs.edu'
-    end
-  end
-  super    # let clearance handle it
-end
-
-
- -
-

- - - (Object) new - - - - - -

- - - - -
-
-
-
-3
-4
-
-
# File 'app/controllers/sessions_controller.rb', line 3
-
-def new
-end
-
-
- -
- -
- - - - - \ No newline at end of file diff --git a/doc/Species.html b/doc/Species.html deleted file mode 100644 index 105bf3add..000000000 --- a/doc/Species.html +++ /dev/null @@ -1,123 +0,0 @@ - - - - - - Class: Species - - — Documentation by YARD 0.8.7.6 - - - - - - - - - - - - - - - - - - - - - -

Class: Species - - - -

- -
- -
Inherits:
-
- ActiveRecord::Base - -
    -
  • Object
  • - - - - - -
- show all - -
- - - - - - - - - -
Defined in:
-
app/models/species.rb
- -
-
- - - - - - - - - - - -
- - - - - \ No newline at end of file diff --git a/doc/Sponsor.html b/doc/Sponsor.html deleted file mode 100644 index 605a279d9..000000000 --- a/doc/Sponsor.html +++ /dev/null @@ -1,213 +0,0 @@ - - - - - - Class: Sponsor - - — Documentation by YARD 0.8.7.6 - - - - - - - - - - - - - - - - - - - - - -

Class: Sponsor - - - -

- -
- -
Inherits:
-
- ActiveRecord::Base - -
    -
  • Object
  • - - - - - -
- show all - -
- - - - - - - - - -
Defined in:
-
app/models/sponsor.rb
- -
-
- - - - - - - - - -

- Instance Method Summary - (collapse) -

- - - - - - - -
-

Instance Method Details

- - -
-

- - - (Object) terms_of_use_path - - - - - -

-
- -

friendly_id :name

- - -
-
-
- - -
- - - - -
-
-
-
-8
-9
-10
-11
-12
-13
-14
-
-
# File 'app/models/sponsor.rb', line 8
-
-def terms_of_use_path
-  if terms_of_use_url.blank?
-    "/sponsors/#{id}"
-  else
-    terms_of_use_url
-  end
-end
-
-
- -
- -
- - - - - \ No newline at end of file diff --git a/doc/SponsorsController.html b/doc/SponsorsController.html deleted file mode 100644 index 57725e288..000000000 --- a/doc/SponsorsController.html +++ /dev/null @@ -1,253 +0,0 @@ - - - - - - Class: SponsorsController - - — Documentation by YARD 0.8.7.6 - - - - - - - - - - - - - - - - - - - - - -

Class: SponsorsController - - - -

- -
- -
Inherits:
-
- ApplicationController - - - show all - -
- - - - - - - - - -
Defined in:
-
app/controllers/sponsors_controller.rb
- -
-
- - - - - - - - - -

- Instance Method Summary - (collapse) -

- - - - - - - - - - - - - - -
-

Instance Method Details

- - -
-

- - - (Object) index - - - - - -

- - - - -
-
-
-
-3
-4
-5
-
-
# File 'app/controllers/sponsors_controller.rb', line 3
-
-def index
-  @sponsor = Sponsor.find_by_name(website.name)
-end
-
-
- -
-

- - - (Object) show - - - - - -

- - - - -
-
-
-
-7
-8
-9
-
-
# File 'app/controllers/sponsors_controller.rb', line 7
-
-def show
-  @sponsor = Sponsor.find(params[:id])
-end
-
-
- -
- -
- - - - - \ No newline at end of file diff --git a/doc/StudiesController.html b/doc/StudiesController.html deleted file mode 100644 index 294236650..000000000 --- a/doc/StudiesController.html +++ /dev/null @@ -1,486 +0,0 @@ - - - - - - Class: StudiesController - - — Documentation by YARD 0.8.7.6 - - - - - - - - - - - - - - - - - - - - - -

Class: StudiesController - - - -

- -
- -
Inherits:
-
- ApplicationController - - - show all - -
- - - - - - - - - -
Defined in:
-
app/controllers/studies_controller.rb
- -
-
- - - - - - - - - -

- Instance Method Summary - (collapse) -

- - - - - - - - - - - - - - -
-

Instance Method Details

- - -
-

- - - (Object) edit - - - - - -

-
- -

GET /studies/1;edit

- - -
-
-
- - -
- - - - -
-
-
-
-31
-32
-
-
# File 'app/controllers/studies_controller.rb', line 31
-
-def edit
-end
-
-
- -
-

- - - (Object) index - - - - - -

-
- -

GET /studies

- - -
-
-
- - -
- - - - -
-
-
-
-7
-8
-9
-
-
# File 'app/controllers/studies_controller.rb', line 7
-
-def index
-  @study_roots = Study.roots
-end
-
-
- -
-

- - - (Object) move_before - - - - - -

- - - - -
-
-
-
-18
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-
-
# File 'app/controllers/studies_controller.rb', line 18
-
-def move_before
-  study = Study.find(params[:parent_id])
-  child = Study.find(params[:id])
-  father = study.parent
-  child.move_to_left_of(study) unless child == study
-  if study.root?
-    render :partial => 'study_list', :locals => {:study_roots => Study.roots}
-  else
-    render :partial => 'study', :locals => {:study => father}
-  end
-end
-
-
- -
-

- - - (Object) move_to - - - - - -

- - - - -
-
-
-
-11
-12
-13
-14
-15
-16
-
-
# File 'app/controllers/studies_controller.rb', line 11
-
-def move_to
-  study = Study.find(params[:parent_id])
-  child = Study.find(params[:id])
-  child.move_to_child_of(study) unless child == study
-  render :partial =>'study', :locals => {:study => study}
-end
-
-
- -
-

- - - (Object) update - - - - - -

-
- -

POST /studies/1

- - -
-
-
- - -
- - - - -
-
-
-
-35
-36
-37
-38
-39
-40
-41
-42
-43
-44
-45
-46
-
-
# File 'app/controllers/studies_controller.rb', line 35
-
-def update
-  respond_to do |format|
-    if @study.update_attributes(study_params)
-      flash[:notice] = 'Study was successfully updated.'
-      format.html { redirect_to datatables_url }
-      format.xml  { head :ok }
-    else
-      format.html { render "edit" }
-      format.xml  { render :xml => @study.errors.to_xml }
-    end
-  end
-end
-
-
- -
- -
- - - - - \ No newline at end of file diff --git a/doc/Study.html b/doc/Study.html deleted file mode 100644 index 39d01de14..000000000 --- a/doc/Study.html +++ /dev/null @@ -1,445 +0,0 @@ - - - - - - Class: Study - - — Documentation by YARD 0.8.7.6 - - - - - - - - - - - - - - - - - - - - - -

Class: Study - - - -

- -
- -
Inherits:
-
- ActiveRecord::Base - -
    -
  • Object
  • - - - - - -
- show all - -
- - - - - - - - - -
Defined in:
-
app/models/study.rb
- -
-
- - - - - - - - - -

- Class Method Summary - (collapse) -

- - - -

- Instance Method Summary - (collapse) -

- - - - - - - -
-

Class Method Details

- - -
-

- - + (Object) find_all_roots_with_datatables(tables = []) - - - - - -

- - - - -
-
-
-
-34
-35
-36
-
-
# File 'app/models/study.rb', line 34
-
-def self.find_all_roots_with_datatables(tables=[])
-  self.roots.order('weight').to_a.keep_if {|study| study.include_datatables?(tables) }
-end
-
-
- -
-

- - + (Object) find_all_with_datatables(tables = []) - - - - - -

- - - - -
-
-
-
-30
-31
-32
-
-
# File 'app/models/study.rb', line 30
-
-def self.find_all_with_datatables(tables = [])
-  all.to_a.keep_if { |study| study.include_datatables?(tables) }
-end
-
-
- -
- -
-

Instance Method Details

- - -
-

- - - (Object) citation_treatments - - - - - -

- - - - -
-
-
-
-20
-21
-22
-
-
# File 'app/models/study.rb', line 20
-
-def citation_treatments
-  treatments.where(:use_in_citations => true)
-end
-
-
- -
-

- - - (Boolean) include_datatables?(table_query = []) - - - - - -

-
- -

returns true if one or more of the tables passed is part of the current -study

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-25
-26
-27
-28
-
-
# File 'app/models/study.rb', line 25
-
-def include_datatables?(table_query = [])
-  table_query = table_query.to_a  # thinking sphinks does not return an array
-  (self_and_descendants_datatables & table_query).any?
-end
-
-
- -
-

- - - (Object) study_url(website) - - - - - -

- - - - -
-
-
-
-16
-17
-18
-
-
# File 'app/models/study.rb', line 16
-
-def study_url(website)
-  self.study_urls.where(:website_id => website.id).first.try(:url)
-end
-
-
- -
- -
- - - - - \ No newline at end of file diff --git a/doc/StudyUrl.html b/doc/StudyUrl.html deleted file mode 100644 index 1a53d6497..000000000 --- a/doc/StudyUrl.html +++ /dev/null @@ -1,123 +0,0 @@ - - - - - - Class: StudyUrl - - — Documentation by YARD 0.8.7.6 - - - - - - - - - - - - - - - - - - - - - -

Class: StudyUrl - - - -

- -
- -
Inherits:
-
- ActiveRecord::Base - -
    -
  • Object
  • - - - - - -
- show all - -
- - - - - - - - - -
Defined in:
-
app/models/study_url.rb
- -
-
- - - - - - - - - - - -
- - - - - \ No newline at end of file diff --git a/doc/SubdomainResolver.html b/doc/SubdomainResolver.html deleted file mode 100644 index c7d876779..000000000 --- a/doc/SubdomainResolver.html +++ /dev/null @@ -1,218 +0,0 @@ - - - - - - Class: SubdomainResolver - - — Documentation by YARD 0.8.7.6 - - - - - - - - - - - - - - - - - - - - - -

Class: SubdomainResolver - - - -

- -
- -
Inherits:
-
- ActionView::FileSystemResolver - -
    -
  • Object
  • - - - - - -
- show all - -
- - - - - - - - - -
Defined in:
-
lib/subdomain_resolver.rb
- -
-
- -

Overview

-
- -

Searches for a subdomain specific template and uses it if possible.

- - -
-
-
- - -
- - - - - - - -

- Instance Method Summary - (collapse) -

- - - - - -
-

Constructor Details

- -
-

- - - (SubdomainResolver) initialize(sub) - - - - - -

-
- -

Returns a new instance of SubdomainResolver

- - -
-
-
- - -
- - - - -
-
-
-
-4
-5
-6
-7
-
-
# File 'lib/subdomain_resolver.rb', line 4
-
-def initialize(sub)
-  @subdomain = sub
-  super('app/views')
-end
-
-
- -
- - -
- - - - - \ No newline at end of file diff --git a/doc/Template.html b/doc/Template.html deleted file mode 100644 index c718c91e2..000000000 --- a/doc/Template.html +++ /dev/null @@ -1,134 +0,0 @@ - - - - - - Class: Template - - — Documentation by YARD 0.8.7.6 - - - - - - - - - - - - - - - - - - - - - -

Class: Template - - - -

- -
- -
Inherits:
-
- ActiveRecord::Base - -
    -
  • Object
  • - - - - - -
- show all - -
- - - - - - - - - -
Defined in:
-
app/models/template.rb
- -
-
- -

Overview

-
- -

TODO evaluate if we need this

- - -
-
-
- - -
- - - - - - - - - -
- - - - - \ No newline at end of file diff --git a/doc/TemplatesController.html b/doc/TemplatesController.html deleted file mode 100644 index 29c9df757..000000000 --- a/doc/TemplatesController.html +++ /dev/null @@ -1,468 +0,0 @@ - - - - - - Class: TemplatesController - - — Documentation by YARD 0.8.7.6 - - - - - - - - - - - - - - - - - - - - - -

Class: TemplatesController - - - -

- -
- -
Inherits:
-
- ApplicationController - - - show all - -
- - - - - - - - - -
Defined in:
-
app/controllers/templates_controller.rb
- -
-
- -

Overview

-
- -

TODO do we need to keep this

- - -
-
-
- - -
- - - - - - - -

- Instance Method Summary - (collapse) -

- - - - - - - - - - - - - - -
-

Instance Method Details

- - -
-

- - - (Object) create - - - - - -

- - - - -
-
-
-
-19
-20
-21
-
-
# File 'app/controllers/templates_controller.rb', line 19
-
-def create
-  respond_with(@template = Template.create(template_params))
-end
-
-
- -
-

- - - (Object) delete - - - - - -

- - - - -
-
-
-
-26
-27
-
-
# File 'app/controllers/templates_controller.rb', line 26
-
-def delete
-end
-
-
- -
-

- - - (Object) index - - - - - -

- - - - -
-
-
-
-7
-8
-9
-
-
# File 'app/controllers/templates_controller.rb', line 7
-
-def index
-  @templates = Template.all
-end
-
-
- -
-

- - - (Object) new - - - - - -

- - - - -
-
-
-
-15
-16
-17
-
-
# File 'app/controllers/templates_controller.rb', line 15
-
-def new
-  @template = Template.new
-end
-
-
- -
-

- - - (Object) show - - - - - -

- - - - -
-
-
-
-11
-12
-13
-
-
# File 'app/controllers/templates_controller.rb', line 11
-
-def show
-  @template = Template.find(params[:id])
-end
-
-
- -
-

- - - (Object) update - - - - - -

- - - - -
-
-
-
-23
-24
-
-
# File 'app/controllers/templates_controller.rb', line 23
-
-def update
-end
-
-
- -
- -
- - - - - \ No newline at end of file diff --git a/doc/Theme.html b/doc/Theme.html deleted file mode 100644 index 19f325b87..000000000 --- a/doc/Theme.html +++ /dev/null @@ -1,686 +0,0 @@ - - - - - - Class: Theme - - — Documentation by YARD 0.8.7.6 - - - - - - - - - - - - - - - - - - - - - -

Class: Theme - - - -

- -
- -
Inherits:
-
- ActiveRecord::Base - -
    -
  • Object
  • - - - - - -
- show all - -
- - - - - - - - - -
Defined in:
-
app/models/theme.rb,
- lib/load_theme_affiliations.rb
-
- -
-
- - - - - - - - - -

- Instance Method Summary - (collapse) -

- - - - - - - -
-

Instance Method Details

- - -
-

- - - (Boolean) children_have_datatables?(study = nil) - - - - - -

-
- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-24
-25
-26
-
-
# File 'app/models/theme.rb', line 24
-
-def children_have_datatables?(study=nil)
-  children.collect {|subtheme| subtheme.datatables?(study)}.include?(true)
-end
-
-
- -
-

- - - (Boolean) datatables?(study = nil) - - - - - -

-
- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-16
-17
-18
-
-
# File 'app/models/theme.rb', line 16
-
-def datatables?(study=nil)
-  i_have_datatables?(study) || children_have_datatables?(study)
-end
-
-
- -
-

- - - (Object) datatables_in_study(study, test_datatables = []) - - - - - -

- - - - -
-
-
-
-45
-46
-47
-48
-49
-50
-51
-
-
# File 'app/models/theme.rb', line 45
-
-def datatables_in_study(study, test_datatables=[])
-  if test_datatables.any?
-    datatables.collect {|table| table if table.study == study and test_datatables.include?(table)}.compact
-  else
-    datatables.collect {|table| table if table.study == study }.compact
-  end
-end
-
-
- -
-

- - - (Boolean) i_have_datatables?(study = nil) - - - - - -

-
- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-20
-21
-22
-
-
# File 'app/models/theme.rb', line 20
-
-def i_have_datatables?(study=nil)
-  study ? datatables_in_study(study).any? : datatables.any?
-end
-
-
- -
-

- - - (Boolean) include_datatables?(test_datatables = []) - - - - - -

-
- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-28
-29
-30
-31
-
-
# File 'app/models/theme.rb', line 28
-
-def include_datatables?(test_datatables=[])
-  my_datatables = self_and_descendants_datatables
-  (my_datatables & test_datatables).any?
-end
-
-
- -
-

- - - (Boolean) include_datatables_from_study?(test_datatables, study) - - - - - -

-
- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-33
-34
-35
-36
-37
-38
-
-
# File 'app/models/theme.rb', line 33
-
-def include_datatables_from_study?(test_datatables, study)
-  my_datatables = self_and_descendants_datatables
-  datatables_in_study = my_datatables.collect {|table| table if table.study == study }
-
-  (test_datatables & datatables_in_study).any?
-end
-
-
- -
-

- - - (Object) nested_name - - - - - -

- - - - -
-
-
-
-12
-13
-14
-
-
# File 'app/models/theme.rb', line 12
-
-def nested_name
-  '-' * level + name
-end
-
-
- -
-

- - - (Object) self_and_descendants_datatables - - - - - -

- - - - -
-
-
-
-40
-41
-42
-43
-
-
# File 'app/models/theme.rb', line 40
-
-def self_and_descendants_datatables
-  my_datatables = descendants.collect {|descendant| descendant.datatables }.flatten
-  my_datatables + datatables
-end
-
-
- -
- -
- - - - - \ No newline at end of file diff --git a/doc/ThemesHelper.html b/doc/ThemesHelper.html deleted file mode 100644 index 37ae321ce..000000000 --- a/doc/ThemesHelper.html +++ /dev/null @@ -1,224 +0,0 @@ - - - - - - Module: ThemesHelper - - — Documentation by YARD 0.8.7.6 - - - - - - - - - - - - - - - - - - - - - -

Module: ThemesHelper - - - -

- -
- - - - - - - - -
Defined in:
-
app/helpers/themes_helper.rb
- -
-
- - - - - - - - - -

- Instance Method Summary - (collapse) -

- - - - - - -
-

Instance Method Details

- - -
-

- - - (Object) render_themes(theme) {|theme| ... } - - - - - -

-
- - -
-
-
- -

Yields:

-
    - -
  • - - - (theme) - - - -
  • - -
- -
- - - - -
-
-
-
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-
-
# File 'app/helpers/themes_helper.rb', line 2
-
-def render_themes(theme, &block)
-  concat('
-<li id="theme_' + theme.id.to_s + '" class="theme_container delete-container"> 
-   <input type="hidden" value=' + theme.id.to_s + ' >', block.binding)
-  yield(theme)
-  concat('
-<ul id="ul_' + theme.id.to_s + '">', block.binding)
-#    if !theme.leaf?
-    theme.children.each do |child|
-      render_themes(child, &block)
-    end
-#    end
-  concat('</li>
-</ul>
-
-', block.binding)
-end
-
-
- -
- -
- - - - - \ No newline at end of file diff --git a/doc/ThesisCitation.html b/doc/ThesisCitation.html deleted file mode 100644 index 571e527e6..000000000 --- a/doc/ThesisCitation.html +++ /dev/null @@ -1,206 +0,0 @@ - - - - - - Class: ThesisCitation - - — Documentation by YARD 0.8.7.6 - - - - - - - - - - - - - - - - - - - - - -

Class: ThesisCitation - - - -

- -
- -
Inherits:
-
- Citation - -
    -
  • Object
  • - - - - - - - -
- show all - -
- - - - - - - - - -
Defined in:
-
app/models/thesis_citation.rb
- -
-
- - - - - - - - - -

- Instance Method Summary - (collapse) -

- - - - - - - - - - - - - -

Methods inherited from Citation

-

#author_block, #author_block=, #authors_from_ris_authors, #bib_hash, #book?, by_date, by_treatment, by_type, citation_from_ris_stanza, #date_from_ris_date, #editor_block, #editor_block=, #file_title, from_ris, from_website, #get_attribute_from_ris_stanza, #get_attributes_from_ris_stanza, #make_pdf_private, #make_pdf_public, #page_number_from_ris, #pdf_from_ris_pdf, select_options, #short_author_string, sorted_by, #to_bib, to_bib, to_enw, #to_enw, #treat_as_token_list, type_from_ris_type

- - - - -
-

Instance Method Details

- - -
-

- - - (Object) formatted(options = {}) - - - - - -

- - - - -
-
-
-
-3
-4
-5
-
-
# File 'app/models/thesis_citation.rb', line 3
-
-def formatted(options={})
-  "#{author_and_year(options)} #{title_and_punctuation} #{series_title}, #{publisher}#{address_and_city}."
-end
-
-
- -
- -
- - - - - \ No newline at end of file diff --git a/doc/Treatment.html b/doc/Treatment.html deleted file mode 100644 index 151bf10db..000000000 --- a/doc/Treatment.html +++ /dev/null @@ -1,123 +0,0 @@ - - - - - - Class: Treatment - - — Documentation by YARD 0.8.7.6 - - - - - - - - - - - - - - - - - - - - - -

Class: Treatment - - - -

- -
- -
Inherits:
-
- ActiveRecord::Base - -
    -
  • Object
  • - - - - - -
- show all - -
- - - - - - - - - -
Defined in:
-
app/models/treatment.rb
- -
-
- - - - - - - - - - - -
- - - - - \ No newline at end of file diff --git a/doc/Unit.html b/doc/Unit.html deleted file mode 100644 index 3b4989e26..000000000 --- a/doc/Unit.html +++ /dev/null @@ -1,306 +0,0 @@ - - - - - - Class: Unit - - — Documentation by YARD 0.8.7.6 - - - - - - - - - - - - - - - - - - - - - -

Class: Unit - - - -

- -
- -
Inherits:
-
- ActiveRecord::Base - -
    -
  • Object
  • - - - - - -
- show all - -
- - - - - - - - - -
Defined in:
-
app/models/unit.rb,
- lib/load_variates.rb
-
- -
-
- - - - - - - - - -

- Instance Method Summary - (collapse) -

- - - - - - - -
-

Instance Method Details

- - -
-

- - - (Object) human_name - - - - - -

- - - - -
-
-
-
-8
-9
-10
-11
-12
-13
-14
-
-
# File 'app/models/unit.rb', line 8
-
-def human_name
-  if label
-    label.html_safe
-  else 
-    name.gsub(/Per/,'/').downcase
-  end
-end
-
-
- -
-

- - - (Object) update_dictionary - - - - - -

- - - - -
-
-
-
-22
-23
-24
-
-
# File 'app/models/unit.rb', line 22
-
-def update_dictionary
-  # Delayed::Job.enqueue UnitDictionaryUpdateJob.new(self)
-end
-
-
- -
-

- - - (Object) update_job - - - - - -

- - - - -
-
-
-
-16
-17
-18
-
-
# File 'app/models/unit.rb', line 16
-
-def update_job
-  # Delayed::Job.enqueue UnitUpdateJob.new(self)
-end
-
-
- -
- -
- - - - - \ No newline at end of file diff --git a/doc/UnitDictionaryJob.html b/doc/UnitDictionaryJob.html deleted file mode 100644 index 62d526101..000000000 --- a/doc/UnitDictionaryJob.html +++ /dev/null @@ -1,323 +0,0 @@ - - - - - - Class: UnitDictionaryJob - - — Documentation by YARD 0.8.7.6 - - - - - - - - - - - - - - - - - - - - - -

Class: UnitDictionaryJob - - - -

- -
- -
Inherits:
-
- Struct - -
    -
  • Object
  • - - - - - -
- show all - -
- - - - - - - - - -
Defined in:
-
app/models/unit_dictionary_job.rb
- -
-
- -

Overview

-
- -

require 'UnitDictionary'

- - -
-
-
- - -
- - - -

Instance Attribute Summary (collapse)

- - - - - - -

- Instance Method Summary - (collapse) -

- - - - - - -
-

Instance Attribute Details

- - - -
-

- - - (Object) unit - - - - - -

-
- -

Returns the value of attribute unit

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Object) - - - - — -
    -

    the current value of unit

    -
    - -
  • - -
- -
- - - - -
-
-
-
-3
-4
-5
-
-
# File 'app/models/unit_dictionary_job.rb', line 3
-
-def unit
-  @unit
-end
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - - (Object) perform - - - - - -

- - - - -
-
-
-
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-
-
# File 'app/models/unit_dictionary_job.rb', line 4
-
-def perform
-  # #updating units
-  #  u = DictionaryUnit.find(unit.dictionary_id)
-  #  unless u
-  #    u = DictionaryUnit.find(unit.name)
-  #  end
-  #  # if u
-  #  #   unit.update_attributes :description => u.description,
-  #  #                          :name        =>  u.name
-  #  #                          :deprecated_in_favor_of => u.deprecated_in_favor_of
-  #  #
-  #  #   unit.save
-  #  # end
-end
-
-
- -
- -
- - - - - \ No newline at end of file diff --git a/doc/UnitsController.html b/doc/UnitsController.html deleted file mode 100644 index 68d63383a..000000000 --- a/doc/UnitsController.html +++ /dev/null @@ -1,359 +0,0 @@ - - - - - - Class: UnitsController - - — Documentation by YARD 0.8.7.6 - - - - - - - - - - - - - - - - - - - - - -

Class: UnitsController - - - -

- -
- -
Inherits:
-
- ApplicationController - - - show all - -
- - - - - - - - - -
Defined in:
-
app/controllers/units_controller.rb
- -
-
- - - - - - - - - -

- Instance Method Summary - (collapse) -

- - - - - - - - - - - - - - -
-

Instance Method Details

- - -
-

- - - (Object) edit - - - - - -

- - - - -
-
-
-
-12
-13
-
-
# File 'app/controllers/units_controller.rb', line 12
-
-def edit
-end
-
-
- -
-

- - - (Object) index - - - - - -

- - - - -
-
-
-
-8
-9
-10
-
-
# File 'app/controllers/units_controller.rb', line 8
-
-def index
-  @units = Unit.not_in_eml
-end
-
-
- -
-

- - - (Object) show - - - - - -

- - - - -
-
-
-
-22
-23
-
-
# File 'app/controllers/units_controller.rb', line 22
-
-def show
-end
-
-
- -
-

- - - (Object) update - - - - - -

- - - - -
-
-
-
-15
-16
-17
-18
-19
-20
-
-
# File 'app/controllers/units_controller.rb', line 15
-
-def update
-  if @unit.update_attributes(params[:unit])
-    flash[:notice] = 'Unit was succesfully updated'
-  end
-  respond_with @unit
-end
-
-
- -
- -
- - - - - \ No newline at end of file diff --git a/doc/User.html b/doc/User.html deleted file mode 100644 index ee17d3dd9..000000000 --- a/doc/User.html +++ /dev/null @@ -1,444 +0,0 @@ - - - - - - Class: User - - — Documentation by YARD 0.8.7.6 - - - - - - - - - - - - - - - - - - - - - -

Class: User - - - -

- -
- -
Inherits:
-
- ActiveRecord::Base - -
    -
  • Object
  • - - - - - -
- show all - -
- - - - - - -
Includes:
-
Clearance::User
- - - - - -
Defined in:
-
app/models/user.rb
- -
-
- -

Overview

-
- -

Members who are able to log in and do things on the site.

- - -
-
-
- - -
-

Constant Summary

- -
- -
ROLES = - -
-
%w[admin editor uploader]
- -
- - - - - - - - - -

- Instance Method Summary - (collapse) -

- - - - - - - - -
-

Instance Method Details

- - -
-

- - - (Boolean) admin? - - - - - -

-
- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-34
-35
-36
-
-
# File 'app/models/user.rb', line 34
-
-def admin?
-  'admin' == role
-end
-
-
- -
-

- - - (Boolean) has_permission_from?(owner, datatable) - - - - - -

-
- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-38
-39
-40
-41
-
-
# File 'app/models/user.rb', line 38
-
-def has_permission_from?(owner, datatable)
-  permission = permissions.find_by_owner_id_and_datatable_id(owner, datatable)
-  permission && !permission.denied?
-end
-
-
- -
-

- - - (Boolean) owns?(datatable) - - - - - -

-
- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-30
-31
-32
-
-
# File 'app/models/user.rb', line 30
-
-def owns?(datatable)
-  self.datatables.include?(datatable)
-end
-
-
- -
-

- - - (Object) to_s - - - - - -

- - - - -
-
-
-
-26
-27
-28
-
-
# File 'app/models/user.rb', line 26
-
-def to_s
-  self.email
-end
-
-
- -
- -
- - - - - \ No newline at end of file diff --git a/doc/UsersController.html b/doc/UsersController.html deleted file mode 100644 index 89e6fb457..000000000 --- a/doc/UsersController.html +++ /dev/null @@ -1,326 +0,0 @@ - - - - - - Class: UsersController - - — Documentation by YARD 0.8.7.6 - - - - - - - - - - - - - - - - - - - - - -

Class: UsersController - - - -

- -
- -
Inherits:
-
- Clearance::UsersController - -
    -
  • Object
  • - - - - - -
- show all - -
- - - - - - - - - -
Defined in:
-
app/controllers/users_controller.rb
- -
-
- - - - - - - - - -

- Instance Method Summary - (collapse) -

- - - - - - - -
-

Instance Method Details

- - -
-

- - - (Object) create - - - - - -

- - - - -
-
-
-
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
-
-
# File 'app/controllers/users_controller.rb', line 4
-
-def create
-  @user = User.new user_params
-  @invite = Invite.find_redeemable(params[:invite_code])
-
-  if @user.save
-    if @invite
-      @invite.redeemed!
-      if @invite.glbrc_member?
-        sponsor = Sponsor.find_by_name('glbrc')
-        Membership.create(:user => @user, :sponsor => sponsor)
-      end
-    end
-
-    redirect_to(url_after_create)
-  else
-    render :new
-  end
-end
-
-
- -
-

- - - (Object) new - - - - - -

- - - - -
-
-
-
-23
-24
-25
-26
-
-
# File 'app/controllers/users_controller.rb', line 23
-
-def new
-  @invite_code = params[:invite_code]
-  super
-end
-
-
- -
-

- - - (Object) show - - - - - -

- - - - -
-
-
-
-28
-29
-
-
# File 'app/controllers/users_controller.rb', line 28
-
-def show
-end
-
-
- -
- -
- - - - - \ No newline at end of file diff --git a/doc/Variate.html b/doc/Variate.html deleted file mode 100644 index 1e0d1a493..000000000 --- a/doc/Variate.html +++ /dev/null @@ -1,459 +0,0 @@ - - - - - - Class: Variate - - — Documentation by YARD 0.8.7.6 - - - - - - - - - - - - - - - - - - - - - -

Class: Variate - - - -

- -
- -
Inherits:
-
- ActiveRecord::Base - -
    -
  • Object
  • - - - - - -
- show all - -
- - - - - - - - - -
Defined in:
-
lib/load_variates.rb,
- app/models/variate.rb
-
- -
-
- - - - - - - - - -

- Class Method Summary - (collapse) -

- - - -

- Instance Method Summary - (collapse) -

- - - - - - - -
-

Class Method Details

- - -
-

- - + (Object) from_eml(variate_eml) - - - - - -

- - - - -
-
-
-
-10
-11
-12
-13
-14
-15
-16
-17
-
-
# File 'app/models/variate.rb', line 10
-
-def self.from_eml(variate_eml)
-  variate = Variate.new
-  variate.set_attributes_from_eml(variate_eml)
-  variate.set_unit_from_eml(variate_eml)
-  variate.save
-
-  variate
-end
-
-
- -
- -
-

Instance Method Details

- - -
-

- - - (Object) human_name - - - - - -

- - - - -
-
-
-
-47
-48
-49
-
-
# File 'app/models/variate.rb', line 47
-
-def human_name
-  self.unit.try(:human_name)
-end
-
-
- -
-

- - - (Object) set_attributes_from_eml(variate_eml) - - - - - -

- - - - -
-
-
-
-19
-20
-21
-22
-23
-24
-25
-26
-
-
# File 'app/models/variate.rb', line 19
-
-def set_attributes_from_eml(variate_eml)
-  self.name              = variate_eml.css('attributeName').text
-  self.description       = variate_eml.at_css('attributeDefinition, definition').text
-  self.measurement_scale = variate_eml.at_css('measurementScale').at_css('nominal, ordinal, interval, ratio, dateTime').name
-  self.precision         = variate_eml.at_css('precision').try(:text).try(:to_f)
-  self.data_type         = variate_eml.at_css('numberType').try(:text)
-  self.date_format       = variate_eml.at_css('formatString').try(:text)
-end
-
-
- -
-

- - - (Object) set_unit_from_eml(variate_eml) - - - - - -

- - - - -
-
-
-
-28
-29
-30
-31
-32
-33
-34
-35
-36
-
-
# File 'app/models/variate.rb', line 28
-
-def set_unit_from_eml(variate_eml)
-  if variate_eml.at_css('standardUnit')
-    unit_name = variate_eml.at_css('standardUnit').text
-    self.unit = Unit.find_or_create_by_name_and_in_eml(unit_name, true)
-  elsif variate_eml.at_css('customUnit')
-    unit_name = variate_eml.at_css('customUnit').text
-    self.unit = Unit.find_or_create_by_name_and_in_eml(unit_name, false)
-  end
-end
-
-
- -
-

- - - (Object) to_eml(xml = ::Builder::XmlMarkup.new) - - - - - -

- - - - -
-
-
-
-38
-39
-40
-41
-42
-43
-44
-45
-
-
# File 'app/models/variate.rb', line 38
-
-def to_eml(xml = ::Builder::XmlMarkup.new)
-  @eml = xml
-  @eml.attribute do
-    @eml.attributeName name
-    @eml.attributeDefinition description
-    eml_measurement_scale
-  end
-end
-
-
- -
- -
- - - - - \ No newline at end of file diff --git a/doc/VariatesController.html b/doc/VariatesController.html deleted file mode 100644 index 734da0023..000000000 --- a/doc/VariatesController.html +++ /dev/null @@ -1,650 +0,0 @@ - - - - - - Class: VariatesController - - — Documentation by YARD 0.8.7.6 - - - - - - - - - - - - - - - - - - - - - -

Class: VariatesController - - - -

- -
- -
Inherits:
-
- ApplicationController - - - show all - -
- - - - - - - - - -
Defined in:
-
app/controllers/variates_controller.rb
- -
-
- - - - - - - - - -

- Instance Method Summary - (collapse) -

- - - - - - - - - - - - - - -
-

Instance Method Details

- - -
-

- - - (Object) create - - - - - -

-
- -

POST /variates POST /variates.xml

- - -
-
-
- - -
- - - - -
-
-
-
-39
-40
-41
-42
-43
-44
-45
-46
-
-
# File 'app/controllers/variates_controller.rb', line 39
-
-def create
-  @variate = Variate.new(params[:variate])
-
-  if @variate.save
-    flash[:notice] = 'Variate was successfully created.'
-  end
-  respond_with @variate
-end
-
-
- -
-

- - - (Object) destroy - - - - - -

-
- -

DELETE /variates/1 DELETE /variates/1.xml

- - -
-
-
- - -
- - - - -
-
-
-
-59
-60
-61
-62
-63
-64
-65
-66
-
-
# File 'app/controllers/variates_controller.rb', line 59
-
-def destroy
-  @variate.destroy
-
-  respond_to do |format|
-    format.html { redirect_to variates_url }
-    format.xml  { head :ok }
-  end
-end
-
-
- -
-

- - - (Object) edit - - - - - -

-
- -

GET /variates/1;edit

- - -
-
-
- - -
- - - - -
-
-
-
-34
-35
-
-
# File 'app/controllers/variates_controller.rb', line 34
-
-def edit
-end
-
-
- -
-

- - - (Object) index - - - - - -

-
- -

GET /variates GET /variates.xml

- - -
-
-
- - -
- - - - -
-
-
-
-7
-8
-9
-10
-11
-12
-13
-14
-
-
# File 'app/controllers/variates_controller.rb', line 7
-
-def index
-  @variates = Variate.all
-
-  respond_to do |format|
-    format.html # index.rhtml
-    format.xml  { render :xml => @variates.to_xml }
-  end
-end
-
-
- -
-

- - - (Object) new - - - - - -

-
- -

GET /variates/new

- - -
-
-
- - -
- - - - -
-
-
-
-26
-27
-28
-29
-30
-31
-
-
# File 'app/controllers/variates_controller.rb', line 26
-
-def new
-  @variate = Variate.new
-  respond_to do |format|
-     format.html
-   end
-end
-
-
- -
-

- - - (Object) show - - - - - -

-
- -

GET /variates/1 GET /variates/1.xml

- - -
-
-
- - -
- - - - -
-
-
-
-18
-19
-20
-21
-22
-23
-
-
# File 'app/controllers/variates_controller.rb', line 18
-
-def show
-  respond_to do |format|
-    format.html # show.rhtml
-    format.xml  { render :xml => @variate.to_xml }
-  end
-end
-
-
- -
-

- - - (Object) update - - - - - -

-
- -

PUT /variates/1 PUT /variates/1.xml

- - -
-
-
- - -
- - - - -
-
-
-
-50
-51
-52
-53
-54
-55
-
-
# File 'app/controllers/variates_controller.rb', line 50
-
-def update
-  if @variate.update_attributes(params[:variate])
-    flash[:notice] = 'Variate was successfully updated.'
-  end
-  respond_with @variate
-end
-
-
- -
- -
- - - - - \ No newline at end of file diff --git a/doc/VenueType.html b/doc/VenueType.html deleted file mode 100644 index 6579c5185..000000000 --- a/doc/VenueType.html +++ /dev/null @@ -1,134 +0,0 @@ - - - - - - Class: VenueType - - — Documentation by YARD 0.8.7.6 - - - - - - - - - - - - - - - - - - - - - -

Class: VenueType - - - -

- -
- -
Inherits:
-
- ActiveRecord::Base - -
    -
  • Object
  • - - - - - -
- show all - -
- - - - - - - - - -
Defined in:
-
app/models/venue_type.rb
- -
-
- -

Overview

-
- -

Meetings can be in local, national, or other types of venues.

- - -
-
-
- - -
- - - - - - - - - -
- - - - - \ No newline at end of file diff --git a/doc/Visualization.html b/doc/Visualization.html deleted file mode 100644 index a6cd759fc..000000000 --- a/doc/Visualization.html +++ /dev/null @@ -1,192 +0,0 @@ - - - - - - Class: Visualization - - — Documentation by YARD 0.8.7.6 - - - - - - - - - - - - - - - - - - - - - -

Class: Visualization - - - -

- -
- -
Inherits:
-
- ActiveRecord::Base - -
    -
  • Object
  • - - - - - -
- show all - -
- - - - - - - - - -
Defined in:
-
app/models/visualization.rb
- -
-
- - - - - - - - - -

- Instance Method Summary - (collapse) -

- - - - - - - -
-

Instance Method Details

- - -
-

- - - (Object) data - - - - - -

- - - - -
-
-
-
-4
-5
-6
-
-
# File 'app/models/visualization.rb', line 4
-
-def data
-  ActiveRecord::Base.connection.execute(self.query)
-end
-
-
- -
- -
- - - - - \ No newline at end of file diff --git a/doc/VisualizationsController.html b/doc/VisualizationsController.html deleted file mode 100644 index 8bf5b781d..000000000 --- a/doc/VisualizationsController.html +++ /dev/null @@ -1,203 +0,0 @@ - - - - - - Class: VisualizationsController - - — Documentation by YARD 0.8.7.6 - - - - - - - - - - - - - - - - - - - - - -

Class: VisualizationsController - - - -

- -
- -
Inherits:
-
- ApplicationController - - - show all - -
- - - - - - - - - -
Defined in:
-
app/controllers/visualizations_controller.rb
- -
-
- - - - - - - - - -

- Instance Method Summary - (collapse) -

- - - - - - - - - - - - - - -
-

Instance Method Details

- - -
-

- - - (Object) show - - - - - -

- - - - -
-
-
-
-4
-5
-6
-7
-
-
# File 'app/controllers/visualizations_controller.rb', line 4
-
-def show
-  visualization = Visualization.find(params[:id])
-  respond_with visualization.data
-end
-
-
- -
- -
- - - - - \ No newline at end of file diff --git a/doc/VisualizationsHelper.html b/doc/VisualizationsHelper.html deleted file mode 100644 index b0645fb47..000000000 --- a/doc/VisualizationsHelper.html +++ /dev/null @@ -1,105 +0,0 @@ - - - - - - Module: VisualizationsHelper - - — Documentation by YARD 0.8.7.6 - - - - - - - - - - - - - - - - - - - - - -

Module: VisualizationsHelper - - - -

- -
- - - - - - - - -
Defined in:
-
app/helpers/visualizations_helper.rb
- -
-
- - - - - - - - - - -
- - - - - \ No newline at end of file diff --git a/doc/Website.html b/doc/Website.html deleted file mode 100644 index 0a4a5434b..000000000 --- a/doc/Website.html +++ /dev/null @@ -1,134 +0,0 @@ - - - - - - Class: Website - - — Documentation by YARD 0.8.7.6 - - - - - - - - - - - - - - - - - - - - - -

Class: Website - - - -

- -
- -
Inherits:
-
- ActiveRecord::Base - -
    -
  • Object
  • - - - - - -
- show all - -
- - - - - - - - - -
Defined in:
-
app/models/website.rb
- -
-
- -

Overview

-
- -

GLBRC and LTER have different information; Website is used to separate it.

- - -
-
-
- - -
- - - - - - - - - -
- - - - - \ No newline at end of file diff --git a/doc/_index.html b/doc/_index.html deleted file mode 100644 index 39d7e0762..000000000 --- a/doc/_index.html +++ /dev/null @@ -1,708 +0,0 @@ - - - - - - Documentation by YARD 0.8.7.6 - - - - - - - - - - - - - - - - - - - - - -

Documentation by YARD 0.8.7.6

-
-

Alphabetic Index

- -
-

Namespace Listing A-Z

- - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
- -
- - - - - \ No newline at end of file diff --git a/doc/class_list.html b/doc/class_list.html deleted file mode 100644 index 9d1abf7e0..000000000 --- a/doc/class_list.html +++ /dev/null @@ -1,58 +0,0 @@ - - - - - - - - - - - - - - - - - Class List - - - - -
-

Class List

- - - - -
- - diff --git a/doc/css/common.css b/doc/css/common.css deleted file mode 100644 index cf25c4523..000000000 --- a/doc/css/common.css +++ /dev/null @@ -1 +0,0 @@ -/* Override this file with custom rules */ \ No newline at end of file diff --git a/doc/css/full_list.css b/doc/css/full_list.css deleted file mode 100644 index c918cf190..000000000 --- a/doc/css/full_list.css +++ /dev/null @@ -1,57 +0,0 @@ -body { - margin: 0; - font-family: "Lucida Sans", "Lucida Grande", Verdana, Arial, sans-serif; - font-size: 13px; - height: 101%; - overflow-x: hidden; -} - -h1 { padding: 12px 10px; padding-bottom: 0; margin: 0; font-size: 1.4em; } -.clear { clear: both; } -#search { position: absolute; right: 5px; top: 9px; padding-left: 24px; } -#content.insearch #search, #content.insearch #noresults { background: url(data:image/gif;base64,R0lGODlhEAAQAPYAAP///wAAAPr6+pKSkoiIiO7u7sjIyNjY2J6engAAAI6OjsbGxjIyMlJSUuzs7KamppSUlPLy8oKCghwcHLKysqSkpJqamvT09Pj4+KioqM7OzkRERAwMDGBgYN7e3ujo6Ly8vCoqKjY2NkZGRtTU1MTExDw8PE5OTj4+PkhISNDQ0MrKylpaWrS0tOrq6nBwcKysrLi4uLq6ul5eXlxcXGJiYoaGhuDg4H5+fvz8/KKiohgYGCwsLFZWVgQEBFBQUMzMzDg4OFhYWBoaGvDw8NbW1pycnOLi4ubm5kBAQKqqqiQkJCAgIK6urnJyckpKSjQ0NGpqatLS0sDAwCYmJnx8fEJCQlRUVAoKCggICLCwsOTk5ExMTPb29ra2tmZmZmhoaNzc3KCgoBISEiIiIgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH/C05FVFNDQVBFMi4wAwEAAAAh/hpDcmVhdGVkIHdpdGggYWpheGxvYWQuaW5mbwAh+QQJCAAAACwAAAAAEAAQAAAHaIAAgoMgIiYlg4kACxIaACEJCSiKggYMCRselwkpghGJBJEcFgsjJyoAGBmfggcNEx0flBiKDhQFlIoCCA+5lAORFb4AJIihCRbDxQAFChAXw9HSqb60iREZ1omqrIPdJCTe0SWI09GBACH5BAkIAAAALAAAAAAQABAAAAdrgACCgwc0NTeDiYozCQkvOTo9GTmDKy8aFy+NOBA7CTswgywJDTIuEjYFIY0JNYMtKTEFiRU8Pjwygy4ws4owPyCKwsMAJSTEgiQlgsbIAMrO0dKDGMTViREZ14kYGRGK38nHguHEJcvTyIEAIfkECQgAAAAsAAAAABAAEAAAB2iAAIKDAggPg4iJAAMJCRUAJRIqiRGCBI0WQEEJJkWDERkYAAUKEBc4Po1GiKKJHkJDNEeKig4URLS0ICImJZAkuQAhjSi/wQyNKcGDCyMnk8u5rYrTgqDVghgZlYjcACTA1sslvtHRgQAh+QQJCAAAACwAAAAAEAAQAAAHZ4AAgoOEhYaCJSWHgxGDJCQARAtOUoQRGRiFD0kJUYWZhUhKT1OLhR8wBaaFBzQ1NwAlkIszCQkvsbOHL7Y4q4IuEjaqq0ZQD5+GEEsJTDCMmIUhtgk1lo6QFUwJVDKLiYJNUd6/hoEAIfkECQgAAAAsAAAAABAAEAAAB2iAAIKDhIWGgiUlh4MRgyQkjIURGRiGGBmNhJWHm4uen4ICCA+IkIsDCQkVACWmhwSpFqAABQoQF6ALTkWFnYMrVlhWvIKTlSAiJiVVPqlGhJkhqShHV1lCW4cMqSkAR1ofiwsjJyqGgQAh+QQJCAAAACwAAAAAEAAQAAAHZ4AAgoOEhYaCJSWHgxGDJCSMhREZGIYYGY2ElYebi56fhyWQniSKAKKfpaCLFlAPhl0gXYNGEwkhGYREUywag1wJwSkHNDU3D0kJYIMZQwk8MjPBLx9eXwuETVEyAC/BOKsuEjYFhoEAIfkECQgAAAAsAAAAABAAEAAAB2eAAIKDhIWGgiUlh4MRgyQkjIURGRiGGBmNhJWHm4ueICImip6CIQkJKJ4kigynKaqKCyMnKqSEK05StgAGQRxPYZaENqccFgIID4KXmQBhXFkzDgOnFYLNgltaSAAEpxa7BQoQF4aBACH5BAkIAAAALAAAAAAQABAAAAdogACCg4SFggJiPUqCJSWGgkZjCUwZACQkgxGEXAmdT4UYGZqCGWQ+IjKGGIUwPzGPhAc0NTewhDOdL7Ykji+dOLuOLhI2BbaFETICx4MlQitdqoUsCQ2vhKGjglNfU0SWmILaj43M5oEAOwAAAAAAAAAAAA==) no-repeat center left; } -#full_list { padding: 0; list-style: none; margin-left: 0; } -#full_list ul { padding: 0; } -#full_list li { padding: 5px; padding-left: 12px; margin: 0; font-size: 1.1em; list-style: none; } -#noresults { padding: 7px 12px; } -#content.insearch #noresults { margin-left: 7px; } -ul.collapsed ul, ul.collapsed li { display: none; } -ul.collapsed.search_uncollapsed { display: block; } -ul.collapsed.search_uncollapsed li { display: list-item; } -li a.toggle { cursor: default; position: relative; left: -5px; top: 4px; text-indent: -999px; width: 10px; height: 9px; margin-left: -10px; display: block; float: left; background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAASCAYAAABb0P4QAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAK8AAACvABQqw0mAAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTM5jWRgMAAAAVdEVYdENyZWF0aW9uIFRpbWUAMy8xNC8wOeNZPpQAAAE2SURBVDiNrZTBccIwEEXfelIAHUA6CZ24BGaWO+FuzZAK4k6gg5QAdGAq+Bxs2Yqx7BzyL7Llp/VfzZeQhCTc/ezuGzKKnKSzpCxXJM8fwNXda3df5RZETlIt6YUzSQDs93sl8w3wBZxCCE10GM1OcWbWjB2mWgEH4Mfdyxm3PSepBHibgQE2wLe7r4HjEidpnXMYdQPKEMJcsZ4zs2POYQOcaPfwMVOo58zsAdMt18BuoVDPxUJRacELbXv3hUIX2vYmOUvi8C8ydz/ThjXrqKqqLbDIAdsCKBd+Wo7GWa7o9qzOQHVVVXeAbs+yHHCH4aTsaCOQqunmUy1yBUAXkdMIfMlgF5EXLo2OpV/c/Up7jG4hhHcYLgWzAZXUc2b2ixsfvc/RmNNfOXD3Q/oeL9axJE1yT9IOoUu6MGUkAAAAAElFTkSuQmCC) no-repeat bottom left; } -li.collapsed a.toggle { opacity: 0.5; cursor: default; background-position: top left; } -li { color: #888; cursor: pointer; } -li.deprecated { text-decoration: line-through; font-style: italic; } -li.r1 { background: #f0f0f0; } -li.r2 { background: #fafafa; } -li:hover { background: #ddd; } -li small:before { content: "("; } -li small:after { content: ")"; } -li small.search_info { display: none; } -a:link, a:visited { text-decoration: none; color: #05a; } -li.clicked { background: #05a; color: #ccc; } -li.clicked a:link, li.clicked a:visited { color: #eee; } -li.clicked a.toggle { opacity: 0.5; background-position: bottom right; } -li.collapsed.clicked a.toggle { background-position: top right; } -#search input { border: 1px solid #bbb; -moz-border-radius: 3px; -webkit-border-radius: 3px; } -#nav { margin-left: 10px; font-size: 0.9em; display: none; color: #aaa; } -#nav a:link, #nav a:visited { color: #358; } -#nav a:hover { background: transparent; color: #5af; } -.frames #nav span:after { content: ' | '; } -.frames #nav span:last-child:after { content: ''; } - -.frames #content h1 { margin-top: 0; } -.frames li { white-space: nowrap; cursor: normal; } -.frames li small { display: block; font-size: 0.8em; } -.frames li small:before { content: ""; } -.frames li small:after { content: ""; } -.frames li small.search_info { display: none; } -.frames #search { width: 170px; position: static; margin: 3px; margin-left: 10px; font-size: 0.9em; color: #888; padding-left: 0; padding-right: 24px; } -.frames #content.insearch #search { background-position: center right; } -.frames #search input { width: 110px; } -.frames #nav { display: block; } - -#full_list.insearch li { display: none; } -#full_list.insearch li.found { display: list-item; padding-left: 10px; } -#full_list.insearch li a.toggle { display: none; } -#full_list.insearch li small.search_info { display: block; } diff --git a/doc/css/style.css b/doc/css/style.css deleted file mode 100644 index 96307c561..000000000 --- a/doc/css/style.css +++ /dev/null @@ -1,339 +0,0 @@ -body { - padding: 0 20px; - font-family: "Lucida Sans", "Lucida Grande", Verdana, Arial, sans-serif; - font-size: 13px; -} -body.frames { padding: 0 5px; } -h1 { font-size: 25px; margin: 1em 0 0.5em; padding-top: 4px; border-top: 1px dotted #d5d5d5; } -h1.noborder { border-top: 0px; margin-top: 0; padding-top: 4px; } -h1.title { margin-bottom: 10px; } -h1.alphaindex { margin-top: 0; font-size: 22px; } -h2 { - padding: 0; - padding-bottom: 3px; - border-bottom: 1px #aaa solid; - font-size: 1.4em; - margin: 1.8em 0 0.5em; -} -h2 small { font-weight: normal; font-size: 0.7em; display: block; float: right; } -.clear { clear: both; } -.inline { display: inline; } -.inline p:first-child { display: inline; } -.docstring h1, .docstring h2, .docstring h3, .docstring h4 { padding: 0; border: 0; border-bottom: 1px dotted #bbb; } -.docstring h1 { font-size: 1.2em; } -.docstring h2 { font-size: 1.1em; } -.docstring h3, .docstring h4 { font-size: 1em; border-bottom: 0; padding-top: 10px; } -.summary_desc .object_link, .docstring .object_link { font-family: monospace; } -.rdoc-term { padding-right: 25px; font-weight: bold; } -.rdoc-list p { margin: 0; padding: 0; margin-bottom: 4px; } - -/* style for */ -#filecontents table, .docstring table { border-collapse: collapse; } -#filecontents table th, #filecontents table td, -.docstring table th, .docstring table td { border: 1px solid #ccc; padding: 8px; padding-right: 17px; } -#filecontents table tr:nth-child(odd), -.docstring table tr:nth-child(odd) { background: #eee; } -#filecontents table tr:nth-child(even), -.docstring table tr:nth-child(even) { background: #fff; } -#filecontents table th, .docstring table th { background: #fff; } - -/* style for
- - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - \ No newline at end of file diff --git a/doc/js/app.js b/doc/js/app.js deleted file mode 100644 index d933ebcf5..000000000 --- a/doc/js/app.js +++ /dev/null @@ -1,219 +0,0 @@ -function createSourceLinks() { - $('.method_details_list .source_code'). - before("[View source]"); - $('.toggleSource').toggle(function() { - $(this).parent().nextAll('.source_code').slideDown(100); - $(this).text("Hide source"); - }, - function() { - $(this).parent().nextAll('.source_code').slideUp(100); - $(this).text("View source"); - }); -} - -function createDefineLinks() { - var tHeight = 0; - $('.defines').after(" more..."); - $('.toggleDefines').toggle(function() { - tHeight = $(this).parent().prev().height(); - $(this).prev().show(); - $(this).parent().prev().height($(this).parent().height()); - $(this).text("(less)"); - }, - function() { - $(this).prev().hide(); - $(this).parent().prev().height(tHeight); - $(this).text("more..."); - }); -} - -function createFullTreeLinks() { - var tHeight = 0; - $('.inheritanceTree').toggle(function() { - tHeight = $(this).parent().prev().height(); - $(this).parent().toggleClass('showAll'); - $(this).text("(hide)"); - $(this).parent().prev().height($(this).parent().height()); - }, - function() { - $(this).parent().toggleClass('showAll'); - $(this).parent().prev().height(tHeight); - $(this).text("show all"); - }); -} - -function fixBoxInfoHeights() { - $('dl.box dd.r1, dl.box dd.r2').each(function() { - $(this).prev().height($(this).height()); - }); -} - -function searchFrameLinks() { - $('.full_list_link').click(function() { - toggleSearchFrame(this, $(this).attr('href')); - return false; - }); -} - -function toggleSearchFrame(id, link) { - var frame = $('#search_frame'); - $('#search a').removeClass('active').addClass('inactive'); - if (frame.attr('src') == link && frame.css('display') != "none") { - frame.slideUp(100); - $('#search a').removeClass('active inactive'); - } - else { - $(id).addClass('active').removeClass('inactive'); - frame.attr('src', link).slideDown(100); - } -} - -function linkSummaries() { - $('.summary_signature').click(function() { - document.location = $(this).find('a').attr('href'); - }); -} - -function framesInit() { - if (hasFrames) { - document.body.className = 'frames'; - $('#menu .noframes a').attr('href', document.location); - try { - window.top.document.title = $('html head title').text(); - } catch(error) { - // some browsers will not allow this when serving from file:// - // but we don't want to stop the world. - } - } - else { - $('#menu .noframes a').text('frames').attr('href', framesUrl); - } -} - -function keyboardShortcuts() { - if (window.top.frames.main) return; - $(document).keypress(function(evt) { - if (evt.altKey || evt.ctrlKey || evt.metaKey || evt.shiftKey) return; - if (typeof evt.target !== "undefined" && - (evt.target.nodeName == "INPUT" || - evt.target.nodeName == "TEXTAREA")) return; - switch (evt.charCode) { - case 67: case 99: $('#class_list_link').click(); break; // 'c' - case 77: case 109: $('#method_list_link').click(); break; // 'm' - case 70: case 102: $('#file_list_link').click(); break; // 'f' - default: break; - } - }); -} - -function summaryToggle() { - $('.summary_toggle').click(function() { - if (localStorage) { - localStorage.summaryCollapsed = $(this).text(); - } - $('.summary_toggle').each(function() { - $(this).text($(this).text() == "collapse" ? "expand" : "collapse"); - var next = $(this).parent().parent().nextAll('ul.summary').first(); - if (next.hasClass('compact')) { - next.toggle(); - next.nextAll('ul.summary').first().toggle(); - } - else if (next.hasClass('summary')) { - var list = $('