Merge pull request #227 from coopdevs/develop

Release september 2016
This commit is contained in:
Enrico Stano
2016-09-16 14:09:47 +02:00
committed by GitHub
152 changed files with 2689 additions and 1853 deletions
+2
View File
@@ -7,5 +7,7 @@ rvm:
env: DATABASE_URL=postgres://postgres@localhost/timeoverflow_test
before_script:
- bundle exec rake db:setup
# allow elasticsearch to be ready - https://docs.travis-ci.com/user/database-setup/#ElasticSearch
- sleep 10
services:
- elasticsearch
-20
View File
@@ -1,20 +0,0 @@
timeoverflow:
ruby_version: 2.2.2
environment: production # RAILS_ENV
monitoring_email: saverio.trioni@gmail.com
domains:
- timeoverflow.shellyapp.com
- www.timeoverflow.org
servers:
app1:
size: small
thin: 4
# delayed_job: 1
# sidekiq: 1
# clockwork: on
whenever: on
# elasticsearch: on
databases:
- postgresql
# - mongodb
# - redis
+1 -3
View File
@@ -1,4 +1,5 @@
source 'https://rubygems.org'
ruby '2.3.0'
gem 'rails', '4.2.5.2'
gem 'rails-i18n'
@@ -11,7 +12,6 @@ gem 'pundit'
gem 'pg', '0.17.1'
gem 'hstore_translate'
gem 'dalli'
gem 'slim-rails' # much better than haml
gem 'devise', '3.5.6'
gem "http_accept_language"
gem 'thin'
@@ -19,13 +19,11 @@ gem 'unicorn'
gem 'foreman'
gem 'dotenv-rails'
gem 'kaminari'
gem "haml-rails"
gem "simple_form", ">= 3.0.0"
gem "awesome_print"
gem 'memcachier'
gem 'rollbar', '2.8.3'
gem 'travis-lint'
gem "shelly-dependencies"
gem 'whenever', :require => false
gem 'prawn'
gem 'prawn-table'
-33
View File
@@ -153,27 +153,13 @@ GEM
formtastic_i18n (0.1.1)
globalid (0.3.6)
activesupport (>= 4.1.0)
haml (4.1.0.beta.1)
tilt
haml-rails (0.6.0)
actionpack (>= 4.0.1)
activesupport (>= 4.0.1)
haml (>= 3.1, < 5.0)
html2haml (>= 1.0.1)
railties (>= 4.0.1)
has_scope (0.6.0)
actionpack (>= 3.2, < 5)
activesupport (>= 3.2, < 5)
hashie (3.4.1)
high_voltage (2.1.0)
hpricot (0.8.6)
hstore_translate (1.0.0)
activerecord (>= 3.1.0)
html2haml (1.0.1)
erubis (~> 2.7.0)
haml (>= 4.0.0.rc.1)
hpricot (~> 0.8.6)
ruby_parser (~> 3.1.1)
http_accept_language (2.0.2)
i18n (0.7.0)
inherited_resources (1.6.0)
@@ -298,8 +284,6 @@ GEM
rainbow (>= 1.99.1, < 3.0)
ruby-progressbar (~> 1.4)
ruby-progressbar (1.7.1)
ruby_parser (3.1.3)
sexp_processor (~> 4.1)
sass (3.4.21)
sass-rails (5.0.4)
railties (>= 4.0.0, < 5.0)
@@ -309,10 +293,6 @@ GEM
tilt (>= 1.1, < 3)
select2-rails (4.0.1)
thor (~> 0.14)
sexp_processor (4.4.4)
shelly-dependencies (0.2.4)
rake
thin
shoulda (3.5.0)
shoulda-context (~> 1.0, >= 1.0.1)
shoulda-matchers (>= 1.4.1, < 3.0)
@@ -322,15 +302,6 @@ GEM
simple_form (3.1.0)
actionpack (~> 4.0)
activemodel (~> 4.0)
slim (3.0.3)
temple (~> 0.7.3)
tilt (>= 1.3.3, < 2.1)
slim-rails (3.0.1)
actionmailer (>= 3.1, < 5.0)
actionpack (>= 3.1, < 5.0)
activesupport (>= 3.1, < 5.0)
railties (>= 3.1, < 5.0)
slim (~> 3.0)
sprockets (3.5.2)
concurrent-ruby (~> 1.0)
rack (> 1, < 3)
@@ -341,7 +312,6 @@ GEM
sshkit (1.8.1)
net-scp (>= 1.1.2)
net-ssh (>= 2.8.0)
temple (0.7.5)
thin (1.6.3)
daemons (~> 1.0, >= 1.0.9)
eventmachine (~> 1.0)
@@ -398,7 +368,6 @@ DEPENDENCIES
fabrication
faker
foreman
haml-rails
has_scope
high_voltage (~> 2.1.0)
hstore_translate
@@ -423,10 +392,8 @@ DEPENDENCIES
rubocop
sass-rails (~> 5.0.1)
select2-rails
shelly-dependencies
shoulda (>= 3.5)
simple_form (>= 3.0.0)
slim-rails
thin
travis-lint
uglifier (= 2.7.2)
+8 -8
View File
@@ -4,9 +4,7 @@
[![Code Climate](https://codeclimate.com/github/timeoverflow/timeoverflow/badges/gpa.svg)](https://codeclimate.com/github/timeoverflow/timeoverflow)
[![Dependencies](https://gemnasium.com/coopdevs/timeoverflow.svg)](https://gemnasium.com/coopdevs/timeoverflow)
:bank: :hourglass: Sistema de Banco de Tiempo.
Mira la nueva página de TimeOverflow: <http://coopdevs.github.io/timeoverflow/>
:bank: :hourglass: Sistema de gestión de Banco de Tiempo. [Saber más sobre Bancos de Tiempo](http://www.bdtonline.org/)
TimeOverflow es un software desarrollado de manera altruista para ofrecer un sistema que facilite la interacción
de los miembros y la gestión de los Bancos de Tiempo. El modelo sobre el que se trabaja está guiado por las necesidades de los Bancos de Tiempo
@@ -15,7 +13,7 @@ con tres niveles de privilegios: superadmin, admin (solo gestiona un Banco) y mi
TimeOverflow está dividido en 2 grandes bloques:
* **Sistema de gestión**
* **Sistema de gestión para los administradores**
* **Red social y banca on-line para los usuarios**
> **NOTA** Un Banco de Tiempo físico puede funcionar solo con el bloque de gestión, podría ocurrir, por ejemplo, que la inmensa mayoria de sus miembros no usen Internet y podrían querer funcionar solo con listados, cheques y una oficina de gestión.
@@ -36,13 +34,15 @@ así como poder publicar anuncios de ofertas/demandas explicados en detalle.
Por otro lado los miembros pueden pagarse los servicios de manera virtual para ahorrarse el paso por la oficina del Banco
de Tiempo y también tienen la posibilidad de consultar el extracto de su cuenta.
## Notas para desarrollo
# Contribuciones
Únete al equipo de colaboradores!! Gestionamos las tareas en Redbooth.com
## Únete al equipo de colaboradores!!
Si quieres probar la plataforma en local, necesitas PostgreSQL y ruby en sus últimas versiones.
Entra en nuestro Discourse y saludanos ;) [community.coopdevs.org](http://community.coopdevs.org/)
Para más información visita la guia para empezar a desarrollar para timeoverflow en https://github.com/coopdevs/timeoverflow/wiki/Getting-started
Los viernes nos encuentras en Freenode IRC [#coopdevs](https://webchat.freenode.net/?channels=coopdevs)
Visita [la guia para empezar a desarrollar para timeoverflow](https://github.com/coopdevs/timeoverflow/wiki/Getting-started)
## License
-4
View File
@@ -39,10 +39,6 @@ angular.module('timeoverflow').controller 'UserListCtrl', ["$scope", "$modal", "
# override this in a view where the organizations are needed
angular.module('timeoverflow').value 'Organizations', []
angular.module('timeoverflow').controller 'OrganizationListCtrl', ["$scope", "Organizations", ($scope, Organizations) ->
$scope.organizations = Organizations
]
angular.module('timeoverflow').filter 'timeBalance', ->
(seconds) ->
if seconds isnt 0
+21 -2
View File
@@ -7,6 +7,11 @@ $navs-bg-color: #080808;
$white: #ffffff;
$border: #e1e8ed;
[ng-cloak],
.ng-cloak {
visibility: hidden !important;
}
body[data-action="devise/sessions-new"], body[data-action="devise/sessions-create"] {
background: image-url('red.jpg') no-repeat center center fixed;
background-size: cover;
@@ -45,8 +50,13 @@ body[data-action="devise/sessions-new"], body[data-action="devise/sessions-creat
}
.post-description {
white-space: pre-line;
.break-word {
word-wrap: break-word;
}
.post-description img {
float: left;
max-width: 60%;
}
#new_transfer {
@@ -120,6 +130,10 @@ table.users {
margin-bottom: 20px;
margin-top: 0;
}
img {
max-width: 100%;
}
}
}
@@ -212,5 +226,10 @@ label[required]::after{
.navbar-form {
padding: 0;
background-color: transparent;
}
form .checkbox input[type="checkbox"] {
margin-left: 5px;
position: relative;
}
+9
View File
@@ -58,6 +58,15 @@ module ApplicationHelper
html.html_safe
end
# Use as <%= markdown content %> or <%= m content %>
# Content can be nil, in that case
# it will be the same as an empty string.
def markdown(content)
RDiscount.new(content || ''.freeze).to_html.html_safe
end
alias m markdown
# Green or red CSS class depending on whether
# positive or negative amount
def green_red(amount)
+23
View File
@@ -0,0 +1,23 @@
<%= form_for :dump, url: { action: "import_csv" }, html: { multipart: true, class: "formtastic user" } do |f| %>
<fieldset class="inputs">
<ol>
<li class="string input optional stringish">
<%= label_tag I18n.t("active_admin.users.upload_csv") %>
<%= f.file_field :file %>
</li>
</ol>
<ol>
<li class="string input optional stringish">
<%= label_tag I18n.t("active_admin.users.organization") %>
<%= f.select :organization_id, options_for_select(Organization.all.map{ |org| [org.name, org.id] }), include_blank: true %>
</li>
</ol>
</fieldset>
<fieldset class="actions">
<ol>
<li class="action input_action">
<%= f.submit I18n.t("global.save") %>
</li>
</ol>
</fieldset>
<% end %>
-15
View File
@@ -1,15 +0,0 @@
= form_for :dump, url: {action: "import_csv"}, html: { :multipart => true, class: "formtastic user"} do |f|
%fieldset.inputs
%ol
%li.string.input.optional.stringish
= label_tag I18n.t("active_admin.users.upload_csv")
= f.file_field :file
%ol
%li.string.input.optional.stringish
= label_tag I18n.t("active_admin.users.organization")
= f.select :organization_id, options_for_select(Organization.all.map{ |org| [org.name, org.id] }), include_blank: true
%fieldset.actions
%ol
%li.action.input_action
= f.submit I18n.t("global.save")
+48
View File
@@ -0,0 +1,48 @@
<nav class="navbar navbar-static-top navbar-inverse" role="navigation">
<div class="container-fluid">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar-collapse" aria-expanded="false">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="/">TimeOverflow</a>
</div>
<ul class="nav navbar-nav">
<% if current_user && current_organization %>
<%= render 'application/menus/user_list_link' %>
<%= render 'application/menus/offers_dashboard_link' %>
<%= render 'application/menus/inquiries_list_link' %>
</ul>
<div id="navbar-collapse" class="collapse navbar-collapse">
<ul class="nav navbar-nav">
<% if current_user.manages? current_organization %>
<%= render 'application/menus/organization_reports_menu' %>
<%= render 'application/menus/organization_statistics_menu' %>
<%= render 'application/menus/organization_listings_menu' %>
<% else %>
<%= render 'application/menus/offers_by_tag_link' %>
<% end %>
<% end %>
</ul>
<ul class="nav navbar-nav navbar-right">
<% if current_user %>
<%= render 'application/menus/user_admin_menu' %>
<% else %>
<li>
<%= link_to t("layouts.application.about"), page_path("about") %>
</li>
<li>
<%= link_to t("layouts.application.login"), new_user_session_path %>
</li>
<% end %>
<li class="divider" role="presentation"></li>
<%= render 'application/menus/language_switcher' %>
</ul>
</div>
</div>
</nav>
-157
View File
@@ -1,157 +0,0 @@
%nav.navbar.navbar-static-top.navbar-inverse{role: :navigation}
.container
.navbar-header
%a.navbar-brand(href="/") TimeOverflow
%ul.nav.navbar-nav
- if current_user && current_organization
- [User, Offer, Inquiry].each do |item|
- path = item == Offer ? dashboard_offers_path :
- send("#{item.to_s.downcase.pluralize}_path")
%li{class: current_page?(path) && "active"}
%a{href: path}
= glyph(item)
= item.model_name.human(count: :many)
- if current_user.manages? current_organization
%li.dropdown
%a.dropdown-toggle{ href: "#"}
= glyph("paperclip")
= t ".reports"
%b.caret
%ul.dropdown-menu{role: :menu}
%li
%a{ href: "/report/user_list", data: { popup: true } }
%span.glyphicon.glyphicon-list-alt
= User.model_name.human(count: :many)
%li
%a{ href: "/report/offer_list", data: { popup: true } }
%span.glyphicon.glyphicon-list-alt
= Offer.model_name.human(count: :many)
%li
%a{ href: "/report/inquiry_list", data: { popup: true } }
%span.glyphicon.glyphicon-list-alt
= Inquiry.model_name.human(count: :many)
%li.dropdown
%a.dropdown-toggle{href: "#"}
= glyph("stats")
= t ".statistics"
%b.caret
%ul.dropdown-menu{role: :menu}
%li
%a{href: "/statistics/statistics_global_activity"}
%span.glyphicon.glyphicon-stats
= t ".global_activity"
%li
%a{href: "/statistics/statistics_inactive_users"}
%span.glyphicon.glyphicon-stats
= t ".inactive_users"
%li
%a{href: "/statistics/statistics_demographics"}
%span.glyphicon.glyphicon-stats
= t ".demographics"
%li
%a{href: "/statistics/statistics_last_login"}
%span.glyphicon.glyphicon-stats
= t ".last_login"
%li
%a{href: "/statistics/statistics_without_offers"}
%span.glyphicon.glyphicon-stats
= t ".without_offers"
%li
%a{:href => "/statistics/statistics_type_swaps"}
%span.glyphicon.glyphicon-stats
= t ".type_of_swaps"
%li
%a{:href => "/statistics/statistics_all_transfers"}
%span.glyphicon.glyphicon-stats
= t ".statistics_all_transfers"
%li.dropdown
%a.dropdown-toggle{ href: "#"}
= glyph("wrench")
= t ".admin"
%b.caret
%ul.dropdown-menu{role: :menu}
%li
- path = alpha_grouped_index_tags_path(post_type: "offer")
%a{href: path }
= glyph("tags")
= t ".tags"
%li
- path = offers_path(org: current_organization)
%a{href: path }
= glyph("link")
= glyph("eye-open")
= t ".offer_public_link"
%li
- path = inquiries_path(org: current_organization)
%a{href: path }
= glyph("link")
= glyph("eye-open")
= t ".inquiry_public_link"
- else
- path = alpha_grouped_index_tags_path(post_type: "offer")
%li{class: current_page?(path) && "active"}
%a{href: path}
= glyph("tags")
= t ".tags"
%ul.nav.navbar-nav.navbar-right
- if current_user
%li.dropdown
%a.dropdown-toggle{href: "#"}
= image_tag avatar_url(current_user), style: "margin: -8px auto"
= current_user.email
%b.caret
%ul.dropdown-menu{role: :menu}
- if superadmin?
%li{role: :presentation}
= link_to admin_root_path do
= glyph(:cog)
= t ".adminshort"
%li{role: :presentation}
= link_to destroy_user_session_path, method: :delete do
= glyph("log-out")
= t ".sign_out"
%li.divider{role: :presentation}
- if current_user.organizations.count > 1
- current_user.organizations.each do |org|
- if current_organization == org
%li.disabled
= link_to org.name, "#"
- else
%li
= link_to set_current_organization_path(org), method: :post do
= glyph(:retweet)
= org.name
%li.divider{role: :presentation}
%li{role: :presentation}
= link_to current_user do
= glyph(:user)
= t "layouts.application.edit_profile"
- current_user.members.where(manager: true).each do |m|
%li{role: :presentation}
= link_to m.organization do
= glyph(:pencil)
= t "layouts.application.edit_org",
organization: m.organization
- else
%li
= link_to page_path("about") do
= t "layouts.application.about"
%li
%a{href: new_user_session_path}
= t "layouts.application.login"
%li.divider{role: :presentation}
%li.dropdown
%a.dropdown-toggle{ href: "#"}
= glyph("globe")
%b.caret
%ul.dropdown-menu{role: :menu}
%li.disabled
= link_to t("global.locales_header"), "#"
%li.divider
- languages_list
@@ -0,0 +1,31 @@
<div class="jumbotron">
<p class="lead">
<%= t "application.organization_list.welcome", user: current_user.to_s %>
<br/>
<%= t "application.organization_list.not_member" %>
</p>
<table class="table">
<thead>
<tr>
<th><%= t "application.organization_list.time_bank" %></th>
<th><%= t "application.organization_list.email" %></th>
<th><%= t "application.organization_list.phone" %></th>
<th><%= t "application.organization_list.public_opening_times" %></th>
<th><%= t "application.organization_list.city" %></th>
<th><%= t "application.organization_list.neighborhood" %></th>
</tr>
</thead>
<tbody>
<% Organization.find_each do |org| %>
<tr>
<td><%= org.name %></td>
<td><%= org.email %></td>
<td><%= org.phone %></td>
<td><%= org.public_opening_times %></td>
<td><%= org.city %></td>
<td><%= org.neighborhood %></td>
</tr>
<% end %>
</tbody>
</table>
</div>
@@ -1,33 +0,0 @@
:javascript
angular.module('timeoverflow').value('Organizations', #{ raw Organization.all.to_json(only: [:name, :email, :phone, :public_opening_times, :city, :neighborhood]) });
.jumbotron{"ng-controller" => "OrganizationListCtrl"}
%p.lead
= t(".welcome", user: current_user.to_s)
%br/
= t(".not_member")
%table.table
%thead
%tr
%th
=t(".time_bank")
%th
=t(".email")
%th
=t(".phone")
%th
=t(".public_opening_times")
%th
=t(".city")
%th
=t(".neighborhood")
%tbody
%tr{"ng-repeat" => "org in organizations"}
%td {{ org.name }}
%td {{ org.email }}
%td {{ org.phone }}
%td {{ org.public_opening_times }}
%td {{ org.city }}
%td {{ org.neighborhood }}
@@ -0,0 +1,6 @@
<li class="<%= "active" if current_page?(inquiries_path) %>">
<%= link_to inquiries_path do %>
<%= glyph :inquiry %>
<%= Inquiry.model_name.human(count: :many) %>
<% end %>
</li>
@@ -0,0 +1,17 @@
<li class="dropdown">
<a class="dropdown-toggle" href="#">
<%= glyph :globe %>
<b class="caret"></b>
</a>
<ul class="dropdown-menu" role="menu">
<li class="disabled">
<%= link_to t("global.locales_header"), "#" %>
</li>
<li class="divider"></li>
<% I18n.available_locales.each do |locale| %>
<li class="<%= "disabled" if I18n.locale == locale %>">
<%= link_to locale_menu_item(locale), switch_lang_path(locale: locale) %>
</li>
<% end %>
</ul>
</li>
@@ -0,0 +1,6 @@
<li class="<%= "active" if current_page?(alpha_grouped_index_tags_path(post_type: "offer")) %>">
<%= link_to alpha_grouped_index_tags_path(post_type: "offer") do %>
<%= glyph :tags %>
<%= t ".tags" %>
<% end %>
</li>
@@ -0,0 +1,6 @@
<li class="<%= "active" if current_page?(dashboard_offers_path) %>">
<%= link_to dashboard_offers_path do %>
<%= glyph :offer %>
<%= Offer.model_name.human(count: :many) %>
<% end %>
</li>
@@ -0,0 +1,29 @@
<li class="dropdown">
<a class="dropdown-toggle" href="#">
<%= glyph :wrench %>
<%= t "application.navbar.admin" %>
<b class="caret"></b>
</a>
<ul class="dropdown-menu" role="menu">
<li>
<%= link_to alpha_grouped_index_tags_path(post_type: "offer") do %>
<%= glyph :tags %>
<%= t "application.navbar.tags" %>
<% end %>
</li>
<li>
<%= link_to offers_path(org: current_organization) do %>
<%= glyph :link %>
<%= glyph :eye_open %>
<%= t "application.navbar.offer_public_link" %>
<% end %>
</li>
<li>
<%= link_to inquiries_path(org: current_organization) do %>
<%= glyph :link %>
<%= glyph :eye_open %>
<%= t "application.navbar.inquiry_public_link" %>
<% end %>
</li>
</ul>
</li>
@@ -0,0 +1,27 @@
<li class="dropdown">
<a class="dropdown-toggle" href="#">
<%= glyph :paperclip %>
<%= t "application.navbar.reports" %>
<b class="caret"></b>
</a>
<ul class="dropdown-menu" role="menu">
<li>
<%= link_to user_list_report_path, data: { popup: true } do %>
<%= glyph :list_alt %>
<%= User.model_name.human(count: :many) %>
<% end %>
</li>
<li>
<%= link_to offer_list_report_path, data: { popup: true } do %>
<%= glyph :list_alt %>
<%= Offer.model_name.human(count: :many) %>
<% end %>
</li>
<li>
<%= link_to inquiry_list_report_path, data: { popup: true } do %>
<%= glyph :list_alt %>
<%= Inquiry.model_name.human(count: :many) %>
<% end %>
</li>
</ul>
</li>
@@ -0,0 +1,51 @@
<li class="dropdown">
<a class="dropdown-toggle" href="#">
<%= glyph :stats %>
<%= t "application.navbar.statistics" %>
<b class="caret"></b>
</a>
<ul class="dropdown-menu" role="menu">
<li>
<%= link_to statistics_global_activity_statistics_path do %>
<%= glyph :stats %>
<%= t "application.navbar.global_activity" %>
<% end %>
</li>
<li>
<%= link_to statistics_inactive_users_statistics_path do %>
<%= glyph :stats %>
<%= t "application.navbar.inactive_users" %>
<% end %>
</li>
<li>
<%= link_to statistics_demographics_statistics_path do %>
<%= glyph :stats %>
<%= t "application.navbar.demographics" %>
<% end %>
</li>
<li>
<%= link_to statistics_last_login_statistics_path do %>
<%= glyph :stats %>
<%= t "application.navbar.last_login" %>
<% end %>
</li>
<li>
<%= link_to statistics_without_offers_statistics_path do %>
<%= glyph :stats %>
<%= t "application.navbar.without_offers" %>
<% end %>
</li>
<li>
<%= link_to statistics_type_swaps_statistics_path do %>
<%= glyph :stats %>
<%= t "application.navbar.type_of_swaps" %>
<% end %>
</li>
<li>
<%= link_to statistics_all_transfers_statistics_path do %>
<%= glyph :stats %>
<%= t "application.navbar.statistics_all_transfers" %>
<% end %>
</li>
</ul>
</li>
@@ -0,0 +1,11 @@
<li class="disabled">
<a href="#"><%= current_organization.name %></a>
</li>
<% (current_user.organizations - [current_organization]).each do |org| %>
<li>
<%= link_to set_current_organization_path(org), method: :post do %>
<%= glyph(:retweet) %>
<%= org.name %>
<% end %>
</li>
<% end %>
@@ -0,0 +1,42 @@
<li class="dropdown">
<a class="dropdown-toggle" href="#">
<%= image_tag avatar_url(current_user), style: "margin: -8px auto" %>
<%= current_user.email %>
<b class="caret"></b>
</a>
<ul class="dropdown-menu" role="menu">
<% if superadmin? %>
<li role="presentation">
<%= link_to admin_root_path do %>
<%= glyph :cog %>
<%= t "application.navbar.adminshort" %>
<% end %>
</li>
<% end %>
<li role="presentation">
<%= link_to destroy_user_session_path, method: :delete do %>
<%= glyph :log_out %>
<%= t "application.navbar.sign_out" %>
<% end %>
</li>
<li class="divider" role="presentation"></li>
<% if current_user.organizations.count > 1 %>
<%= render 'application/menus/organization_switcher' %>
<li class="divider" role="presentation"></li>
<% end %>
<li role="presentation">
<%= link_to current_user do %>
<%= glyph :user %>
<%= t "layouts.application.edit_profile" %>
<% end %>
</li>
<% current_user.members.where(manager: true).each do |m| %>
<li role="presentation">
<%= link_to m.organization do %>
<%= glyph :pencil %>
<%= t "layouts.application.edit_org", organization: m.organization %>
<% end %>
</li>
<% end %>
</ul>
</li>
@@ -0,0 +1,6 @@
<li class="<%= "active" if current_page?(users_path) %>">
<%= link_to users_path do %>
<%= glyph :user %>
<%= User.model_name.human(count: :many) %>
<% end %>
</li>
@@ -0,0 +1,26 @@
<div class="row">
<div class="col-sm-4">
<%= render "devise/shared/links" %>
</div>
<div class="col-sm-8">
<div class="panel panel-primary">
<div class="panel-heading">
<h2 class="panel-title">
<%= t(".resend_instructions") %>
</h2>
</div>
<div class="panel-body">
<%= show_error_messages!(resource) %>
<%= form_for resource, url: confirmation_path(resource_name), html: { method: :post } do |f| %>
<div class="form-group">
<%= f.label :email, class: "control-label" %>
<%= f.text_field :email, required: true, autofocus: true, class: "form-control" %>
</div>
<div class="form-group">
<%= f.submit t(".resend_instructions"), class: "btn btn-primary" %>
</div>
<% end %>
</div>
</div>
</div>
</div>
@@ -1,17 +0,0 @@
.row
.col-sm-4
= render "devise/shared/links"
.col-sm-8
.panel.panel-primary
.panel-heading
%h2.panel-title
= t(".resend_instructions")
.panel-body
= show_error_messages!(resource)
= form_for resource, url: confirmation_path(resource_name), html: { method: :post } do |f|
.form-group
= f.label :email, class: "control-label"
= f.text_field :email, required: true, autofocus: true, class: "form-control"
.form-group
= f.submit t(".resend_instructions"), class: "btn btn-primary"
+34
View File
@@ -0,0 +1,34 @@
<div class="row">
<div class="col-sm-4">
<%= render "devise/shared/links" %>
</div>
<div class="col-sm-8">
<div class="panel panel-primary">
<div class="panel-heading">
<h2 class="panel-title">
<%= t(".change_password") %>
</h2>
</div>
<div class="panel-body">
<%= show_error_messages!(resource) %>
<%= form_for resource, url: password_path(resource_name), html: { method: :put } do |f| %>
<%= f.hidden_field :reset_password_token %>
<div class="form-group">
<%= f.label :password, t(".new_password"), class: "control-label" %>
<%= f.password_field :password, required: true, autofocus: true, class: "form-control", ng_model: "password" %>
</div>
<div class="form-group" ng_class="{ 'has-error': password != password_confirmation %>">
<%= f.label :password_confirmation, t(".confirm_password"), class: "control-label" %>
<%= f.password_field :password_confirmation, required: true, class: "form-control", ng_model: "password_confirmation" %>
<div class="help-block" ng_if="password && password_confirmation && password != password_confirmation">
<%= t ".passwords_not_match" %>
</div>
</div>
<div class="form-group">
<%= f.submit t(".change_password"), class: "btn btn-primary", ng_disabled: "!password || password != password_confirmation" %>
</div>
<% end %>
</div>
</div>
</div>
</div>
-23
View File
@@ -1,23 +0,0 @@
.row
.col-sm-4
= render "devise/shared/links"
.col-sm-8
.panel.panel-primary
.panel-heading
%h2.panel-title
= t(".change_password")
.panel-body
= show_error_messages!(resource)
= form_for resource, url: password_path(resource_name), html: { method: :put } do |f|
= f.hidden_field :reset_password_token
.form-group
= f.label :password, t(".new_password"), class: "control-label"
= f.password_field :password, required: true, autofocus: true, class: "form-control", ng_model: "password"
.form-group{ ng_class: "{ 'has-error': password != password_confirmation }" }
= f.label :password_confirmation, t(".confirm_password"), class: "control-label"
= f.password_field :password_confirmation, required: true, class: "form-control", ng_model: "password_confirmation"
.help-block{ ng_if: "password && password_confirmation && password != password_confirmation" }
= t ".passwords_not_match"
.form-group
= f.submit t(".change_password"), class: "btn btn-primary", ng_disabled: "!password || password != password_confirmation"
+26
View File
@@ -0,0 +1,26 @@
<div class="row">
<div class="col-sm-4">
<%= render "devise/shared/links" %>
</div>
<div class="col-sm-8">
<div class="panel panel-primary">
<div class="panel-heading">
<h2 class="panel-title">
<%= t(".forgot_question") %>
</h2>
</div>
<div class="panel-body">
<%= show_error_messages!(resource) %>
<%= form_for resource, url: password_path(resource_name), html: { method: :post } do |f| %>
<div class="form-group">
<%= f.label :email, class: "control-label" %>
<%= f.text_field :email, required: true, autofocus: true, class: "form-control" %>
</div>
<div class="form-group">
<%= f.submit t(".send_instructions"), class: "btn btn-primary" %>
</div>
<% end %>
</div>
</div>
</div>
</div>
-17
View File
@@ -1,17 +0,0 @@
.row
.col-sm-4
= render "devise/shared/links"
.col-sm-8
.panel.panel-primary
.panel-heading
%h2.panel-title
= t(".forgot_question")
.panel-body
= show_error_messages!(resource)
= form_for resource, url: password_path(resource_name), html: { method: :post } do |f|
.form-group
= f.label :email, class: "control-label"
= f.text_field :email, required: true, autofocus: true, class: "form-control"
.form-group
= f.submit t(".send_instructions"), class: "btn btn-primary"
@@ -0,0 +1,60 @@
<div class="row">
<div class="col-sm-offset-4 col-sm-8">
<div class="panel panel-primary">
<div class="panel-heading">
<h2 class="panel-title">
<%= t(".edit_user") %>
</h2>
</div>
<div class="panel-body">
<%= show_error_messages!(resource) %>
<%= form_for(resource, as: resource_name, url: registration_path(resource_name), html: { method: :put }) do |f| %>
<div class="form-group">
<%= f.label :email, class: "control-label" %>
<%= f.text_field :email, required: true, autofocus: true, class: "form-control" %>
<% if devise_mapping.confirmable? && resource.pending_reconfirmation? %>
<p class="help-block">
Currently waiting confirmation for:
<%= resource.unconfirmed_email %>
</p>
<% end %>
</div>
<div class="form-group">
<%= f.label t(".password"), class: "control-label" %>
<%= f.password_field :password, required: true, autocomplete: "off", class: "form-control" %>
<p class="help-block">
<%= t(".help_password") %>
</p>
</div>
<div class="form-group">
<%= f.label t(".password_confirmation"), class: "control-label" %>
<%= f.password_field :password_confirmation, required: true, class: "form-control" %>
</div>
<div class="form-group">
<%= f.label t(".current_password"), class: "control-label" %>
<%= f.password_field :current_password, required: true, class: "form-control" %>
<p class="help-block">
<%= t(".help_current_password") %>
</p>
</div>
<div class="form-group">
<%= f.submit t(".update"), class: "btn btn-primary" %>
</div>
<% end %>
</div>
</div>
<div class="panel panel-primary">
<div class="panel-heading">
<h2 class="panel-title">
<%= t(".cancel_account") %>
</h2>
</div>
<div class="panel-body">
<p>
<%= t(".unhappy") %>
<%= link_to t(".cancel_account"), registration_path(resource_name), data: { confirm: "Are you sure?" }, method: :delete %>
</p>
</div>
</div>
</div>
</div>
@@ -1,41 +0,0 @@
.row
.col-sm-offset-4.col-sm-8
.panel.panel-primary
.panel-heading
%h2.panel-title
= t(".edit_user")
.panel-body
= show_error_messages!(resource)
= form_for(resource, as: resource_name, url: registration_path(resource_name), html: { method: :put }) do |f|
.form-group
= f.label :email, class: "control-label"
= f.text_field :email, required: true, autofocus: true, class: "form-control"
- if devise_mapping.confirmable? && resource.pending_reconfirmation?
%p.help-block
Currently waiting confirmation for:
= resource.unconfirmed_email
.form-group
= f.label t(".password"), class: "control-label"
= f.password_field :password, required: true, autocomplete: "off", class: "form-control"
%p.help-block
= t(".help_password")
.form-group
= f.label t(".password_confirmation"), class: "control-label"
= f.password_field :password_confirmation, required: true, class: "form-control"
.form-group
= f.label t(".current_password"), class: "control-label"
= f.password_field :current_password, required: true, class: "form-control"
%p.help-block
= t(".help_current_password")
.form-group
= f.submit t(".update"), class: "btn btn-primary"
.panel.panel-primary
.panel-heading
%h2.panel-title
= t(".cancel_account")
.panel-body
%p
= t(".unhappy")
= link_to t(".cancel_account"), registration_path(resource_name), data: { confirm: "Are you sure?" }, method: :delete
@@ -0,0 +1,38 @@
<div class="row">
<div class="col-sm-4">
<%= render "devise/shared/links" %>
</div>
<div class="col-sm-8">
<div class="panel panel-primary">
<div class="panel-heading">
<h2 class="panel-title">
<%= t(".sign_up") %>
</h2>
</div>
<div class="panel-body">
<%= show_error_messages!(resource) %>
<%= form_for resource, url: registration_path(resource_name) do |f| %>
<div class="form-group">
<%= f.label :username, class: "control-label" %>
<%= f.text_field :username, required: true, autofocus: true, class: "form-control" %>
</div>
<div class="form-group">
<%= f.label :email, class: "control-label" %>
<%= f.text_field :email, required: true, autofocus: true, class: "form-control" %>
</div>
<div class="form-group">
<%= f.label t(".password"), class: "control-label" %>
<%= f.password_field :password, required: true, class: "form-control" %>
</div>
<div class="form-group">
<%= f.label t(".password_confirmation"), class: "control-label" %>
<%= f.password_field :password_confirmation, required: true, class: "form-control" %>
</div>
<div class="form-group">
<%= f.submit t(".sign_me_up"), class: "btn btn-primary" %>
</div>
<% end %>
</div>
</div>
</div>
</div>
@@ -1,26 +0,0 @@
.row
.col-sm-4
= render "devise/shared/links"
.col-sm-8
.panel.panel-primary
.panel-heading
%h2.panel-title
= t(".sign_up")
.panel-body
= show_error_messages!(resource)
= form_for resource, url: registration_path(resource_name) do |f|
.form-group
= f.label :username, class: "control-label"
= f.text_field :username, required: true, autofocus: true, class: "form-control"
.form-group
= f.label :email, class: "control-label"
= f.text_field :email, required: true, autofocus: true, class: "form-control"
.form-group
= f.label t(".password"), class: "control-label"
= f.password_field :password, required: true, class: "form-control"
.form-group
= f.label t(".password_confirmation"), class: "control-label"
= f.password_field :password_confirmation, required: true, class: "form-control"
.form-group
= f.submit t(".sign_me_up"), class: "btn btn-primary"
+55
View File
@@ -0,0 +1,55 @@
<div class="row">
<div class="col-xs-12 col-sm-8 col-sm-offset-2 col-md-6 col-md-offset-3 col-lg-4 col-lg-offset-4">
<div class="panel" id="login-box">
<div class="panel-heading">
<h1>
<%= glyph :hourglass %>
TimeOverflow
</h1>
</div>
<div class="panel-body">
<%= show_error_messages!(resource) %>
<%= form_for resource, url: session_path(resource_name) do |f| %>
<div class="form-group">
<div class="input-group">
<span class="input-group-addon">
<%= glyph :user %>
</span>
<%= f.text_field :email, required: false, autofocus: true, placeholder: "Email address", class: "form-control input-lg" %>
</div>
</div>
<div class="form-group">
<div class="input-group">
<span class="input-group-addon">
<%= glyph :lock %>
</span>
<%= f.password_field :password, required: false, autofocus: true, placeholder: "Password", class: "form-control input-lg" %>
</div>
</div>
<div class="form-group" id="remember-me-wrapper">
<div class="row">
<div class="col-xs-6">
<div class="checkbox">
<%= f.label :remember_me do |nada| %>
<%= f.check_box :remember_me %>
<%= t(".remember_me") %>
<% end %>
</div>
</div>
</div>
</div>
<div class="form-group">
<div class="row">
<div class="col-xs-12">
<%= f.submit t(".sign_in"), class: "btn btn-primary btn-lg col-xs-12" %>
</div>
</div>
</div>
<% end %>
</div>
<div class="panel-footer">
<%= render "devise/shared/links" %>
</div>
</div>
</div>
</div>
-34
View File
@@ -1,34 +0,0 @@
.row
.col-xs-12.col-sm-8.col-sm-offset-2.col-md-6.col-md-offset-3.col-lg-4.col-lg-offset-4
.panel#login-box
.panel-heading
h1
span.glyphicon.glyphicon-hourglass
| TimeOverflow
.panel-body
= show_error_messages!(resource)
= form_for resource, url: session_path(resource_name) do |f|
.form-group
.input-group
span.input-group-addon
span.glyphicon.glyphicon-user
= f.text_field :email, required: false, autofocus: true, placeholder: "Email address", class: "form-control input-lg"
.form-group
.input-group
span.input-group-addon
span.glyphicon.glyphicon-lock
= f.password_field :password, required: false, autofocus: true, placeholder: "Password", class: "form-control input-lg"
.form-group#remember-me-wrapper
.row
.col-xs-6
.checkbox
= f.label :remember_me do |nada|
= f.check_box :remember_me
= t(".remember_me")
.form-group
.row
.col-xs-12
= f.submit t(".sign_in"), class: "btn btn-primary btn-lg col-xs-12"
.panel-footer
= render "devise/shared/links"
+26
View File
@@ -0,0 +1,26 @@
<div class="row">
<div class="col-sm-4">
<%= render "devise/shared/links" %>
</div>
<div class="col-sm-8">
<div class="panel panel-primary">
<div class="panel-heading">
<h2 class="panel-title">
<%= t(".resend_instructions") %>
</h2>
</div>
<div class="panel-body">
<%= show_error_messages!(resource) %>
<%= form_for resource, url: unlock_path(resource_name), html: { method: :post } do |f| %>
<div class="form-group">
<%= f.label :email, class: "control-label" %>
<%= f.text_field :email, required: false, autofocus: true, class: "form-control" %>
</div>
<div class="form-group">
<%= f.submit t(".resend_instructions"), class: "btn btn-primary" %>
</div>
<% end %>
</div>
</div>
</div>
</div>
-17
View File
@@ -1,17 +0,0 @@
.row
.col-sm-4
= render "devise/shared/links"
.col-sm-8
.panel.panel-primary
.panel-heading
%h2.panel-title
= t(".resend_instructions")
.panel-body
= show_error_messages!(resource)
= form_for resource, url: unlock_path(resource_name), html: { method: :post } do |f|
.form-group
= f.label :email, class: "control-label"
= f.text_field :email, required: false, autofocus: true, class: "form-control"
.form-group
= f.submit t(".resend_instructions"), class: "btn btn-primary"
+9
View File
@@ -0,0 +1,9 @@
<div class="modal-header">
<button aria-hiden="true" class="close" data-dismiss="modal" type="button">&times;</button>
<h4 class="modal-title">
<%= @document.title %>
</h4>
</div>
<div class="modal-body">
<%= m @document.content %>
</div>
-6
View File
@@ -1,6 +0,0 @@
.modal-header
%button.close{type: "button", "data-dismiss" => "modal", "aria-hiden" => "true"} &times;
%h4.modal-title= @document.title
.modal-body
:markdown
#{@document.content}
+63
View File
@@ -0,0 +1,63 @@
<div class="row">
<div class="col-xs-12 col-sm-8 col-sm-offset-2 col-md-6 col-md-offset-3 col-lg-4 col-lg-offset-4">
<div class="panel" id="login-box">
<div class="panel-heading">
<h1>
<%= glyph :hourglass %>
TimeOverflow
</h1>
</div>
<div class="panel-body">
<form action="index.html" role="form">
<div class="form-group">
<div class="input-group">
<span class="input-group-addon">
<%= glyph :user %>
</span>
<input class="form-control input-lg"
placeholder="Email address"
type="text">
</div>
</div>
<div class="form-group">
<div class="input-group">
<span class="input-group-addon">
<%= glyph :lock %>
</span>
<input class="form-control input-lg"
placeholder="Password"
type="password">
</div>
</div>
<div class="form-group" id="remember-me-wrapper">
<div class="row">
<div class="col-xs-6">
<div class="checkbox-nice">
<input id="remember-me" checked="checked" type="checkbox">
<label for="remember-me">
<%= t("devise.sessions.new.remember_me") %>
</label>
</div>
</div>
<a class="col-xs-6"
id="login-forget-link"
href="forgot-password-full.html">
<%= t("devise.shared.links.forgot_your_password") %>
</a>
</div>
</div>
<div class="row">
<div class="col-xs-12">
<button class="btn btn-success btn-lg col-xs-12" type="submit">
Login
</button>
</div>
</div>
</form>
</div>
<div class="panel-footer">
<%= render "devise/shared/links" %>
</div>
</div>
</div>
</div>
-34
View File
@@ -1,34 +0,0 @@
.row
.col-xs-12.col-sm-8.col-sm-offset-2.col-md-6.col-md-offset-3.col-lg-4.col-lg-offset-4
.panel#login-box
.panel-heading
h1
span.glyphicon.glyphicon-hourglass
| TimeOverflow
.panel-body
form action="index.html" role="form"
.form-group
.input-group
span.input-group-addon
span.glyphicon.glyphicon-user
input.form-control.input-lg placeholder=("Email address") type="text" /
.form-group
.input-group
span.input-group-addon
span.glyphicon.glyphicon-lock
input.form-control.input-lg placeholder="Password" type="password" /
#remember-me-wrapper
.row
.col-xs-6
.checkbox-nice
input#remember-me checked="checked" type="checkbox" /
label for="remember-me"
| Remember me
a#login-forget-link.col-xs-6 href="forgot-password-full.html"
| Forgot password?
.row
.col-xs-12
button.btn.btn-success.btn-lg.col-xs-12 type="submit" Login
.panel-footer
= render "devise/shared/links"
+5
View File
@@ -0,0 +1,5 @@
<h1>
<%= @inquiry.title %>
<small><%= t ".edit" %></small>
</h1>
<%= render "shared/post_form", post: @inquiry, label_button: t(".submit") %>
-7
View File
@@ -1,7 +0,0 @@
%h1
= @inquiry.title
%small
= t ".edit"
= render partial: "shared/post_form", locals: { post: @inquiry,
label_button: t(".submit") }
+57
View File
@@ -0,0 +1,57 @@
<% @category = Category.where(id: params[:cat]).first %>
<h1>
<%= Inquiry.model_name.human(count: :many) %>
<%= render "shared/show_filter_hint" %>
</h1>
<div class="navbar">
<form action="<%= inquiries_path %>"
class="navbar-form navbar-left"
method="get"
role="search">
<div class="form-group">
<input class="form-control"
name="q"
placeholder="<%= t("global.search") %>"
type="text"
value="<%= params[:q] %>">
</div>
<button class="btn btn-default" type="submit">
<%= t("global.search") %>
</button>
</form>
<ul class="nav navbar-nav">
<li class="dropdown">
<a class="dropdown-toggle" href="#">
<%= @category ? @category.name : Category.model_name.human %>
<span class="caret"></span>
</a>
<ul class="dropdown-menu" role="menu">
<li>
<%= link_to "× #{t("global.all")}", inquiries_path %>
</li>
<% Category.all.sort_by { |a| a.name.downcase }.each do |c| %>
<% next if c == @category %>
<li>
<%= link_to c.name, inquiries_path(cat: c.id) %>
</li>
<% end %>
</ul>
</li>
</ul>
<% if current_user && current_organization && !params[:org] %>
<ul class="nav navbar-nav pull-right">
<li>
<%= link_to new_inquiry_path do %>
<%= glyph :plus %>
<%= t "helpers.submit.create", model: Inquiry.model_name.human %>
<% end %>
</li>
</ul>
<% end %>
</div>
<div class="inquiries">
<%= render "shared/posts", posts: @inquiries %>
</div>
<%= paginate @inquiries %>
-35
View File
@@ -1,35 +0,0 @@
%h1
- @category = Category.where(id: params[:cat]).first
= Inquiry.model_name.human(count: :many)
= render("/shared/show_filter_hint.html.haml")
.navbar
%form.navbar-form.navbar-left{action: inquiries_path, role: "search",
method: "get"}
.form-group
%input.form-control{type: "text", placeholder: t("global.search"),
name: "q", value: params[:q]}
%button.btn.btn-default{type: "submit"}= t("global.search")
%ul.nav.navbar-nav
%li.dropdown
%a.dropdown-toggle{href: "#"}
= @category ? @category.name : Category.model_name.human
%span.caret
%ul.dropdown-menu{role: "menu"}
%li= link_to "× #{t("global.all")}", inquiries_path
- Category.all.sort_by { |a| a.name.downcase }.each do |c|
- next if c == @category
%li= link_to c.name, inquiries_path(cat: c.id)
- if current_user && current_organization && !params[:org]
%ul.nav.navbar-nav.pull-right
%li
%a{href: new_inquiry_path}
%span.glyphicon.glyphicon-plus
= t "helpers.submit.create", model: Inquiry.model_name.human
.inquiries
= render partial: "shared/posts", locals: { posts: @inquiries }
= paginate @inquiries
+2
View File
@@ -0,0 +1,2 @@
$('.inquiries').append('<%= j render("shared/posts", posts: @inquiries) %>');
$('.inquiries ~ a[rel=next]').replaceWith('<%= j link_to_next_page(@inquiries, t('.more'), remote: true, params: params) %>');
-2
View File
@@ -1,2 +0,0 @@
$('.inquiries').append('#{escape_javascript(render partial: "shared/posts", :locals => { :posts => @inquiries })}');
$('.inquiries ~ a[rel=next]').replaceWith('#{link_to_next_page @inquiries, t('.more'), remote: true, params: params}');
+4
View File
@@ -0,0 +1,4 @@
<h1>
<%= t "helpers.submit.create", model: @inquiry.class.model_name.human %>
</h1>
<%= render 'shared/post_form', post: @inquiry, label_button: t(".submit") %>
-3
View File
@@ -1,3 +0,0 @@
%h1= t "helpers.submit.create", model: @inquiry.class.model_name.human
= render partial: 'shared/post_form', locals: { post: @inquiry , label_button: t(".submit")}
+15
View File
@@ -0,0 +1,15 @@
<p class="actions text-right">
<% if admin? || @inquiry.user == current_user %>
<%= link_to edit_inquiry_path(@inquiry), class: "btn btn-warning" do %>
<%= glyph :pencil %>
<%= t "global.edit" %>
<% end %>
<%= link_to @inquiry,
data: { method: :delete, confirm: "sure?" },
class: "btn btn-danger" do %>
<%= glyph :trash %>
<%= t "global.delete" %>
<% end %>
<% end %>
</p>
<%= render "shared/post", post: @inquiry %>
-13
View File
@@ -1,13 +0,0 @@
= render "shared/post", post: @inquiry
%p.actions
- if admin? or @inquiry.user == current_user
= link_to edit_inquiry_path(@inquiry), class: "btn btn-warning" do
= glyph :pencil
= t "global.edit"
= link_to @inquiry, data: {method: :DELETE, confirm: "sure?" }, :class => "btn btn-danger" do
= glyph :trash
= t "global.delete"
+3
View File
@@ -0,0 +1,3 @@
<li>
<%= link_to_unless current_page.first?, raw(t 'views.pagination.first'), url, :remote => remote %>
</li>
-2
View File
@@ -1,2 +0,0 @@
%li
= link_to_unless current_page.first?, raw(t 'views.pagination.first'), url, :remote => remote
+3
View File
@@ -0,0 +1,3 @@
<li class='disabled'>
<%= content_tag :a, raw(t 'views.pagination.truncate') %>
</li>
-2
View File
@@ -1,2 +0,0 @@
%li.disabled
= content_tag :a, raw(t 'views.pagination.truncate')
+3
View File
@@ -0,0 +1,3 @@
<li>
<%= link_to_unless current_page.last?, raw(t 'views.pagination.last'), url, {:remote => remote} %>
</li>
-2
View File
@@ -1,2 +0,0 @@
%li
= link_to_unless current_page.last?, raw(t 'views.pagination.last'), url, {:remote => remote}
+3
View File
@@ -0,0 +1,3 @@
<li>
<%= link_to_unless current_page.last?, raw(t 'views.pagination.next'), url, :rel => 'next', :remote => remote %>
</li>
-2
View File
@@ -1,2 +0,0 @@
%li
= link_to_unless current_page.last?, raw(t 'views.pagination.next'), url, :rel => 'next', :remote => remote
+9
View File
@@ -0,0 +1,9 @@
<% if page.current? %>
<li class='active'>
<%= content_tag :a, page, remote: remote, rel: (page.next? ? 'next' : (page.prev? ? 'prev' : nil)) %>
</li>
<% else %>
<li>
<%= link_to page, url, remote: remote, rel: (page.next? ? 'next' : (page.prev? ? 'prev' : nil)) %>
</li>
<% end %>
-6
View File
@@ -1,6 +0,0 @@
- if page.current?
%li.active
= content_tag :a, page, remote: remote, rel: (page.next? ? 'next' : (page.prev? ? 'prev' : nil))
- else
%li
= link_to page, url, remote: remote, rel: (page.next? ? 'next' : (page.prev? ? 'prev' : nil))
+15
View File
@@ -0,0 +1,15 @@
<%= paginator.render do -%>
<ul class="pagination">
<%= first_page_tag unless current_page.first? %>
<%= prev_page_tag unless current_page.first? %>
<% each_page do |page| -%>
<% if page.left_outer? || page.right_outer? || page.inside_window? -%>
<%= page_tag page %>
<% elsif !page.was_truncated? -%>
<%= gap_tag %>
<% end -%>
<% end -%>
<%= next_page_tag unless current_page.last? %>
<%= last_page_tag unless current_page.last? %>
</ul>
<% end -%>
-11
View File
@@ -1,11 +0,0 @@
= paginator.render do
%ul.pagination
= first_page_tag unless current_page.first?
= prev_page_tag unless current_page.first?
- each_page do |page|
- if page.left_outer? || page.right_outer? || page.inside_window?
= page_tag page
- elsif !page.was_truncated?
= gap_tag
= next_page_tag unless current_page.last?
= last_page_tag unless current_page.last?
+3
View File
@@ -0,0 +1,3 @@
<li>
<%= link_to_unless current_page.first?, raw(t 'views.pagination.previous'), url, :rel => 'prev', :remote => remote %>
</li>
-2
View File
@@ -1,2 +0,0 @@
%li
= link_to_unless current_page.first?, raw(t 'views.pagination.previous'), url, :rel => 'prev', :remote => remote
+47
View File
@@ -0,0 +1,47 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta content="IE=Edge,chrome=1" http-equiv="X-UA-Compatible">
<meta content="width=device-width, initial-scale=1.0" name="viewport">
<title>
<% if content_for? :window_title %>
<%= content_for :window_title %>
<% else %>
<% if current_organization %>
<%= current_organization %>
<% end %>
<%= yield :title %>
<% end %>
</title>
<%= csrf_meta_tags %>
<link href="/favicon.ico" rel="shortcut icon">
<%= stylesheet_link_tag 'libs', media: 'all' %>
<%= stylesheet_link_tag 'application', media: 'all' %>
<%= javascript_include_tag 'libs' %>
<%= javascript_include_tag 'application' %>
</head>
<body data-action="<%= params[:controller] %>-<%= params[:action] %>"
ng-app="timeoverflow"
ng-cloak>
<%= render 'navbar' %>
<div class="container">
<%= render 'layouts/messages' %>
<%= yield %>
</div>
<div class="modal fade" id="modal">
<div class="modal-dialog">
<div class="modal-content"></div>
</div>
</div>
<div id="footer">
<p>
<%= link_to t('application.terms_conditions'),
tnc_path,
data: { target: '#modal', toggle: 'modal' } %>
|
<%= link_to t('layouts.application.about'), page_path('about') %>
</p>
</div>
</body>
</html>
-45
View File
@@ -1,45 +0,0 @@
!!! 5
%html{lang: "en"}
%head
%meta{charset: "utf-8"}
%meta{"http-equiv" => "X-UA-Compatible", content: "IE=Edge,chrome=1"}
%meta{name: "viewport", content: "width=device-width, initial-scale=1.0"}
%title
- if content_for? :window_title
-
= content_for :window_title
- else
- if current_organization
= current_organization
= yield :title
= csrf_meta_tags
%link{href: "/favicon.ico", rel: "shortcut icon"}
= stylesheet_link_tag "libs", media: "all"
= stylesheet_link_tag "application", media: "all"
= javascript_include_tag "libs"
= javascript_include_tag "application"
%body{ "ng-app" => "timeoverflow", "data-action" => "#{params[:controller]}-#{params[:action]}" }
= render 'navbar'
.container
= render 'layouts/messages'
= yield
.modal.fade#modal
.modal-dialog
.modal-content
#footer
%p
%a{href: tnc_path, "data-toggle" => "modal", "data-target" => "#modal"}
= t("application.terms_conditions")
|
%a
= link_to page_path("about") do
= t "layouts.application.about"
+24
View File
@@ -0,0 +1,24 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta content="IE=Edge,chrome=1" http-equiv="X-UA-Compatible">
<meta content="width=device-width, initial-scale=1.0" name="viewport">
<title>
<%= t('.report_title') %>
</title>
<%= stylesheet_link_tag 'libs', media: 'all' %>
<%= stylesheet_link_tag 'application', media: 'all' %>
<link href="/favicon.ico" rel="shortcut icon">
</head>
<body>
<div class="container">
<div class="row exports">
<%= t 'reports.download' %>
<%= link_to 'CSV', url_for(params.merge(format: :csv)) %>
<%= link_to 'PDF', url_for(params.merge(format: :pdf)) %>
</div>
<%= yield %>
</div>
</body>
</html>
-20
View File
@@ -1,20 +0,0 @@
!!! 5
%html{lang: "en"}
%head
%meta{charset: "utf-8"}
%meta{"http-equiv" => "X-UA-Compatible", content: "IE=Edge,chrome=1"}
%meta{name: "viewport", content: "width=device-width, initial-scale=1.0"}
%title
=t(".report_title")
= stylesheet_link_tag "libs", media: "all"
= stylesheet_link_tag "application", media: "all"
%link{href: "/favicon.ico", rel: "shortcut icon"}
%body
.container
.row.exports
= t("reports.download")
= link_to 'CSV', url_for(params.merge(format: :csv))
= link_to 'PDF', url_for(params.merge(format: :pdf))
= yield
+59
View File
@@ -0,0 +1,59 @@
<h1>
<%= Offer.model_name.human(count: :many) %>
<%= render "shared/show_filter_hint" %>
</h1>
<div class="navbar">
<form action="<%= offers_path %>"
class="navbar-form navbar-left"
method="get"
role="search">
<div class="form-group">
<input class="form-control"
name="q"
placeholder="<%= t "global.search" %>"
type="text"
value="<%= params[:q] %>">
</div>
<button class="btn btn-default" type="submit">
<%= t("global.search") %>
</button>
</form>
<ul class="nav navbar-nav">
<li class="dropdown">
<a class="dropdown-toggle" href="#">
<%= @category ? @category.name : Category.model_name.human %>
<span class="caret"></span>
</a>
<ul class="dropdown-menu" role="menu">
<li>
<%= link_to "× #{t "global.all"}", offers_path %>
</li>
<% Category.all.sort_by { |a| a.name.downcase }.each do |c| %>
<% next if c == @category %>
<li>
<%= link_to c.name, offers_path(cat: c.id) %>
</li>
<% end %>
</ul>
</li>
</ul>
<ul class="nav navbar-nav pull-right">
<li>
<%= link_to new_offer_path do %>
<%= glyph :plus %>
<%= t "helpers.submit.create", model: Offer.model_name.human %>
<% end %>
</li>
</ul>
</div>
<% @offers.each do |cat, offs| %>
<div class="offers">
<h3>
<%= cat.name.capitalize %>
</h3>
<%= render 'shared/posts', posts: offs %>
</div>
<%= link_to offers_path(cat: cat.id), class: "more btn btn-primary" do %>
<%= t('global.more') %>
<% end %>
<% end %>
-34
View File
@@ -1,34 +0,0 @@
%h1
= Offer.model_name.human(count: :many)
= render("/shared/show_filter_hint.html.haml")
.navbar
%form.navbar-form.navbar-left{action: offers_path, role: "search", method: "get"}
.form-group
%input.form-control{type: "text", placeholder: t("global.search"), name: "q", value: params[:q]}
%button.btn.btn-default{type: "submit"}= t("global.search")
%ul.nav.navbar-nav
%li.dropdown
%a.dropdown-toggle{href: "#"}
= @category ? @category.name : Category.model_name.human
%span.caret
%ul.dropdown-menu{role: "menu"}
%li= link_to "× #{t("global.all")}", offers_path
- Category.all.sort_by{ |a| a.name.downcase }.each do |c|
- next if c == @category
%li= link_to c.name, offers_path(cat: c.id)
%ul.nav.navbar-nav.pull-right
%li
%a{href: new_offer_path}
%span.glyphicon.glyphicon-plus
= t "helpers.submit.create", model: Offer.model_name.human
- @offers.each do |cat, offs|
.offers
%h3=cat.name.capitalize
= render :partial => 'shared/posts', :locals => { :posts => offs }
= link_to t('global.more'), offers_path(cat: cat.id), :class=>"more btn btn-primary"
+5
View File
@@ -0,0 +1,5 @@
<h1>
<%= @offer.title %>
<small><%= t ".edit" %></small>
</h1>
<%= render 'shared/post_form', post: @offer, label_button: t(".submit") %>
-6
View File
@@ -1,6 +0,0 @@
%h1
= @offer.title
%small
= t ".edit"
= render partial: 'shared/post_form', locals: { post: @offer, label_button: t(".submit") }
+55
View File
@@ -0,0 +1,55 @@
<h1>
<% @category = Category.where(id: params[:cat]).first %>
<%= Offer.model_name.human(count: :many) %>
<%= render "shared/show_filter_hint" %>
</h1>
<div class="navbar">
<form action="<%= offers_path %>"
class="navbar-form navbar-left"
method="get"
role="search">
<div class="form-group">
<input class="form-control"
name="q"
placeholder="<%= t 'global.search' %>"
type="text"
value="<%= params[:q] %>">
</div>
<button class="btn btn-default" type="submit">
<%= t 'global.search' %>
</button>
</form>
<ul class="nav navbar-nav">
<li class="dropdown">
<a class="dropdown-toggle" href="#">
<%= @category ? @category.name : Category.model_name.human %>
<span class="caret"></span>
</a>
<ul class="dropdown-menu" role="menu">
<li>
<%= link_to "× #{t 'global.all'}", dashboard_offers_path %>
</li>
<% Category.all.sort_by { |a| a.name.downcase }.each do |c| %>
<% next if c == @category %>
<li>
<%= link_to c.name, offers_path(cat: c.id) %>
</li>
<% end %>
</ul>
</li>
</ul>
<% if current_user && current_organization && !params[:org] %>
<ul class="nav navbar-nav pull-right">
<li>
<%= link_to new_offer_path do %>
<%= glyph :plus %>
<%= t "helpers.submit.create", model: Offer.model_name.human %>
<% end %>
</li>
</ul>
<% end %>
</div>
<div class="offers">
<%= render "shared/posts", posts: @offers %>
</div>
<%= paginate @offers %>
-35
View File
@@ -1,35 +0,0 @@
%h1
- @category = Category.where(id: params[:cat]).first
= Offer.model_name.human(count: :many)
= render("/shared/show_filter_hint.html.haml")
.navbar
%form.navbar-form.navbar-left{action: offers_path, role: "search",
method: "get"}
.form-group
%input.form-control{type: "text", placeholder: t("global.search"),
name: "q", value: params[:q]}
%button.btn.btn-default{type: "submit"}= t("global.search")
%ul.nav.navbar-nav
%li.dropdown
%a.dropdown-toggle{href: "#"}
= @category ? @category.name : Category.model_name.human
%span.caret
%ul.dropdown-menu{role: "menu"}
%li= link_to "× #{t("global.all")}", dashboard_offers_path
- Category.all.sort_by { |a| a.name.downcase }.each do |c|
- next if c == @category
%li= link_to c.name, offers_path(cat: c.id)
- if current_user && current_organization && !params[:org]
%ul.nav.navbar-nav.pull-right
%li
%a{href: new_offer_path}
%span.glyphicon.glyphicon-plus
= t "helpers.submit.create", model: Offer.model_name.human
.offers
= render partial: "shared/posts", locals: { posts: @offers }
= paginate @offers
+2
View File
@@ -0,0 +1,2 @@
$(".offers").append("<%= j render('shared/posts', posts: @offers) %>");
$(".offers ~ a[rel=next]").replaceWith("<%= j link_to_next_page(@offers, t('.more'), remote: true, params: params) %>");
-2
View File
@@ -1,2 +0,0 @@
$('.offers').append('#{escape_javascript(render partial: "shared/posts", :locals => { :posts => @offers })}');
$('.offers ~ a[rel=next]').replaceWith('#{link_to_next_page @offers, t('.more'), remote: true, params: params}');
+4
View File
@@ -0,0 +1,4 @@
<h1>
<%= t "helpers.submit.create", model: @offer.class.model_name.human %>
</h1>
<%= render 'shared/post_form', post: @offer, label_button: t(".submit") %>
-3
View File
@@ -1,3 +0,0 @@
%h1= t "helpers.submit.create", model: @offer.class.model_name.human
= render partial: 'shared/post_form', locals: {post: @offer, label_button: t(".submit") }
+22
View File
@@ -0,0 +1,22 @@
<p class="actions text-right">
<% if admin? or @offer.user == current_user %>
<%= link_to edit_offer_path(@offer), class: "btn btn-warning" do %>
<%= glyph :pencil %>
<%= t "global.edit" %>
<% end %>
<%= link_to @offer,
data: { method: :DELETE, confirm: "sure?" },
class: "btn btn-danger" do %>
<%= glyph :trash %>
<%= t "global.delete" %>
<% end %>
<% end %>
<% if current_user and @offer.user != current_user %>
<%= link_to give_time_user_path(@offer.user, offer: @offer.id),
class: "btn btn-success" do %>
<%= glyph :time %>
<%= t ".give_time_for" %>
<% end %>
<% end %>
</p>
<%= render "shared/post", post: @offer %>
-16
View File
@@ -1,16 +0,0 @@
= render "shared/post", post: @offer
%p.actions
- if admin? or @offer.user == current_user
= link_to edit_offer_path(@offer), class: "btn btn-warning" do
= glyph :pencil
= t "global.edit"
= link_to @offer, data: {method: :DELETE, confirm: "sure?" }, :class => "btn btn-danger" do
= glyph :trash
= t "global.delete"
- if current_user and @offer.user != current_user
= link_to(give_time_user_path(@offer.user, offer: @offer.id), {:class => "btn btn-success"}) do
= glyph(:time)
= t ".give_time_for"
+12
View File
@@ -0,0 +1,12 @@
<%= simple_form_for @organization do |f| %>
<%= f.input :name %>
<%= f.input :email %>
<%= f.input :phone %>
<%= f.input :web %>
<%= f.input :description %>
<%= f.input :public_opening_times %>
<%= f.input :address %>
<%= f.input :neighborhood %>
<%= f.input :city %>
<%= f.button :submit %>
<% end %>
-11
View File
@@ -1,11 +0,0 @@
= simple_form_for @organization do |f|
= f.input :name
= f.input :email
= f.input :phone
= f.input :web
= f.input :description
= f.input :public_opening_times
= f.input :address
= f.input :neighborhood
= f.input :city
= f.button :submit
+12
View File
@@ -0,0 +1,12 @@
<% if @organization.errors.present? %>
<% @organization.errors.full_messages.each do |msg| %>
<div class="alert alert-danger" role="alert">
<%= msg %>
</div>
<% end %>
<% end %>
<h1>
<%= link_to @organization, organization_path(@organization) %>
<small><%= t 'global.edit' %></small>
</h1>
<%= render 'form' %>
-9
View File
@@ -1,9 +0,0 @@
- if @organization.errors.size > 0
- @organization.errors.full_messages.each do |msg|
.alert.alert-danger{:role=> "alert"}
=msg
%h1
= link_to @organization, organization_path(@organization)
%small= t "global.edit"
= render partial: "form"
@@ -0,0 +1,63 @@
<h1>
<small><%= t '.give_time' %></small>
<%= link_to @organization, organization_path(@organization) %>
</h1>
<% if @offer %>
<h3>
<%= @offer %>
</h3>
<% end %>
<%= simple_form_for @transfer do |f| %>
<div class="form-inputs">
<%= f.input :hours,
as: :integer,
input_html: {
min: 0,
max: 20,
'data-rule-either-hours-minutes-informed' => 'true',
'data-rule-range' => '[0,20]'
} %>
<%= f.input :minutes,
as: :integer,
input_html: {
min: 0,
max: 59,
step: 15,
'data-rule-either-hours-minutes-informed' => 'true',
'data-rule-range' => '[0,59]'
} %>
<%= f.input :amount, as: :hidden %>
<%= f.input :reason %>
<%= f.input :destination, as: :hidden %>
<% if admin? %>
<div class="form-group">
<%= f.label :source %>
<%# TODO: refactor. it's very complex for a view. %>
<%= f.select :source,
options_for_select(
@sources.sort_by { |source| [source.accountable_type, source.accountable_id] }
.map { |a| ["#{a.accountable_type == 'Member' ? a.accountable.member_uid : a.accountable_id} #{a.accountable_type} #{a.accountable.to_s}", a.id] },
selected: current_user.member(current_organization).account.id
),
{},
id: 'select2-time',
class: 'form-control' %>
</div>
<% end %>
<% if @offer %>
<%= f.input :post, as: :hidden %>
<% end %>
</div>
<div class="form-actions">
<%= f.button :submit,
class: 'btn btn-default',
style: 'margin-bottom: 20px;' %>
</div>
<% end %>
<script>
$("#select2-time").select2({
formatNoMatches: function () {
return "<%= j t('application.tips.user_not_found') %>";
}
});
</script>
@@ -1,30 +0,0 @@
%h1
%small= t ".give_time"
= link_to @organization, organization_path(@organization)
- if @offer
%h3= @offer
= simple_form_for @transfer do |f|
.form-inputs
= f.input :hours, as: :integer, input_html: { min: 0, max: 20, "data-rule-either-hours-minutes-informed" => "true", "data-rule-range" => "[0,20]"}
= f.input :minutes, as: :integer, input_html: { min: 0, max: 59, step: 15, "data-rule-either-hours-minutes-informed" => "true", "data-rule-range" => "[0,59]"}
= f.input :amount, as: :hidden
= f.input :reason
= f.input :destination, as: :hidden
- if admin?
.form-group
= f.label :source
= f.select :source, options_for_select(@sources.sort_by{ |source| [source.accountable_type, source.accountable_id]}.map{ |a| ["#{a.accountable_type == "Member" ? a.accountable.member_uid : a.accountable_id} #{a.accountable_type} #{a.accountable.to_s}", a.id]}, selected: current_user.member(current_organization).account.id), {}, { id: "select2-time", class: "form-control" }
- if @offer
= f.input :post, as: :hidden
.form-actions
= f.button :submit, class: "btn btn-default", style: "margin-bottom: 20px;"
:javascript
$("#select2-time").select2({
formatNoMatches: function() {
return "#{t 'application.tips.user_not_found'}";
}
})
+46
View File
@@ -0,0 +1,46 @@
<h1>
<%= Organization.model_name.human(count: :many) %>
</h1>
<ul class="nav nav-pills">
<% if superadmin? %>
<li>
<%= link_to new_organization_path do %>
<%= glyph :plus %>
<%= t 'global.add_new' %>
<% end %>
</li>
<% end %>
</ul>
<table class="table table-hover table-condensed">
<thead>
<tr>
<th><%= Organization.model_name.human(count: :one) %></th>
<th><%= t '.member_count' %></th>
<th><%= glyph :wrench %><%= t 'global.table.actions' %></th>
</tr>
</thead>
<tbody>
<% @organizations.each do |org| %>
<tr>
<td><%= link_to org.name, org %></td>
<td><%= org.users.count %></td>
<td class="hover-actions">
<% if current_user.admins?(org) %>
<%= link_to edit_organization_path(org), class: 'action' do %>
<%= glyph :pencil %>
<%= t 'global.edit' %>
<% end %>
<%= link_to organization_path(org),
data: { method: :delete },
class: 'action' do %>
<%= glyph :trash %>
<%= t 'global.borrar' %>
<% end %>
<% end %>
</td>
</tr>
<% end %>
</tbody>
</table>
-34
View File
@@ -1,34 +0,0 @@
%h1
= Organization.model_name.human(count: :many)
%ul.nav.nav-pills
- if superadmin?
%li
%a{href: new_organization_path}
%span.glyphicon.glyphicon-plus
= t 'global.add_new'
%table.table.table-hover.table-condensed
%thead
%tr
%th= Organization.model_name.human(count: :one)
%th= t ".member_count"
%th
%span.glyphicon.glyphicon-wrench
= t "global.table.actions"
%tbody
- @organizations.each do |org|
%tr
%td
= link_to(org.name, org)
%td
= org.users.count
%td.hover-actions
- if current_user.admins?(org)
%a.action{href: edit_organization_path(org)}
%span.glyphicon.glyphicon-pencil
= t "global.edit"
%a.action{href: organization_path(org), data: {method: :delete}}
%span.glyphicon.glyphicon-trash
= t "global.borrar"
+4
View File
@@ -0,0 +1,4 @@
<h1>
<%= t '.new' %>
</h1>
<%= render 'form' %>
-3
View File
@@ -1,3 +0,0 @@
%h1
= t ".new"
= render partial: "form"
+124
View File
@@ -0,0 +1,124 @@
<h1>
<%= link_to @organization, organization_path(@organization) %>
</h1>
<div class="row">
<div class="col-sm-4">
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">
<%= t '.contact_information' %>
</h3>
</div>
<div class="panel-body">
<p>
<strong>
<%= Organization.human_attribute_name 'email' %>
</strong>
<%= @organization.email %>
<br/>
<strong>
<%= Organization.human_attribute_name 'phone' %>
</strong>
<%= @organization.phone %>
<br/>
<strong>Web</strong>
<%= link_to_if @organization.web.present?,
@organization.web,
@organization.web %>
<br/>
<strong>
<%= Organization.human_attribute_name 'public_opening_times' %>
</strong>
<br/>
<%= @organization.public_opening_times %>
<br/>
<strong>
<%= Organization.human_attribute_name 'address' %>
</strong>
<%= @organization.address %>
<br/>
<strong>
<%= Organization.human_attribute_name 'neighborhood' %>
</strong>
<%= @organization.neighborhood %>
<br/>
<strong>
<%= Organization.human_attribute_name 'city' %>
</strong>
<%= @organization.city %>
</p>
</div>
</div>
</div>
<div class="col-sm-3">
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">
<%= t 'global.information' %>
</h3>
</div>
<div class="panel-body">
<p>
<strong>
<%= Organization.human_attribute_name 'created_at' %>
</strong>
<%= l @organization.created_at, format: :long %>
<br/>
<strong>
<%= Organization.human_attribute_name 'updated_at' %>
</strong>
<%= l @organization.updated_at, format: :long %>
<br/>
<strong>
<%= t 'global.member_count' %>
</strong>
<%= @organization.members.count %>
<br/>
<strong>
<%= t 'global.balance' %>
</strong>
<%= seconds_to_hm(@organization.account.try(:balance) || '—') %>
</p>
</div>
</div>
</div>
<div class="col-sm-5">
<ul class="nav nav-pills pull-right">
<% if superadmin? %>
<li>
<%= link_to organizations_path do %>
<%= glyph :hand_left %>
<%= t 'global.back' %>
<% end %>
</li>
<% end %>
<% if admin? %>
<li>
<%= link_to edit_organization_path(@organization) do %>
<%= glyph :pencil %>
<%= t "global.edit" %>
<% end %>
</li>
<% end %>
<% if superadmin? %>
<li>
<%= link_to organization_path(@organization),
data: { method: :delete, confirm: t("are_you_sure") } do %>
<%= glyph :trash %>
<%= t "global.delete" %>
<% end %>
</li>
<% end %>
<li>
<%= link_to give_time_organization_path(@organization) do %>
<%= glyph :time %>
<%= t "global.give_time" %>
<% end %>
</li>
</ul>
</div>
</div>
<% if current_user %>
<%= render "shared/movements" %>
<% end %>
-71
View File
@@ -1,71 +0,0 @@
%h1
= link_to @organization, organization_path(@organization)
.row
.col-sm-4
.panel.panel-default
.panel-heading
%h3.panel-title= t ".contact_information"
.panel-body
%p
%strong= Organization.human_attribute_name("email")
= @organization.email
%br
%strong= Organization.human_attribute_name("phone")
= @organization.phone
%br
%strong Web
=link_to_if(@organization.web.present?,@organization.web,@organization.web)
%br
%strong= Organization.human_attribute_name("public_opening_times")
%br
= @organization.public_opening_times
%br
%strong= Organization.human_attribute_name("address")
= @organization.address
%br
%strong= Organization.human_attribute_name("neighborhood")
= @organization.neighborhood
%br
%strong= Organization.human_attribute_name("city")
= @organization.city
.col-sm-3
.panel.panel-default
.panel-heading
%h3.panel-title= t "global.information"
.panel-body
%p
%strong= Organization.human_attribute_name("created_at")
= l(@organization.created_at, format: :long)
%br
%strong= Organization.human_attribute_name("updated_at")
= l(@organization.updated_at, format: :long)
%br
%strong= t "global.member_count"
= @organization.members.count
%br
%strong= t "global.balance"
= seconds_to_hm(@organization.account.try(:balance) || mdash)
.col-sm-5
%ul.nav.nav-pills.pull-right
- if superadmin?
%li
%a{href: organizations_path}
%span.glyphicon.glyphicon-hand-left
= t 'global.back'
- if admin?
%li
%a{href: edit_organization_path(@organization)}
%span.glyphicon.glyphicon-pencil
= t "global.edit"
- if superadmin?
%li
%a{href: organization_path(@organization), data: {method: :DELETE, confirm: t("are_you_sure") }}
%span.glyphicon.glyphicon-trash
= t "global.delete"
%li
%a{href: give_time_organization_path(@organization)}
%span.glyphicon.glyphicon-time
= t "global.give_time"
- if current_user
= render "shared/movements"
+97
View File
@@ -0,0 +1,97 @@
<%= content_for :window_title do %>
TimeOverflow - Gestió on-line de Bancs de Temps
<% end %>
<div class="container-inner">
<% if current_user and !current_organization %>
<%= render 'organization_list' %>
<% end %>
<div class="row">
<div class="col-sm-6">
<div class="text-center">
<h1>TimeOverflow</h1>
<%= image_tag "sand-clock.png", width: 50 %>
<h2>El software disenyat per i per als Bancs de Temps</h2>
<em>TimeOverflow és lliure, gratuït i col·laboratiu</em>
</div>
<div class="text-left" style="margin-top: 40px;">
<p>Funcionalitats de <strong>TimeOverflow</strong>:</p>
<ul>
<li>
Gestió del Banc de Temps amb perfils d'administració
<ul>
<li>Altes/baixes/modificacions de membres</li>
<li>Publicar ofertes i demandes</li>
<li>Introduir xecs i gestionar la comptabilitat</li>
</ul>
</li>
<li>
Xarxa social i banca en línia accessible pels membres
<ul>
<li>Els membres d'un Banc de Temps poden accedir al sistema i
contactar amb altres membres</li>
<li>Publicar ofertes i demandes</li>
<li>Pagar hores a altres membres</li>
</ul>
</li>
</ul>
</div>
<h2>Ets un Banc de Temps?</h2>
<div class="text-center">
<a class="btn btn-primary btn-large"
href="http://adbdt.org/ca/contacta/"
style="font-size:30px;margin-top:20px;">
Sol·licita accés a TimeOverflow
</a>
</div>
<div class="text-center">
<p>
<em>(ens posarem en contacte amb tu per posar-lo en marxa o fer-vos
una demostració)</em>
</p>
</div>
</div>
<div class="col-sm-6">
<div class="text-center">
<h2>Ja ets membre d'un Banc de Temps que fa servir TimeOverflow?</h2>
<a class="btn btn-primary btn-large"
href="<%= new_user_session_path %>"
style="font-size:30px;margin-top:20px;">
Entra aquí
</a>
</div>
<p></p>
<p>Si ets una persona interessada a participar en un Banc de Temps,
busca el teu Banc de Temps més proper a
<a href="http://www.bdtonline.org" title="Bancs de Temps">bdtonline.org</a>.
</p>
<p></p>
<%= image_tag "oferta.png", class: "img-responsive center-block" %>
<h2>Internet potencia els Bancs de Temps</h2>
<p>TimeOveflow està especialment dissenyat <strong>per i per als Bancs de Temps</strong>
que existeixen físicament(<a href="http://www.bdtonline.org" title="Bancs de Temps">veure mapa</a>),
la seva fi és potenciar gràcies a Internet.
</p>
<p>Gràcies al treball conjunt de <a href="https://github.com/coopdevs">CoopDevs</a>
i la <a href="http://adbdt.org/ca" title="Associació per al Desenvolupament dels Bancs de Temps">ADBdT</a>
avui podem oferir el sofware <strong>TimeOverflow</strong> a tots els Bancs de
Temps que així ho desitgin de manera lliure i gratuïta.
</p>
<p>El codi font de TimeOverflow està disponible sota una llicència
open source, ja es pot descarregar a
<a href="https://github.com/coopdevs/timeoverflow">https://github.com/coopdevs/timeoverflow</a>
</p>
<div class="text-center">
<%= link_to image_tag("github.png", alt: "Github logo", height: 30),
"https://github.com/coopdevs/timeoverflow",
title: "TimeOverflow Github" %>
</div>
</div>
</div>
</div>
-66
View File
@@ -1,66 +0,0 @@
= content_for :window_title do
TimeOverflow - Gestió on-line de Bancs de Temps
.container-inner
- if current_user and !current_organization
= render 'organization_list'
.row
.col-sm-6
.text-center
%h1 TimeOverflow
= image_tag "sand-clock.png", width: 50
%h2 El software disenyat per i per als Bancs de Temps
%em TimeOverflow és lliure, gratuït i col·laboratiu
.text-left{style: "margin-top: 40px;"}
:markdown
Funcionalitats de **TimeOverflow**:
* Gestió del Banc de Temps amb perfils d'administració
* Altes/baixes/modificacions de membres
* Publicar ofertes i demandes
* Introduir xecs i gestionar la comptabilitat
* Xarxa social i banca en línia accessible pels membres
* Els membres d'un Banc de Temps poden accedir al sistema i contactar amb altres membres
* Publicar ofertes i demandes
* Pagar hores a altres membres
%h2 Ets un Banc de Temps?
.text-center
%a.btn.btn-primary.btn-large{href: "http://adbdt.org/ca/contacta/", style:"font-size:30px;margin-top:20px;"}
Sol·licita accés a TimeOverflow
.text-center
%p
%em (ens posarem en contacte amb tu per posar-lo en marxa o fer-vos una demostració)
.col-sm-6
.text-center
%h2 Ja ets membre d'un Banc de Temps que fa servir TimeOverflow?
%a.btn.btn-primary.btn-large{href: new_user_session_path, style:"font-size:30px;margin-top:20px;"}
Entra aquí
%p
:markdown
Si ets una persona interessada a participar en un Banc de Temps,
busca el teu Banc de Temps més proper a
[bdtonline.org](http://www.bdtonline.org "Bancs de Temps").
= image_tag "oferta.png", class: "img-responsive center-block"
%h2 Internet potencia els Bancs de Temps
:markdown
TimeOveflow està especialment dissenyat ** per i per als Bancs de Temps **
que existeixen físicament([veure mapa](http://www.bdtonline.org "Bancs de Temps")),
la seva fi és potenciar gràcies a Internet.
Gràcies al treball conjunt de [CoopDevs](https://github.com/coopdevs)
i la [ADBdT](http://adbdt.org/ca "Associació per al Desenvolupament dels Bancs de Temps")
avui podem oferir el sofware **TimeOverflow** a tots els Bancs de
Temps que així ho desitgin de manera lliure i gratuïta.
El codi font de TimeOverflow està disponible sota una llicència
open source, ja es pot descarregar a [https://github.com/coopdevs/timeoverflow](https://github.com/coopdevs/timeoverflow)
.text-center
= link_to "https://github.com/coopdevs/timeoverflow", title: "TimeOverflow Github" do
= image_tag("github.png", alt: "Github logo", height: 30)
+100
View File
@@ -0,0 +1,100 @@
<%= content_for :window_title do %>
TimeOverflow - Time Bank on-line management
<% end %>
<div class="container-inner">
<div class="row">
<div class="col-sm-6">
<div class="text-center">
<h1>TimeOverflow</h1>
<%= image_tag "sand-clock.png", width: 50 %>
<h2>The software designed by and for Time Banks</h2>
<em>TimeOverflow is open source, free and collaborative</em>
</div>
<div class="text-left" style="margin-top: 40px;">
<p>Features of
<strong>TimeOverflow</strong>:</p>
<ul>
<li>
Time Bank management with administration roles
<ul>
<li>Creation/deletion/updates of bank members</li>
<li>Posting of offers and inquiries</li>
<li>Enter checks and manage accounting</li>
</ul>
</li>
<li>
Social network and online banking accessible by members
<ul>
<li>Members of a Time Bank can access the system and connect with other members</li>
<li>Posting of offers and inquiries</li>
<li>Pay hours to other members</li>
</ul>
</li>
</ul>
</div>
<h2>Are you a Time Bank?</h2>
<div class="text-center">
<a
class="btn btn-primary btn-large"
href="http://adbdt.org/contacta/"
style="font-size:30px; margin-top:20px;">
Request access to TimeOverflow
</a>
</div>
<div class="text-center">
<p>
<em>(We will contact you to start it up or make you a demonstration)</em>
</p>
</div>
</div>
<div class="col-sm-6">
<div class="text-center">
<h2>Already a member of a Time Bank that uses TimeOverflow?</h2>
<a
class="btn btn-primary btn-large"
href="<%= new_user_session_path %>"
style="font-size:30px; margin-top:20px;">
Click here
</a>
</div>
<p></p>
<p>If you are a person interested in participating in a Time Bank, find your
closest Time Bank at
<a href="http://www.bdtonline.org" title="Bancos de Tiempo">bdtonline.org</a>.
</p>
<p></p>
<%= image_tag "oferta.png", class: "img-responsive center-block" %>
<h2>Internet enhances Time Banks activity</h2>
<p>TimeOveflow is specially designed
<strong>for and by Time Banks</strong>
that physically exist (<a href="http://www.bdtonline.org" title="Bancos de Tiempo">see map</a>), and its purpose is to boost them thanks to Internet.
</p>
<p>Thanks to the joint job of
<a href="https://github.com/coopdevs">CoopDevs</a>
and
<a
href="http://adbdt.org"
title="Association for the Development of Time Banks">ADBdT</a>
today we can offer the software
<strong>TimeOverflow</strong>
to all Time Banks that want it, open and for free.
</p>
<p>The source code of TimeOverflow is available based on an open source license
and you can download it at
<a href="https://github.com/coopdevs/timeoverflow">https://github.com/coopdevs/timeoverflow</a>
</p>
<div class="text-center">
<%= link_to image_tag("github.png", alt: "Github logo", height: 30),
"https://github.com/coopdevs/timeoverflow",
title: "TimeOverflow Github" %>
</div>
</div>
</div>
</div>
-66
View File
@@ -1,66 +0,0 @@
= content_for :window_title do
TimeOverflow - Time Bank on-line management
.container-inner
- if current_user and !current_organization
= render 'organization_list'
.row
.col-sm-6
.text-center
%h1 TimeOverflow
= image_tag "sand-clock.png", width: 50
%h2 The software designed by and for Time Banks
%em TimeOverflow is open source, free and collaborative
.text-left{style: "margin-top: 40px;"}
:markdown
Features of **TimeOverflow**:
* Time Bank management with administration roles
* Creation/deletion/updates of bank members
* Posting of offers and inquiries
* Enter checks and manage accounting
* Social network and online banking accessible by members
* Members of a Time Bank can access the system and connect with other members
* Posting of offers and inquiries
* Pay hours to other members
%h2 Are you a Time Bank?
.text-center
%a.btn.btn-primary.btn-large{href: "http://adbdt.org/contacta/", style:"font-size:30px;margin-top:20px;"}
Request access to TimeOverflow
.text-center
%p
%em (We will contact you to start it up or make you a demonstration)
.col-sm-6
.text-center
%h2 Already a member of a Time Bank that uses TimeOverflow?
%a.btn.btn-primary.btn-large{href: new_user_session_path, style:"font-size:30px;margin-top:20px;"}
Click here
%p
:markdown
If you are a person interested in participating in a Time Bank,
find your closest Time Bank at
[bdtonline.org](http://www.bdtonline.org "Bancos de Tiempo").
= image_tag "oferta.png", class: "img-responsive center-block"
%h2 Internet enhances Time Banks activity
:markdown
TimeOveflow is specially designed **for and by Time Banks**
that physically exist ([see map](http://www.bdtonline.org "Bancos de Tiempo")),
and its purpose is to boost them thanks to Internet.
Thanks to the joint job of [CoopDevs](https://github.com/coopdevs)
and [ADBdT](http://adbdt.org "Association for the Development of Time Banks")
today que can offer the software **TimeOverflow** to all Time Banks
that want it, open and for free.
The source code of TimeOverflow is available based on an open source
license and you can download it at [https://github.com/coopdevs/timeoverflow](https://github.com/coopdevs/timeoverflow)
.text-center
= link_to "https://github.com/coopdevs/timeoverflow", title: "TimeOverflow Github" do
= image_tag("github.png", alt: "Github logo", height: 30)
+91
View File
@@ -0,0 +1,91 @@
<div class="container-inner">
<div class="row">
<div class="col-sm-6">
<div class="text-center">
<h1>TimeOverflow</h1>
<%= image_tag "sand-clock.png", width: 50 %>
<h2>El software diseñado por y para los Bancos de Tiempo</h2>
<em>TimeOverflow es libre, gratuito y colaborativo</em>
</div>
<div class="text-left" style="margin-top: 40px;">
<p>Funcionalidades de
<strong>TimeOverflow</strong>:</p>
<ul>
<li>
Gestión del Banco de Tiempo con perfiles de administración
<ul>
<li>Altas/bajas/modificaciones de miembros</li>
<li>Publicar ofertas y demandas</li>
<li>Introducir cheques y gestionar la contabilidad</li>
</ul>
</li>
<li>
Red social y banca on-line accesible por los miembros
<ul>
<li>Los miembros de un Banco de Tiempo pueden acceder al sistema
y contactar con otros miembros</li>
<li>Publicar ofertas y demandas</li>
<li>Pagar horas a otros miembros</li>
</ul>
</li>
</ul>
</div>
<h2>¿Eres un Banco de Tiempo?</h2>
<div class="text-center">
<a class="btn btn-primary btn-large"
href="http://adbdt.org/contacta/"
style="font-size:30px;margin-top:20px;">
Solicita acceso a TimeOverflow
</a>
</div>
<div class="text-center">
<p>
<em>(nos pondremos en contacto contigo para ponerlo en marcha o haceros una
demostración)</em>
</p>
</div>
</div>
<div class="col-sm-6">
<div class="text-center">
<h2>¿Ya eres miembro de un Banco de Tiempo que usa TimeOverflow?</h2>
<a class="btn btn-primary btn-large"
href="<%= new_user_session_path %>"
style="font-size:30px;margin-top:20px;">
Entra aquí
</a>
</div>
<p></p>
<p>Si eres una persona interesada en participar en un Banco de Tiempo, busca tu
Banco de Tiempo más cercano en
<a href="http://www.bdtonline.org" title="Bancos de Tiempo">bdtonline.org</a>.</p>
<p></p>
<%= image_tag "oferta.png", class: "img-responsive center-block" %>
<h2>Internet potencia los Bancos de Tiempo</h2>
<p>TimeOveflow está especialmente diseñado
<strong>por y para los Bancos de Tiempo</strong>
que existen físicamente (<a href="http://www.bdtonline.org" title="Bancos de Tiempo">ver mapa</a>), su fin es potenciarlos gracias a Internet.</p>
<p>Gracias al trabajo conjunto de
<a href="https://github.com/coopdevs">CoopDevs</a>
y la
<a
href="http://adbdt.org"
title="Asociación para el Desarrollo de los Bancos de Tiempo">ADBdT</a>
hoy podemos ofrecer el sofware
<strong>TimeOverflow</strong>
a todos los Bancos de Tiempo que así lo deseen de manera libre y gratuita.</p>
<p>El código fuente de TimeOverflow está disponible bajo una licencia open
source, ya se puede descargar en
<a href="https://github.com/coopdevs/timeoverflow">https://github.com/coopdevs/timeoverflow</a>
</p>
<div class="text-center">
<%= link_to image_tag("github.png", alt: "Github logo", height: 30),
"https://github.com/coopdevs/timeoverflow",
title: "TimeOverflow Github" %>
</div>
</div>
</div>
</div>
-66
View File
@@ -1,66 +0,0 @@
= content_for :window_title do
TimeOverflow - Gestión on-line de Bancos de Tiempo
.container-inner
- if current_user and !current_organization
= render 'organization_list'
.row
.col-sm-6
.text-center
%h1 TimeOverflow
= image_tag "sand-clock.png", width: 50
%h2 El software diseñado por y para los Bancos de Tiempo
%em TimeOverflow es libre, gratuito y colaborativo
.text-left{style: "margin-top: 40px;"}
:markdown
Funcionalidades de **TimeOverflow**:
* Gestión del Banco de Tiempo con perfiles de administración
* Altas/bajas/modificaciones de miembros
* Publicar ofertas y demandas
* Introducir cheques y gestionar la contabilidad
* Red social y banca on-line accesible por los miembros
* Los miembros de un Banco de Tiempo pueden acceder al sistema y contactar con otros miembros
* Publicar ofertas y demandas
* Pagar horas a otros miembros
%h2 ¿Eres un Banco de Tiempo?
.text-center
%a.btn.btn-primary.btn-large{href: "http://adbdt.org/contacta/", style:"font-size:30px;margin-top:20px;"}
Solicita acceso a TimeOverflow
.text-center
%p
%em (nos pondremos en contacto contigo para ponerlo en marcha o haceros una demostración)
.col-sm-6
.text-center
%h2 ¿Ya eres miembro de un Banco de Tiempo que usa TimeOverflow?
%a.btn.btn-primary.btn-large{href: new_user_session_path, style:"font-size:30px;margin-top:20px;"}
Entra aquí
%p
:markdown
Si eres una persona interesada en participar en un Banco de Tiempo,
busca tu Banco de Tiempo más cercano en
[bdtonline.org](http://www.bdtonline.org "Bancos de Tiempo").
= image_tag "oferta.png", class: "img-responsive center-block"
%h2 Internet potencia los Bancos de Tiempo
:markdown
TimeOveflow está especialmente diseñado **por y para los Bancos de Tiempo**
que existen físicamente ([ver mapa](http://www.bdtonline.org "Bancos de Tiempo")),
su fin es potenciarlos gracias a Internet.
Gracias al trabajo conjunto de [CoopDevs](https://github.com/coopdevs)
y la [ADBdT](http://adbdt.org "Asociación para el Desarrollo de los Bancos de Tiempo")
hoy podemos ofrecer el sofware **TimeOverflow** a todos los Bancos de
Tiempo que así lo deseen de manera libre y gratuita.
El código fuente de TimeOverflow está disponible bajo una licencia
open source, ya se puede descargar en [https://github.com/coopdevs/timeoverflow](https://github.com/coopdevs/timeoverflow)
.text-center
= link_to "https://github.com/coopdevs/timeoverflow", title: "TimeOverflow Github" do
= image_tag("github.png", alt: "Github logo", height: 30)

Some files were not shown because too many files have changed in this diff Show More