Files
growstuff/app/views/jobs/index.html.haml
T

53 lines
1.8 KiB
Plaintext

- content_for :title, title('jobs', @owner, nil, nil)
-# The add-photo dialog, which the notepad's menu opens over the page, is a React island.
- if @job_groups
- content_for :scripts do
= javascript_include_tag 'react_islands', defer: true
- content_for :breadcrumbs do
- if @owner
%li.breadcrumb-item= link_to 'Jobs', jobs_path
%li.breadcrumb-item.active= link_to "#{@owner}'s jobs", member_jobs_path(@owner)
- else
%li.breadcrumb-item.active= link_to 'Jobs', jobs_path
.row
-# A member's own jobs are a notepad across the page. Anyone else's, or everyone's,
-# are a list, with its options beside it.
- if @job_groups
.col-12
= render 'jobs/notepad', owner: @owner, groups: @job_groups, done_this_week: @done_this_week
- else
.col-md-3
%h1.h2
= job_icon
Jobs
= link_to show_inactive_tickbox_path('jobs', owner: @owner, crop: nil, show_all: @show_all) do
= check_box_tag 'active', 'all', @show_all
include finished jobs
- if @owner.present? && @owner != current_member
%hr
= render @owner, cached: true
%section.open-data.mt-3
%h2 Open Data
%p= t('label.data')
- ['csv', 'json', 'rss'].each do |format|
.badge.text-bg-info
= link_to (@owner ? member_jobs_path(@owner, format: format) : jobs_path(format: format)) do
= icon 'fas', format.to_s
= format.upcase
- if @owner
.badge.text-bg-info= link_to "iCal", member_jobs_path(@owner, format: 'ics', protocol: 'webcal', only_path: false)
.badge.text-bg-success= link_to 'API Methods', '/api-docs'
.col-md-9
%section
%h2= title('jobs', @owner, nil, nil)
= will_paginate @jobs
.index-cards
- @jobs.each do |a|
= render 'jobs/card', job: a
= will_paginate @jobs