diff --git a/components/Nav.vue b/components/Nav.vue
index 2bf70267..ef459187 100644
--- a/components/Nav.vue
+++ b/components/Nav.vue
@@ -16,7 +16,7 @@
el-popover(
placement="bottom"
trigger="click")
- Search(past-filter)
+ Search(past-filter recurrent-filter)
el-menu-item(slot='reference' :title="$t('common.search')" icon='el-share-button')
v-icon(color='lightblue' name='search')
el-badge(v-if='filters.tags.length+filters.places.length>0' is-dot type='warning')
diff --git a/components/Search.vue b/components/Search.vue
index 64466774..76400d0d 100644
--- a/components/Search.vue
+++ b/components/Search.vue
@@ -8,11 +8,18 @@
//- )
el-switch.mt-1.mb-1.ml-2.d-block(
v-if='pastFilter'
- inactive-text='futuri'
+ inactive-text=''
+ active-text='anche appuntamenti fissi'
+ inactive-color='lightgreen'
+ v-model='showRecurrent'
+ )
+ el-switch.mt-1.mb-1.ml-2.d-block(
+ v-if='recurrentFilter'
+ inactive-text='solo futuri'
active-text='anche passati'
inactive-color='lightgreen'
v-model='showPast'
- )
+ )
no-ssr
el-select.search(v-model='filter'
multiple
@@ -33,24 +40,25 @@ export default {
},
name :'Search',
props: {
- pastFilter: Boolean
+ pastFilter: Boolean,
+ recurrentFilter: Boolean
},
- methods: mapActions(['setSearchPlaces', 'setSearchTags', 'showPastEvents']),
+ methods: mapActions(['setSearchPlaces', 'setSearchTags', 'showPastEvents', 'showRecurrentEvents']),
computed: {
- ...mapState(['tags', 'places', 'filters', 'show_past_events']),
+ ...mapState(['tags', 'places', 'filters']),
// TOFIX: optimize
keywords () {
const tags = this.tags.map( t => ({ value: 't' + t.tag, label: t.tag, weigth: t.weigth }))
const places = this.places.map( p => ({ value: 'p' + p.id, label: p.name, weigth: p.weigth }))
return tags.concat(places).sort((a, b) => b.weigth-a.weigth)
},
- showPast : {
- set (value) {
- this.showPastEvents(value)
- },
- get () {
- return this.filters.show_past_events
- }
+ showPast: {
+ set (value) { this.showPastEvents(value) },
+ get () { return this.filters.show_past_events }
+ },
+ showRecurrent: {
+ set (value) { this.showRecurrentEvents(value) },
+ get () { return this.filters.show_recurrent_events }
},
filter: {
set (filters) {
diff --git a/docs/.gitignore b/docs/.gitignore
new file mode 100644
index 00000000..45c15053
--- /dev/null
+++ b/docs/.gitignore
@@ -0,0 +1,3 @@
+_site
+.sass-cache
+.jekyll-metadata
diff --git a/docs/404.html b/docs/404.html
new file mode 100644
index 00000000..c472b4ea
--- /dev/null
+++ b/docs/404.html
@@ -0,0 +1,24 @@
+---
+layout: default
+---
+
+
+
+
+
404
+
+
Page not found :(
+
The requested page could not be found.
+
diff --git a/docs/Gemfile b/docs/Gemfile
new file mode 100644
index 00000000..0eee28f3
--- /dev/null
+++ b/docs/Gemfile
@@ -0,0 +1,36 @@
+source "https://rubygems.org"
+
+# Hello! This is where you manage which Jekyll version is used to run.
+# When you want to use a different version, change it below, save the
+# file and run `bundle install`. Run Jekyll with `bundle exec`, like so:
+#
+# bundle exec jekyll serve
+#
+# This will help ensure the proper Jekyll version is running.
+# Happy Jekylling!
+gem "jekyll", "~> 3.8.6"
+
+# This is the default theme for new Jekyll sites. You may change this to anything you like.
+#gem "minima", "~> 2.0"
+gem "just-the-docs"
+gem "jemoji"
+
+# If you want to use GitHub Pages, remove the "gem "jekyll"" above and
+# uncomment the line below. To upgrade, run `bundle update github-pages`.
+# gem "github-pages", group: :jekyll_plugins
+
+# If you have any plugins, put them here!
+group :jekyll_plugins do
+ gem "jekyll-feed", "~> 0.6"
+end
+
+# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
+# and associated library.
+install_if -> { RUBY_PLATFORM =~ %r!mingw|mswin|java! } do
+ gem "tzinfo", "~> 1.2"
+ gem "tzinfo-data"
+end
+
+# Performance-booster for watching directories on Windows
+gem "wdm", "~> 0.1.0", :install_if => Gem.win_platform?
+
diff --git a/docs/Gemfile.lock b/docs/Gemfile.lock
new file mode 100644
index 00000000..e0b1ecac
--- /dev/null
+++ b/docs/Gemfile.lock
@@ -0,0 +1,101 @@
+GEM
+ remote: https://rubygems.org/
+ specs:
+ activesupport (5.2.3)
+ concurrent-ruby (~> 1.0, >= 1.0.2)
+ i18n (>= 0.7, < 2)
+ minitest (~> 5.1)
+ tzinfo (~> 1.1)
+ addressable (2.6.0)
+ public_suffix (>= 2.0.2, < 4.0)
+ colorator (1.1.0)
+ concurrent-ruby (1.1.5)
+ em-websocket (0.5.1)
+ eventmachine (>= 0.12.9)
+ http_parser.rb (~> 0.6.0)
+ eventmachine (1.2.7)
+ ffi (1.11.1)
+ forwardable-extended (2.6.0)
+ gemoji (3.0.1)
+ html-pipeline (2.11.0)
+ activesupport (>= 2)
+ nokogiri (>= 1.4)
+ http_parser.rb (0.6.0)
+ i18n (0.9.5)
+ concurrent-ruby (~> 1.0)
+ jekyll (3.8.6)
+ addressable (~> 2.4)
+ colorator (~> 1.0)
+ em-websocket (~> 0.5)
+ i18n (~> 0.7)
+ jekyll-sass-converter (~> 1.0)
+ jekyll-watch (~> 2.0)
+ kramdown (~> 1.14)
+ liquid (~> 4.0)
+ mercenary (~> 0.3.3)
+ pathutil (~> 0.9)
+ rouge (>= 1.7, < 4)
+ safe_yaml (~> 1.0)
+ jekyll-feed (0.12.1)
+ jekyll (>= 3.7, < 5.0)
+ jekyll-sass-converter (1.5.2)
+ sass (~> 3.4)
+ jekyll-seo-tag (2.6.1)
+ jekyll (>= 3.3, < 5.0)
+ jekyll-watch (2.2.1)
+ listen (~> 3.0)
+ jemoji (0.11.0)
+ gemoji (~> 3.0)
+ html-pipeline (~> 2.2)
+ jekyll (>= 3.0, < 5.0)
+ just-the-docs (0.2.5)
+ jekyll (~> 3.8.5)
+ jekyll-seo-tag (~> 2.0)
+ rake (~> 12.3.1)
+ kramdown (1.17.0)
+ liquid (4.0.3)
+ listen (3.1.5)
+ rb-fsevent (~> 0.9, >= 0.9.4)
+ rb-inotify (~> 0.9, >= 0.9.7)
+ ruby_dep (~> 1.2)
+ mercenary (0.3.6)
+ mini_portile2 (2.4.0)
+ minitest (5.11.3)
+ nokogiri (1.10.3)
+ mini_portile2 (~> 2.4.0)
+ pathutil (0.16.2)
+ forwardable-extended (~> 2.6)
+ public_suffix (3.1.1)
+ rake (12.3.1)
+ rb-fsevent (0.10.3)
+ rb-inotify (0.10.0)
+ ffi (~> 1.0)
+ rouge (3.6.0)
+ ruby_dep (1.5.0)
+ safe_yaml (1.0.5)
+ sass (3.7.4)
+ sass-listen (~> 4.0.0)
+ sass-listen (4.0.0)
+ rb-fsevent (~> 0.9, >= 0.9.4)
+ rb-inotify (~> 0.9, >= 0.9.7)
+ thread_safe (0.3.6)
+ tzinfo (1.2.5)
+ thread_safe (~> 0.1)
+ tzinfo-data (1.2019.2)
+ tzinfo (>= 1.0.0)
+ wdm (0.1.1)
+
+PLATFORMS
+ ruby
+
+DEPENDENCIES
+ jekyll (~> 3.8.6)
+ jekyll-feed (~> 0.6)
+ jemoji
+ just-the-docs
+ tzinfo (~> 1.2)
+ tzinfo-data
+ wdm (~> 0.1.0)
+
+BUNDLED WITH
+ 2.0.2
diff --git a/docs/_config.yml b/docs/_config.yml
new file mode 100644
index 00000000..206fe112
--- /dev/null
+++ b/docs/_config.yml
@@ -0,0 +1,50 @@
+# Welcome to Jekyll!
+#
+# This config file is meant for settings that affect your whole blog, values
+# which you are expected to set up once and rarely edit after that. If you find
+# yourself editing this file very often, consider using Jekyll's data files
+# feature for the data you need to update frequently.
+#
+# For technical reasons, this file is *NOT* reloaded automatically when you use
+# 'bundle exec jekyll serve'. If you change this file, please restart the server process.
+
+# Site settings
+# These are used to personalize your new site. If you look in the HTML files,
+# you will see them accessed via {{ site.title }}, {{ site.email }}, and so on.
+# You can create any custom variable you would like, and they will be accessible
+# in the templates via {{ site.myvariable }}.
+title: Gancio
+email: gancio@cisti.org
+description: >- # this means to ignore newlines until "baseurl:"
+ A shared agenda for local communities
+baseurl: "" # the subpath of your site, e.g. /blog
+url: "" # the base hostname & protocol for your site, e.g. http://example.com
+#twitter_username: jekyllrb
+#github_username: jekyll
+
+# Build settings
+markdown: kramdown
+theme: "just-the-docs"
+plugins:
+ - jekyll-feed
+ - jemoji
+
+
+search_enabled: true
+
+aux_links:
+ "Source":
+ - https://git.lattuga.net/cisti/gancio
+
+
+#Exclude from processing.
+# The following items will not be processed, by default. Create a custom list
+# to override the default setting.
+# exclude:
+# - Gemfile
+# - Gemfile.lock
+# - node_modules
+# - vendor/bundle/
+# - vendor/cache/
+# - vendor/gems/
+# - vendor/ruby/
diff --git a/docs/admin.md b/docs/admin.md
new file mode 100644
index 00000000..798f72c2
--- /dev/null
+++ b/docs/admin.md
@@ -0,0 +1,19 @@
+---
+layout: default
+title: Admin
+permalink: /admin
+nav_order: 5
+---
+
+
+# Admin
+{: .no_toc }
+
+1. TOC
+{:toc}
+
+## Basics
+
+## Enable registration
+## Confirm registration
+## Confirm event
\ No newline at end of file
diff --git a/docs/assets/favicon.ico b/docs/assets/favicon.ico
new file mode 100644
index 00000000..36b55d4a
Binary files /dev/null and b/docs/assets/favicon.ico differ
diff --git a/docs/contribute.md b/docs/contribute.md
new file mode 100644
index 00000000..17785f9f
--- /dev/null
+++ b/docs/contribute.md
@@ -0,0 +1,18 @@
+---
+layout: default
+title: Contribute
+permalink: /contribute
+nav_order: 6
+---
+# Contribute
+{: .no_toc }
+
+
+1. TOC
+{:toc}
+
+## Code
+## Translate
+## Design
+## Documentation
+## Share
\ No newline at end of file
diff --git a/docs/dev.md b/docs/dev.md
new file mode 100644
index 00000000..6eb4fa54
--- /dev/null
+++ b/docs/dev.md
@@ -0,0 +1,33 @@
+---
+layout: default
+title: Develop
+permalink: /dev
+nav_order: 5
+---
+
+### Development Stack
+
+**Gancio** is built with following technologies:
+
+- [Nuxt.js](https://nuxtjs.org/)
+- Vue.js
+- Express
+- Sequelize
+- Element.ui
+
+### Testing on your own machine
+
+2. Download source
+```bash
+git clone https://git.lattuga.net/cisti/gancio
+```
+
+3. Install dependencies
+```bash
+yarn
+```
+
+4. Hacking
+```bash
+yarn dev
+```
diff --git a/docs/index.md b/docs/index.md
new file mode 100644
index 00000000..e44177ef
--- /dev/null
+++ b/docs/index.md
@@ -0,0 +1,26 @@
+---
+layout: default
+title: Home
+nav_order: 1
+description: "Gancio is a shared agenda for local communities."
+permalink: /
+---
+
+# Gancio
+{: .fs-9 }
+
+A shared agenda for local communities.
+{: .fs-6 }
+
+[Get started now](/setup){: .btn .btn-primary .fs-5 .mb-4 .mb-md-0 .mr-2 } [Demo](https://gancio.cisti.org){: .btn .btn-green .fs-5 .mb-4 .mb-md-0 }
+[Source](https://git.lattuga.net/cisti/gancio){: .btn .fs-5 }
+
+
+
+### About the project
+
+Gancio is made with :heart: by [hacklab underscore](https://autistici.org/underscore)
+
+### License
+
+Gancio is distributed by an [AGPL-3.0 Licence](https://www.gnu.org/licenses/agpl-3.0.en.html).
diff --git a/docs/settings.md b/docs/settings.md
new file mode 100644
index 00000000..246668a3
--- /dev/null
+++ b/docs/settings.md
@@ -0,0 +1,43 @@
+---
+layout: default
+title: Settings
+permalink: /settings
+nav_order: 3
+---
+
+# Settings
+{: .no_toc }
+
+1. TOC
+{:toc}
+
+## Default settings
+```json
+{
+ "title": "Gancio",
+ "description": "A shared agenda for local communities",
+ "baseurl": "http://localhost:13120",
+ "server": {
+ "host": "0.0.0.0",
+ "port": 13120
+ },
+ "db": {
+ "dialect": "sqlite",
+ "storage": "/tmp/db.sqlite"
+ },
+ "upload_path": "./",
+ "smtp": {
+ "auth": {
+ "user": "",
+ "pass": ""
+ },
+ "secure": true,
+ "host": ""
+ },
+ "admin": {
+ "email": "",
+ "password": ""
+ },
+ "secret": "notsosecret"
+}
+```
\ No newline at end of file
diff --git a/docs/setup/classic.md b/docs/setup/classic.md
new file mode 100644
index 00000000..ff07913a
--- /dev/null
+++ b/docs/setup/classic.md
@@ -0,0 +1,34 @@
+---
+layout: default
+title: Classic
+permalink: /setup/classic
+parent: Setup
+---
+
+## Classic setup
+
+1. Install Node.js
+```bash
+curl -sL https://deb.nodesource.com/setup_12.x | bash -
+apt-get install -y nodejs
+```
+[source](https://github.com/nodesource/distributions/blob/master/README.md)
+2. Install Gancio
+```bash
+npm install --global gancio
+```
+
+3. Setup
+```bash
+gancio setup
+```
+
+4. Start
+```bash
+gancio start
+```
+5. Enjoy :tada:
+Point your web browser to [http://localhost:3000](http://localhost:3000)
+
+
+
diff --git a/docs/setup/docker.md b/docs/setup/docker.md
new file mode 100644
index 00000000..ff6036b3
--- /dev/null
+++ b/docs/setup/docker.md
@@ -0,0 +1,10 @@
+---
+layout: default
+title: Docker
+permalink: /setup/docker
+parent: Setup
+---
+
+## Install with docker
+
+
diff --git a/docs/setup/setup.md b/docs/setup/setup.md
new file mode 100644
index 00000000..ea91f09b
--- /dev/null
+++ b/docs/setup/setup.md
@@ -0,0 +1,12 @@
+---
+layout: default
+title: Setup
+permalink: /setup
+has_children: true
+nav_order: 2
+---
+
+# Setup
+
+You would setup **Gancio** for different scenario
+{: .fs-6 }
\ No newline at end of file
diff --git a/docs/usage.md b/docs/usage.md
new file mode 100644
index 00000000..9da6f3db
--- /dev/null
+++ b/docs/usage.md
@@ -0,0 +1,14 @@
+---
+layout: default
+title: Usage
+permalink: /usage
+nav_order: 4
+---
+
+# Usage
+
+
+## Add event
+### Normal
+### Multidate
+### Recurrent
\ No newline at end of file
diff --git a/locales/it.js b/locales/it.js
index f4dfe16e..b7fc1bce 100644
--- a/locales/it.js
+++ b/locales/it.js
@@ -103,10 +103,7 @@ const it = {
tratta di un evento adatto a questo spazio, delegando questa scelta. Inoltre non sarà possibile modificarlo.
Puoi invece fare il login o registrarti,
altrimenti vai avanti e riceverai una risposta il prima possibile. `,
- multidate_description: 'tanti giorni',
- date_description: `Quand'è il gancio?`,
- dates_description: 'Che giorni?',
- same_day: 'stesso giorno',
+ same_day: 'Stesso giorno',
what_description: 'Nome evento',
description_description: 'Descrizione, dajene di copia/incolla',
tag_description: 'Tag...',
@@ -118,7 +115,21 @@ const it = {
where_description: `Dov'è il gancio? Se il posto non è presente, scrivilo e premi invio. `,
confirmed: 'Evento confermato',
not_found: 'Evento non trovato',
- remove_confirmation: `Sicura di voler eliminare questo evento?`
+ remove_confirmation: `Sicura di voler eliminare questo evento?`,
+ recurrent: `Ricorrente`,
+ recurrent_description: 'Scegli la frequenza e seleziona i giorni',
+ multidate_description: 'Un festival o una tre giorni? Scegli quando comincia e quando finisce.',
+ multidate: 'Più giorni',
+ normal: 'Normale',
+ normal_description: 'Scegli il giorno.',
+ recurrent_1w_days: 'Ogni {days}',
+ recurrent_2w_days: 'Un {days} ogni due',
+ recurrent_1m_days: '|Il giorno {days} di ogni mese|I giorni {days} di ogni mese',
+ recurrent_2m_days: '|Il giorno {days} ogni due mesi|I giorni {days} ogni due mesi',
+ recurrent_1m_ordinal: 'Il {n} {days} di ogni mese',
+ recurrent_2m_ordinal: 'Il {n} {days} un mese sì e uno no',
+ due: 'alle',
+ from: 'Dalle'
},
admin: {
@@ -132,7 +143,9 @@ const it = {
user_remove_ok: 'Utente eliminato',
user_create_ok: 'Utente creato',
allow_registration_description : 'Vuoi abilitare la registrazione?',
- allow_anon_event: 'Si possono inserire eventi anonimi (previa conferma)?'
+ allow_anon_event: 'Si possono inserire eventi anonimi (previa conferma)?',
+ allow_comments: 'Abilita commenti',
+ allow_recurrent_event: 'Abilita eventi ricorrenti'
},
auth: {
@@ -152,6 +165,15 @@ const it = {
register_error: 'Errore nella registrazione'
},
+ ordinal: {
+ 1: 'primo',
+ 2: 'secondo',
+ 3: 'terzo',
+ 4: 'quarto',
+ 5: 'quinto',
+ [-1]: 'ultimo',
+ },
+
about: `
Gancio e' un progetto dell'underscore hacklab e uno dei
diff --git a/pages/add/_edit.vue b/pages/add/_edit.vue
index 53f92375..5d51358b 100644
--- a/pages/add/_edit.vue
+++ b/pages/add/_edit.vue
@@ -14,6 +14,23 @@
p(v-html="$t('event.anon_description')")
el-button.float-right(@click='next' :disabled='!couldProceed') {{$t('common.next')}}
+ //- WHAT
+ el-tab-pane
+ span(slot='label') {{$t('common.what')}}
+ span {{$t('event.what_description')}}
+ el-input.mb-3(v-model='event.title' ref='title')
+ span {{$t('event.description_description')}}
+ el-input.mb-3(v-model='event.description' type='textarea' :rows='9')
+ span {{$t('event.tag_description')}}
+ br
+ el-select(v-model='event.tags' multiple filterable allow-create
+ default-first-option placeholder='Tag')
+ el-option(v-for='tag in tags' :key='tag'
+ :label='tag' :value='tag')
+
+ el-button.float-right(@click.native='next' :disabled='!couldProceed') {{$t('common.next')}}
+
+
//- WHERE
el-tab-pane
span(slot='label') {{$t('common.where')}}
@@ -34,49 +51,49 @@
//- WHEN
el-tab-pane
span(slot='label') {{$t('common.when')}}
- span {{event.multidate ? $t('event.dates_description') : $t('event.date_description')}}
- el-switch.float-right(v-model='event.multidate' :active-text="$t('event.multidate_description')")
- //- el-switch.float-right(v-model='event.recurrent' :active-text="$t('event.recurrent_description')")
- v-date-picker.mb-3(
- :mode='event.multidate ? "range" : "single"'
+ .text-center
+ el-radio-group(v-model="event.type")
+ el-radio-button(label="normal") {{$t('event.normal')}}
+ el-radio-button(label="multidate") {{$t('event.multidate')}}
+ el-radio-button(label="recurrent") {{$t('event.recurrent')}}
+ br
+ span {{$t(`event.${event.type}_description`)}}
+ el-select.ml-2(v-if='event.type==="recurrent"' v-model='event.rec_frequency' placeholder='Frequenza')
+ el-option(label='Tutti i giorni' value='1d' key='1d')
+ el-option(label='Ogni settimana' value='1w' key='1w')
+ el-option(label='Ogni due settimane' value='2w' key='2w')
+ el-option(label='Ogni mese' value='1m' key='1m')
+ el-option(label='Ogni due mesi' value='2m' key='2m')
+
+ v-date-picker.mb-2.mt-3(
+ :mode='event.type === "multidate" ? "range" : event.type === "recurrent" ? "multiple" : "single"'
:attributes='attributes'
v-model='date'
:locale='$i18n.locale'
:from-page.sync='page'
is-inline
is-expanded
- :min-date='new Date()'
+ :min-date='event.type !== "recurrent" && new Date()'
)
- el-row
- el-col(:span='12')
- div {{$t('event.time_start_description')}}
- el-time-select.mb-3(ref='time_start'
+ div.text-center.mb-2(v-if='event.type === "recurrent"')
+ span(v-if='event.rec_frequency !== "1m" && event.rec_frequency !== "2m"') {{whenPatterns}}
+ el-radio-group(v-else v-model='event.rec_detail')
+ el-radio-button(v-for='whenPattern in whenPatterns' :label='whenPattern.label' :key='whenPatterns.key')
+ span {{whenPattern.label}}
+
+ el-form.text-center(inline)
+ el-form-item(:label="$t('event.from')")
+ el-time-select.mr-2(ref='time_start'
v-model="time.start"
:picker-options="{ start: '00:00', step: '00:30', end: '24:00'}")
- div {{$t('event.time_end_description')}}
+ el-form-item(:label="$t('event.due')")
el-time-select(v-model='time.end'
:picker-options="{start: '00:00', step: '00:30', end: '24:00'}")
- el-col(:span='12')
- List(:events='todayEvents' :title='$t("event.same_day")')
- el-button.float-right(@click='next' :disabled='!couldProceed') {{$t('common.next')}}
-
- //- WHAT
- el-tab-pane
- span(slot='label') {{$t('common.what')}}
- span {{$t('event.what_description')}}
- el-input.mb-3(v-model='event.title' ref='title')
- span {{$t('event.description_description')}}
- el-input.mb-3(v-model='event.description' type='textarea' :rows='9')
- span {{$t('event.tag_description')}}
- br
- el-select(v-model='event.tags' multiple filterable allow-create
- default-first-option placeholder='Tag')
- el-option(v-for='tag in tags' :key='tag'
- :label='tag' :value='tag')
-
- el-button.float-right(@click.native='next' :disabled='!couldProceed') {{$t('common.next')}}
+
+ List(v-if='event.type==="normal"' :events='todayEvents' :title='$t("event.same_day")')
+ el-button.float-right(@click='next' type='succes' :disabled='!couldProceed') {{$t('common.next')}}
el-tab-pane
span(slot='label') {{$t('common.media')}}
@@ -96,6 +113,8 @@