mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2025-02-11 05:54:15 +01:00
Merge branch 'dev' for release 2.5.6
This commit is contained in:
commit
0a76aec194
@ -1 +1 @@
|
|||||||
2.5.5
|
2.5.6
|
||||||
|
@ -1,5 +1,12 @@
|
|||||||
# Changelog Fab Manager
|
# Changelog Fab Manager
|
||||||
|
|
||||||
|
## v2.5.6 2017 May 18
|
||||||
|
|
||||||
|
- Ability for admins to create users as organizations
|
||||||
|
- Invoices object will contain the organization name if any (#64)
|
||||||
|
- RSS feeds will return more data about events and projects, especially images
|
||||||
|
- Improved Docker documentation (#65)
|
||||||
|
|
||||||
## v2.5.5 2017 May 15
|
## v2.5.5 2017 May 15
|
||||||
|
|
||||||
- Fix a bug: New groups does not have their spaces prices initialized
|
- Fix a bug: New groups does not have their spaces prices initialized
|
||||||
|
@ -535,6 +535,15 @@ Application.Controllers.controller "NewMemberController", ["$scope", "$state", "
|
|||||||
$scope.user =
|
$scope.user =
|
||||||
plan_interval: ''
|
plan_interval: ''
|
||||||
|
|
||||||
|
## Callback when the admin check/unckeck the box telling that the new user is an organization.
|
||||||
|
## Disable or enable the organization fields in the form, accordingly
|
||||||
|
$scope.toggleOrganization = ->
|
||||||
|
if $scope.user.organization
|
||||||
|
$scope.user.profile = {} unless $scope.user.profile
|
||||||
|
$scope.user.profile.organization = {}
|
||||||
|
else
|
||||||
|
$scope.user.profile.organization = undefined
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Using the MembersController
|
## Using the MembersController
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="col-md-8 b-l b-r">
|
<div class="col-md-8 b-l b-r">
|
||||||
<section class="heading-title">
|
<section class="heading-title">
|
||||||
<h1 translate>{{ 'add_a_member' }}</h1>
|
<h1 translate>{{ 'members_new.add_a_member' }}</h1>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@ -35,6 +35,21 @@
|
|||||||
|
|
||||||
<section class="panel panel-default bg-light m-lg">
|
<section class="panel panel-default bg-light m-lg">
|
||||||
<div class="panel-body m-r">
|
<div class="panel-body m-r">
|
||||||
|
|
||||||
|
<div class="row m-t">
|
||||||
|
<div class="col-sm-6 col-sm-offset-5">
|
||||||
|
<div class="form-group checkbox-group">
|
||||||
|
<input type="checkbox"
|
||||||
|
name="organization"
|
||||||
|
id="organization"
|
||||||
|
ng-model="user.organization"
|
||||||
|
ng-change="toggleOrganization()"
|
||||||
|
value="false"/>
|
||||||
|
<label for="organization" translate>{{ 'members_new.user_is_an_organization' }}</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<ng-include src="'<%= asset_path 'shared/_member_form.html' %>'"></ng-include>
|
<ng-include src="'<%= asset_path 'shared/_member_form.html' %>'"></ng-include>
|
||||||
|
|
||||||
<ng-include src="'<%= asset_path 'admin/members/_form.html' %>'"></ng-include>
|
<ng-include src="'<%= asset_path 'admin/members/_form.html' %>'"></ng-include>
|
||||||
|
@ -53,8 +53,10 @@ module PDF
|
|||||||
# user/organization's information
|
# user/organization's information
|
||||||
if invoice&.user&.profile&.organization
|
if invoice&.user&.profile&.organization
|
||||||
name = invoice.user.profile.organization.name
|
name = invoice.user.profile.organization.name
|
||||||
|
full_name = "#{name} (#{invoice.user.profile.full_name})"
|
||||||
else
|
else
|
||||||
name = invoice.user.profile.full_name
|
name = invoice.user.profile.full_name
|
||||||
|
full_name = name
|
||||||
end
|
end
|
||||||
|
|
||||||
if invoice&.user&.profile&.organization&.address
|
if invoice&.user&.profile&.organization&.address
|
||||||
@ -66,6 +68,7 @@ module PDF
|
|||||||
end
|
end
|
||||||
|
|
||||||
text_box "<b>#{name}</b>\n#{invoice.user.email}\n#{address}", :at => [bounds.width - 130, bounds.top - 49], :width => 130, :align => :right, :inline_format => true
|
text_box "<b>#{name}</b>\n#{invoice.user.email}\n#{address}", :at => [bounds.width - 130, bounds.top - 49], :width => 130, :align => :right, :inline_format => true
|
||||||
|
name = full_name
|
||||||
|
|
||||||
# object
|
# object
|
||||||
move_down 25
|
move_down 25
|
||||||
@ -78,18 +81,18 @@ module PDF
|
|||||||
else
|
else
|
||||||
case invoice.invoiced_type
|
case invoice.invoiced_type
|
||||||
when 'Reservation'
|
when 'Reservation'
|
||||||
object = I18n.t('invoices.reservation_of_USER_on_DATE_at_TIME', USER:invoice.user.profile.full_name, DATE:I18n.l(invoice.invoiced.slots[0].start_at.to_date), TIME:I18n.l(invoice.invoiced.slots[0].start_at, format: :hour_minute))
|
object = I18n.t('invoices.reservation_of_USER_on_DATE_at_TIME', USER:name, DATE:I18n.l(invoice.invoiced.slots[0].start_at.to_date), TIME:I18n.l(invoice.invoiced.slots[0].start_at, format: :hour_minute))
|
||||||
invoice.invoice_items.each do |item|
|
invoice.invoice_items.each do |item|
|
||||||
if item.subscription_id
|
if item.subscription_id
|
||||||
subscription = Subscription.find item.subscription_id
|
subscription = Subscription.find item.subscription_id
|
||||||
object = "\n- #{object}\n- #{(invoice.is_a?(Avoir) ? I18n.t('invoices.cancellation')+' - ' : '') + subscription_verbose(subscription, invoice.user)}"
|
object = "\n- #{object}\n- #{(invoice.is_a?(Avoir) ? I18n.t('invoices.cancellation')+' - ' : '') + subscription_verbose(subscription, name)}"
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
when 'Subscription'
|
when 'Subscription'
|
||||||
object = subscription_verbose(invoice.invoiced, invoice.user)
|
object = subscription_verbose(invoice.invoiced, name)
|
||||||
when 'OfferDay'
|
when 'OfferDay'
|
||||||
object = offer_day_verbose(invoice.invoiced, invoice.user)
|
object = offer_day_verbose(invoice.invoiced, name)
|
||||||
else
|
else
|
||||||
puts "ERROR : specified invoiced type (#{invoice.invoiced_type}) is unknown"
|
puts "ERROR : specified invoiced type (#{invoice.invoiced_type}) is unknown"
|
||||||
end
|
end
|
||||||
@ -324,7 +327,7 @@ module PDF
|
|||||||
def subscription_verbose(subscription, user)
|
def subscription_verbose(subscription, user)
|
||||||
subscription_start_at = subscription.expired_at - subscription.plan.duration
|
subscription_start_at = subscription.expired_at - subscription.plan.duration
|
||||||
duration_verbose = I18n.t("duration.#{subscription.plan.interval}", count: subscription.plan.interval_count)
|
duration_verbose = I18n.t("duration.#{subscription.plan.interval}", count: subscription.plan.interval_count)
|
||||||
I18n.t('invoices.subscription_of_NAME_for_DURATION_starting_from_DATE', NAME: user.profile.full_name, DURATION: duration_verbose, DATE: I18n.l(subscription_start_at.to_date))
|
I18n.t('invoices.subscription_of_NAME_for_DURATION_starting_from_DATE', NAME: user, DURATION: duration_verbose, DATE: I18n.l(subscription_start_at.to_date))
|
||||||
end
|
end
|
||||||
|
|
||||||
def offer_day_verbose(offer_day, user)
|
def offer_day_verbose(offer_day, user)
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#encoding: UTF-8
|
#encoding: UTF-8
|
||||||
|
|
||||||
xml.instruct! :xml, version: '1.0'
|
xml.instruct! :xml, version: '1.0'
|
||||||
xml.rss version: '2.0' do
|
xml.rss version: '2.0', 'xmlns:xCal' => 'urn:ietf:params:xml:ns:xcal' do
|
||||||
xml.channel do
|
xml.channel do
|
||||||
xml.title "#{t('app.public.events_list.the_fablab_s_events')} - #{@fab_name}"
|
xml.title "#{t('app.public.events_list.the_fablab_s_events')} - #{@fab_name}"
|
||||||
xml.description t('app.public.home.fablab_s_next_events')
|
xml.description t('app.public.home.fablab_s_next_events')
|
||||||
@ -12,10 +12,18 @@ xml.rss version: '2.0' do
|
|||||||
@events.each do |event|
|
@events.each do |event|
|
||||||
xml.item do
|
xml.item do
|
||||||
xml.guid event.id
|
xml.guid event.id
|
||||||
xml.pubDate event.created_at.strftime('%F %T')
|
xml.pubDate event.created_at.strftime('%FT%T%:z')
|
||||||
xml.title event.name
|
xml.title event.name
|
||||||
xml.link root_url + '#!/events/' + event.id.to_s
|
xml.link root_url + '#!/events/' + event.id.to_s
|
||||||
xml.description event.description
|
xml.description event.description
|
||||||
|
xml.xCal :dtstart do
|
||||||
|
xml.text! event.availability.start_at.strftime('%FT%T%:z')
|
||||||
|
end
|
||||||
|
xml.xCal :dtend do
|
||||||
|
xml.text! event.availability.end_at.strftime('%FT%T%:z')
|
||||||
|
end
|
||||||
|
xml.enclosure url: root_url + event.event_image.attachment.large.url, length: event.event_image.attachment.large.size, type: event.event_image.attachment.content_type if event.event_image
|
||||||
|
xml.category event.category.name
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -15,8 +15,9 @@ xml.rss version: '2.0' do
|
|||||||
xml.pubDate project.created_at.strftime('%F %T')
|
xml.pubDate project.created_at.strftime('%F %T')
|
||||||
xml.title project.name
|
xml.title project.name
|
||||||
xml.link root_url + '#!/projects/' + project.slug
|
xml.link root_url + '#!/projects/' + project.slug
|
||||||
xml.author project.author.first_name
|
xml.author project.author.profile.full_name
|
||||||
xml.description project.description
|
xml.description project.description
|
||||||
|
xml.enclosure url: root_url + project.project_image.attachment.large.url, length: project.project_image.attachment.large.size, type: project.project_image.attachment.content_type if project.project_image
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -410,7 +410,9 @@ en:
|
|||||||
|
|
||||||
members_new:
|
members_new:
|
||||||
# add a member
|
# add a member
|
||||||
|
members_new:
|
||||||
add_a_member: "Add a member"
|
add_a_member: "Add a member"
|
||||||
|
user_is_an_organization: "User is an organization"
|
||||||
|
|
||||||
members_edit:
|
members_edit:
|
||||||
# edit a member
|
# edit a member
|
||||||
|
@ -410,7 +410,9 @@ fr:
|
|||||||
|
|
||||||
members_new:
|
members_new:
|
||||||
# ajouter un membre
|
# ajouter un membre
|
||||||
|
members_new:
|
||||||
add_a_member: "Ajouter un membre"
|
add_a_member: "Ajouter un membre"
|
||||||
|
user_is_an_organization: "L'utilisateur est une structure"
|
||||||
|
|
||||||
members_edit:
|
members_edit:
|
||||||
# modifier un membre
|
# modifier un membre
|
||||||
|
@ -332,7 +332,7 @@ OR
|
|||||||
Copy the previously customized `nginx.conf.example` as `/home/core/fabmanager/config/nginx/fabmanager.conf` if you do not want ssl support (not recommended !).
|
Copy the previously customized `nginx.conf.example` as `/home/core/fabmanager/config/nginx/fabmanager.conf` if you do not want ssl support (not recommended !).
|
||||||
|
|
||||||
|
|
||||||
#### copy docker-compose.yml to /home/core/
|
#### copy docker-compose.yml to /home/core/fabmanager
|
||||||
|
|
||||||
#### pull images
|
#### pull images
|
||||||
|
|
||||||
@ -340,9 +340,11 @@ Copy the previously customized `nginx.conf.example` as `/home/core/fabmanager/co
|
|||||||
|
|
||||||
#### create/migrate/seed db
|
#### create/migrate/seed db
|
||||||
|
|
||||||
`docker-compose run --rm fabmanager bundle exec rake db:create`
|
```bash
|
||||||
`docker-compose run --rm fabmanager bundle exec rake db:migrate`
|
docker-compose run --rm fabmanager bundle exec rake db:create
|
||||||
`docker-compose run --rm fabmanager bundle exec rake db:seed`
|
docker-compose run --rm fabmanager bundle exec rake db:migrate
|
||||||
|
docker-compose run --rm fabmanager bundle exec rake db:seed
|
||||||
|
```
|
||||||
|
|
||||||
#### build assets
|
#### build assets
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user