diff --git a/.gitignore b/.gitignore index 5cc51978774..339f1eb5e4b 100644 --- a/.gitignore +++ b/.gitignore @@ -22,3 +22,6 @@ /config/deploy-secrets.yml /coverage + +# Mac finder artifacts +.DS_Store diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index af11c122be5..70c71142583 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -27,6 +27,7 @@ Cuando quieras resolver una incidencia mediante código: * Crea una rama para resolver la incidencia desde la rama `master` * Añade el código necesario para resolver la incidencia en tantos commits como sea preciso * Asegúrate de que los tests pasan (y escribe más tests para probar la nueva funcionalidad si fuera preciso) +* Sigue estas [buenas prácticas](https://github.com/styleguide/ruby) * Envía una *pull request* al repositorio principal indicando la incidencia que se está arreglando ## Otras formas de contribuir sin código diff --git a/CONTRIBUTING_EN.md b/CONTRIBUTING_EN.md index 26e08fc119b..9d51a34da7e 100644 --- a/CONTRIBUTING_EN.md +++ b/CONTRIBUTING_EN.md @@ -27,6 +27,7 @@ If you want to contribute code to solve an issue: * Create a topic branch based on master. * Commit there your code to solve the issue. * Make sure all test are passing (and add specs to test any new feature if needed). +* Follow these [best practices](https://github.com/styleguide/ruby) * Open a *pull request* to the main repository describing what issue you are addressing. ## Other ways of contributing without coding diff --git a/Capfile b/Capfile index b565fae2363..17e03a6f89d 100644 --- a/Capfile +++ b/Capfile @@ -6,9 +6,11 @@ require 'capistrano/deploy' require 'capistrano/rvm' require 'capistrano/bundler' -require 'capistrano/rails/assets' +#require 'capistrano/rails/assets' require 'capistrano/rails/migrations' -require 'capistrano/passenger' +#require 'capistrano/passenger' # Load custom tasks from `lib/capistrano/tasks` if you have any defined Dir.glob('lib/capistrano/tasks/*.rake').each { |r| import r } +Dir.glob('lib/capistrano/tasks/*.cap').each { |r| import r } +Dir.glob('lib/capistrano/**/*.rb').each { |r| import r } diff --git a/Gemfile b/Gemfile index 5ca7a1a6bd6..a4e9b0e203c 100644 --- a/Gemfile +++ b/Gemfile @@ -21,14 +21,19 @@ gem 'turbolinks' gem 'devise' # Use ActiveModel has_secure_password # gem 'bcrypt', '~> 3.1.7' +gem 'kaminari' gem 'acts_as_commentable_with_threading' gem 'acts-as-taggable-on' gem "responders" gem 'foundation-rails' +gem 'foundation_rails_helper' gem 'acts_as_votable' -gem "recaptcha", require: "recaptcha/rails" +gem 'simple_captcha2', require: 'simple_captcha' gem 'ckeditor' gem 'cancancan' +gem 'social-share-button' +gem 'initialjs-rails' +gem 'unicorn' group :development, :test do # Call 'byebug' anywhere in the code to stop execution and get a debugger console @@ -48,7 +53,6 @@ group :development, :test do gem "capistrano-bundler", '1.1.4', require: false gem "capistrano-rails", '1.1.3', require: false gem "capistrano-rvm", require: false - gem "capistrano-passenger", require: false end group :test do @@ -60,4 +64,3 @@ end group :test do gem 'email_spec' end - diff --git a/Gemfile.lock b/Gemfile.lock index fd9842f3982..2bcab8ad0f2 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -44,7 +44,7 @@ GEM awesome_nested_set (>= 3.0) acts_as_votable (0.10.0) addressable (2.3.8) - arel (6.0.2) + arel (6.0.3) awesome_nested_set (3.0.2) activerecord (>= 4.0.0, < 5) bcrypt (3.1.10) @@ -61,8 +61,6 @@ GEM capistrano-bundler (1.1.4) capistrano (~> 3.1) sshkit (~> 1.2) - capistrano-passenger (0.1.1) - capistrano (~> 3.0) capistrano-rails (1.1.3) capistrano (~> 3.1) capistrano-bundler (~> 1.1) @@ -75,7 +73,7 @@ GEM rack (>= 1.0.0) rack-test (>= 0.5.4) xpath (~> 2.0) - ckeditor (4.1.2) + ckeditor (4.1.3) cocaine orm_adapter (~> 0.5.0) climate_control (0.0.3) @@ -100,7 +98,7 @@ GEM thor (~> 0.19.1) database_cleaner (1.4.1) debug_inspector (0.0.2) - devise (3.5.1) + devise (3.5.2) bcrypt (~> 3.0) orm_adapter (~> 0.1) railties (>= 3.2.6, < 5) @@ -128,25 +126,37 @@ GEM foundation-rails (5.5.2.1) railties (>= 3.1.0) sass (>= 3.3.0, < 3.5) - globalid (0.3.5) + foundation_rails_helper (1.0.0) + actionpack (~> 4.1, >= 4.1.1) + activemodel (~> 4.1, >= 4.1.1) + activesupport (~> 4.1, >= 4.1.1) + railties (~> 4.1, >= 4.1.1) + tzinfo (~> 1.2, >= 1.2.2) + globalid (0.3.6) activesupport (>= 4.1.0) highline (1.7.3) http-cookie (1.0.2) domain_name (~> 0.5) i18n (0.7.0) - i18n-tasks (0.8.6) - activesupport + i18n-tasks (0.8.7) + activesupport (>= 2.3.18) easy_translate (>= 0.5.0) erubis - highline + highline (>= 1.7.3) i18n - term-ansicolor + term-ansicolor (>= 1.3.2) terminal-table (>= 1.5.1) + initialjs-rails (0.1.0) + railties (>= 3.1, < 5.0) jquery-rails (4.0.4) rails-dom-testing (~> 1.0) railties (>= 4.2.0) thor (>= 0.14, < 2.0) json (1.8.3) + kaminari (0.16.3) + actionpack (>= 3.0.0) + activesupport (>= 3.0.0) + kgio (2.9.3) launchy (2.4.3) addressable (~> 2.3) letter_opener (1.4.1) @@ -160,7 +170,7 @@ GEM mime-types (>= 1.16, < 3) mime-types (2.6.1) mini_portile (0.6.2) - minitest (5.7.0) + minitest (5.8.0) multi_json (1.11.2) net-scp (1.2.1) net-ssh (>= 2.6.5) @@ -204,23 +214,23 @@ GEM activesupport (= 4.2.3) rake (>= 0.8.7) thor (>= 0.18.1, < 2.0) + raindrops (0.15.0) rake (10.4.2) - recaptcha (0.4.0) responders (2.1.0) railties (>= 4.2.0, < 5) rest-client (1.8.0) http-cookie (>= 1.0.2, < 2.0) mime-types (>= 1.16, < 3.0) netrc (~> 0.7) - rspec-core (3.3.1) + rspec-core (3.3.2) rspec-support (~> 3.3.0) - rspec-expectations (3.3.0) + rspec-expectations (3.3.1) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.3.0) - rspec-mocks (3.3.1) + rspec-mocks (3.3.2) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.3.0) - rspec-rails (3.3.2) + rspec-rails (3.3.3) actionpack (>= 3.0, < 4.3) activesupport (>= 3.0, < 4.3) railties (>= 3.0, < 4.3) @@ -236,11 +246,16 @@ GEM sprockets (>= 2.8, < 4.0) sprockets-rails (>= 2.0, < 4.0) tilt (~> 1.1) + simple_captcha2 (0.3.4) + rails (>= 4.1) simplecov (0.10.0) docile (~> 1.1.0) json (~> 1.8) simplecov-html (~> 0.10.0) simplecov-html (0.10.0) + social-share-button (0.1.8) + coffee-rails + sass-rails spring (1.3.6) sprockets (3.2.0) rack (~> 1.0) @@ -270,6 +285,10 @@ GEM unf (0.1.4) unf_ext unf_ext (0.0.7.1) + unicorn (4.9.0) + kgio (~> 2.6) + rack + raindrops (~> 0.7) warden (1.2.3) rack (>= 1.0) web-console (2.2.1) @@ -294,7 +313,6 @@ DEPENDENCIES cancancan capistrano (= 3.4.0) capistrano-bundler (= 1.1.4) - capistrano-passenger capistrano-rails (= 1.1.3) capistrano-rvm capybara @@ -306,21 +324,26 @@ DEPENDENCIES email_spec factory_girl_rails foundation-rails + foundation_rails_helper i18n-tasks + initialjs-rails jquery-rails + kaminari launchy letter_opener_web (~> 1.2.0) pg poltergeist quiet_assets rails (= 4.2.3) - recaptcha responders rspec-rails (~> 3.0) sass-rails (~> 5.0) + simple_captcha2 + social-share-button spring turbolinks uglifier (>= 1.3.0) + unicorn web-console (~> 2.0) BUNDLED WITH diff --git a/LICENSE-AGPLv3.txt b/LICENSE-AGPLv3.txt new file mode 100644 index 00000000000..885dfe40c77 --- /dev/null +++ b/LICENSE-AGPLv3.txt @@ -0,0 +1,663 @@ + GNU AFFERO GENERAL PUBLIC LICENSE + Version 3, 19 November 2007 + + Copyright (c) 2015 Ayuntamiento de Madrid + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU Affero General Public License is a free, copyleft license for +software and other kinds of works, specifically designed to ensure +cooperation with the community in the case of network server software. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +our General Public Licenses are intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + Developers that use our General Public Licenses protect your rights +with two steps: (1) assert copyright on the software, and (2) offer +you this License which gives you legal permission to copy, distribute +and/or modify the software. + + A secondary benefit of defending all users' freedom is that +improvements made in alternate versions of the program, if they +receive widespread use, become available for other developers to +incorporate. Many developers of free software are heartened and +encouraged by the resulting cooperation. However, in the case of +software used on network servers, this result may fail to come about. +The GNU General Public License permits making a modified version and +letting the public access it on a server without ever releasing its +source code to the public. + + The GNU Affero General Public License is designed specifically to +ensure that, in such cases, the modified source code becomes available +to the community. It requires the operator of a network server to +provide the source code of the modified version running there to the +users of that server. Therefore, public use of a modified version, on +a publicly accessible server, gives the public access to the source +code of the modified version. + + An older license, called the Affero General Public License and +published by Affero, was designed to accomplish similar goals. This is +a different license, not a version of the Affero GPL, but Affero has +released a new version of the Affero GPL which permits relicensing under +this license. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU Affero General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Remote Network Interaction; Use with the GNU General Public License. + + Notwithstanding any other provision of this License, if you modify the +Program, your modified version must prominently offer all users +interacting with it remotely through a computer network (if your version +supports such interaction) an opportunity to receive the Corresponding +Source of your version by providing access to the Corresponding Source +from a network server at no charge, through some standard or customary +means of facilitating copying of software. This Corresponding Source +shall include the Corresponding Source for any work covered by version 3 +of the GNU General Public License that is incorporated pursuant to the +following paragraph. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the work with which it is combined will remain governed by version +3 of the GNU General Public License. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU Affero General Public License from time to time. Such new versions +will be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU Affero General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU Affero General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU Affero General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If your software can interact with users remotely through a computer +network, you should also make sure that it provides a way for users to +get its source. For example, if your program is a web application, its +interface could display a "Source" link that leads users to an archive +of the code. There are many ways you could offer source, and different +solutions will be better for different programs; see section 13 for the +specific requirements. + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU AGPL, see +. diff --git a/MIT-LICENSE.md b/MIT-LICENSE.md deleted file mode 100644 index 8bdbc60430f..00000000000 --- a/MIT-LICENSE.md +++ /dev/null @@ -1,21 +0,0 @@ -# The MIT License (MIT) - -## Copyright (c) 2015 Ayuntamiento de Madrid - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/README.md b/README.md index 66c1853dcd6..1d8ef040d66 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ Las herramientas utilizadas para el frontend no están cerradas aún. Los estilo ## Configuración para desarrollo y tests -Prerequisitos: tener instalado git, Ruby 2.2.2, la gema `bundler`, y una librería moderna de PostgreSQL. +Prerequisitos: tener instalado git, ImageMagick, Ruby 2.2.2, la gema `bundler`, y una librería moderna de PostgreSQL. ``` cd participacion @@ -43,7 +43,7 @@ bundle exec bin/rspec ## Licencia -El código de este proyecto está publicado bajo la licencia MIT (ver MIT-license.md) +El código de este proyecto está publicado bajo la licencia AFFERO GPL v3 (ver [LICENSE-AGPLv3.txt](LICENSE-AGPLv3.txt)) ## Contribuciones diff --git a/README_EN.md b/README_EN.md index b1b1521ffa9..e43be287583 100644 --- a/README_EN.md +++ b/README_EN.md @@ -21,7 +21,7 @@ Frontend tools used include [SCSS](http://sass-lang.com/) over [Foundation](http ## Configuration for development and test environments -Prerequisites: install git, Ruby 2.2.2, bundler gem and PostgreSQL. +Prerequisites: install git, ImageMagick, Ruby 2.2.2, bundler gem and PostgreSQL. ``` cd participacion @@ -44,7 +44,7 @@ bundle exec bin/rspec ## Licence -Code published under MIT license (see [MIT-license.md](MIT-license.md)) +Code published under AFFERO GPL v3 (see [LICENSE-AGPLv3.txt](LICENSE-AGPLv3.txt)) ## Contributions diff --git a/app/assets/fonts/icons.eot b/app/assets/fonts/icons.eot index 0bb2d0d644d..166eca82eab 100644 Binary files a/app/assets/fonts/icons.eot and b/app/assets/fonts/icons.eot differ diff --git a/app/assets/fonts/icons.svg b/app/assets/fonts/icons.svg index f4e4e48c170..498eb27a787 100644 --- a/app/assets/fonts/icons.svg +++ b/app/assets/fonts/icons.svg @@ -19,4 +19,6 @@ + + diff --git a/app/assets/fonts/icons.ttf b/app/assets/fonts/icons.ttf index f69b18def69..285caed395a 100644 Binary files a/app/assets/fonts/icons.ttf and b/app/assets/fonts/icons.ttf differ diff --git a/app/assets/fonts/icons.woff b/app/assets/fonts/icons.woff index 32638055d5b..02c11f23e52 100644 Binary files a/app/assets/fonts/icons.woff and b/app/assets/fonts/icons.woff differ diff --git a/app/assets/fonts/lato-bolditalic.eot b/app/assets/fonts/lato-bolditalic.eot deleted file mode 100755 index f1cdddc5dde..00000000000 Binary files a/app/assets/fonts/lato-bolditalic.eot and /dev/null differ diff --git a/app/assets/fonts/lato-bolditalic.svg b/app/assets/fonts/lato-bolditalic.svg deleted file mode 100755 index ce68081e7f9..00000000000 --- a/app/assets/fonts/lato-bolditalic.svg +++ /dev/null @@ -1,4072 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/app/assets/fonts/lato-bolditalic.ttf b/app/assets/fonts/lato-bolditalic.ttf deleted file mode 100755 index 63b573b4302..00000000000 Binary files a/app/assets/fonts/lato-bolditalic.ttf and /dev/null differ diff --git a/app/assets/fonts/lato-bolditalic.woff b/app/assets/fonts/lato-bolditalic.woff deleted file mode 100755 index 4f6eb79d51b..00000000000 Binary files a/app/assets/fonts/lato-bolditalic.woff and /dev/null differ diff --git a/app/assets/fonts/lato-bolditalic.woff2 b/app/assets/fonts/lato-bolditalic.woff2 deleted file mode 100755 index b58f714a7b8..00000000000 Binary files a/app/assets/fonts/lato-bolditalic.woff2 and /dev/null differ diff --git a/app/assets/fonts/lato-italic.eot b/app/assets/fonts/lato-italic.eot deleted file mode 100755 index 1e8e5ffa2d4..00000000000 Binary files a/app/assets/fonts/lato-italic.eot and /dev/null differ diff --git a/app/assets/fonts/lato-italic.svg b/app/assets/fonts/lato-italic.svg deleted file mode 100755 index 86a227f5069..00000000000 --- a/app/assets/fonts/lato-italic.svg +++ /dev/null @@ -1,4072 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/app/assets/fonts/lato-italic.ttf b/app/assets/fonts/lato-italic.ttf deleted file mode 100755 index f850f5da240..00000000000 Binary files a/app/assets/fonts/lato-italic.ttf and /dev/null differ diff --git a/app/assets/fonts/lato-italic.woff b/app/assets/fonts/lato-italic.woff deleted file mode 100755 index ae884069317..00000000000 Binary files a/app/assets/fonts/lato-italic.woff and /dev/null differ diff --git a/app/assets/fonts/lato-italic.woff2 b/app/assets/fonts/lato-italic.woff2 deleted file mode 100755 index e5757d96c6d..00000000000 Binary files a/app/assets/fonts/lato-italic.woff2 and /dev/null differ diff --git a/app/assets/fonts/lato-lightitalic.eot b/app/assets/fonts/lato-lightitalic.eot deleted file mode 100755 index b81a79b7dc0..00000000000 Binary files a/app/assets/fonts/lato-lightitalic.eot and /dev/null differ diff --git a/app/assets/fonts/lato-lightitalic.svg b/app/assets/fonts/lato-lightitalic.svg deleted file mode 100755 index d284a05a5cf..00000000000 --- a/app/assets/fonts/lato-lightitalic.svg +++ /dev/null @@ -1,4072 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/app/assets/fonts/lato-lightitalic.ttf b/app/assets/fonts/lato-lightitalic.ttf deleted file mode 100755 index 691ba4d088f..00000000000 Binary files a/app/assets/fonts/lato-lightitalic.ttf and /dev/null differ diff --git a/app/assets/fonts/lato-lightitalic.woff b/app/assets/fonts/lato-lightitalic.woff deleted file mode 100755 index b52daecdb87..00000000000 Binary files a/app/assets/fonts/lato-lightitalic.woff and /dev/null differ diff --git a/app/assets/fonts/lato-lightitalic.woff2 b/app/assets/fonts/lato-lightitalic.woff2 deleted file mode 100755 index 5f22f733e41..00000000000 Binary files a/app/assets/fonts/lato-lightitalic.woff2 and /dev/null differ diff --git a/app/assets/fonts/opensans-bold.eot b/app/assets/fonts/opensans-bold.eot new file mode 100755 index 00000000000..385d67f8ea9 Binary files /dev/null and b/app/assets/fonts/opensans-bold.eot differ diff --git a/app/assets/fonts/opensans-bold.svg b/app/assets/fonts/opensans-bold.svg new file mode 100755 index 00000000000..1b5c1ccb784 --- /dev/null +++ b/app/assets/fonts/opensans-bold.svg @@ -0,0 +1,1824 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/assets/fonts/opensans-bold.ttf b/app/assets/fonts/opensans-bold.ttf new file mode 100755 index 00000000000..875ce9339e2 Binary files /dev/null and b/app/assets/fonts/opensans-bold.ttf differ diff --git a/app/assets/fonts/opensans-bold.woff b/app/assets/fonts/opensans-bold.woff new file mode 100755 index 00000000000..d7eb013bcc2 Binary files /dev/null and b/app/assets/fonts/opensans-bold.woff differ diff --git a/app/assets/fonts/opensans-bold.woff2 b/app/assets/fonts/opensans-bold.woff2 new file mode 100755 index 00000000000..3ff34eb9b1d Binary files /dev/null and b/app/assets/fonts/opensans-bold.woff2 differ diff --git a/app/assets/fonts/opensans-bolditalic.eot b/app/assets/fonts/opensans-bolditalic.eot new file mode 100755 index 00000000000..e9da57fb033 Binary files /dev/null and b/app/assets/fonts/opensans-bolditalic.eot differ diff --git a/app/assets/fonts/opensans-bolditalic.svg b/app/assets/fonts/opensans-bolditalic.svg new file mode 100755 index 00000000000..7d483577fe1 --- /dev/null +++ b/app/assets/fonts/opensans-bolditalic.svg @@ -0,0 +1,1824 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/assets/fonts/opensans-bolditalic.ttf b/app/assets/fonts/opensans-bolditalic.ttf new file mode 100755 index 00000000000..66f65d8a56f Binary files /dev/null and b/app/assets/fonts/opensans-bolditalic.ttf differ diff --git a/app/assets/fonts/opensans-bolditalic.woff b/app/assets/fonts/opensans-bolditalic.woff new file mode 100755 index 00000000000..d5a238eb80c Binary files /dev/null and b/app/assets/fonts/opensans-bolditalic.woff differ diff --git a/app/assets/fonts/opensans-bolditalic.woff2 b/app/assets/fonts/opensans-bolditalic.woff2 new file mode 100755 index 00000000000..0373e9ca533 Binary files /dev/null and b/app/assets/fonts/opensans-bolditalic.woff2 differ diff --git a/app/assets/fonts/opensans-italic.eot b/app/assets/fonts/opensans-italic.eot new file mode 100755 index 00000000000..1a515d895f4 Binary files /dev/null and b/app/assets/fonts/opensans-italic.eot differ diff --git a/app/assets/fonts/opensans-italic.svg b/app/assets/fonts/opensans-italic.svg new file mode 100755 index 00000000000..930528f495d --- /dev/null +++ b/app/assets/fonts/opensans-italic.svg @@ -0,0 +1,1824 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/assets/fonts/opensans-italic.ttf b/app/assets/fonts/opensans-italic.ttf new file mode 100755 index 00000000000..2d2d2c00489 Binary files /dev/null and b/app/assets/fonts/opensans-italic.ttf differ diff --git a/app/assets/fonts/opensans-italic.woff b/app/assets/fonts/opensans-italic.woff new file mode 100755 index 00000000000..3e6c20b1990 Binary files /dev/null and b/app/assets/fonts/opensans-italic.woff differ diff --git a/app/assets/fonts/opensans-italic.woff2 b/app/assets/fonts/opensans-italic.woff2 new file mode 100755 index 00000000000..7a2be4074bd Binary files /dev/null and b/app/assets/fonts/opensans-italic.woff2 differ diff --git a/app/assets/fonts/opensans-light.eot b/app/assets/fonts/opensans-light.eot new file mode 100755 index 00000000000..e451e38ef4e Binary files /dev/null and b/app/assets/fonts/opensans-light.eot differ diff --git a/app/assets/fonts/opensans-light.svg b/app/assets/fonts/opensans-light.svg new file mode 100755 index 00000000000..b3e3faabc3c --- /dev/null +++ b/app/assets/fonts/opensans-light.svg @@ -0,0 +1,1824 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/assets/fonts/opensans-light.ttf b/app/assets/fonts/opensans-light.ttf new file mode 100755 index 00000000000..e5a8089f1ec Binary files /dev/null and b/app/assets/fonts/opensans-light.ttf differ diff --git a/app/assets/fonts/opensans-light.woff b/app/assets/fonts/opensans-light.woff new file mode 100755 index 00000000000..b348ed271b7 Binary files /dev/null and b/app/assets/fonts/opensans-light.woff differ diff --git a/app/assets/fonts/opensans-light.woff2 b/app/assets/fonts/opensans-light.woff2 new file mode 100755 index 00000000000..d81c2525084 Binary files /dev/null and b/app/assets/fonts/opensans-light.woff2 differ diff --git a/app/assets/fonts/opensans-lightitalic.eot b/app/assets/fonts/opensans-lightitalic.eot new file mode 100755 index 00000000000..cc8ab68e6c8 Binary files /dev/null and b/app/assets/fonts/opensans-lightitalic.eot differ diff --git a/app/assets/fonts/opensans-lightitalic.svg b/app/assets/fonts/opensans-lightitalic.svg new file mode 100755 index 00000000000..8cf6f521324 --- /dev/null +++ b/app/assets/fonts/opensans-lightitalic.svg @@ -0,0 +1,1824 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/assets/fonts/opensans-lightitalic.ttf b/app/assets/fonts/opensans-lightitalic.ttf new file mode 100755 index 00000000000..8c75ec79bc0 Binary files /dev/null and b/app/assets/fonts/opensans-lightitalic.ttf differ diff --git a/app/assets/fonts/opensans-lightitalic.woff b/app/assets/fonts/opensans-lightitalic.woff new file mode 100755 index 00000000000..3dc4e730720 Binary files /dev/null and b/app/assets/fonts/opensans-lightitalic.woff differ diff --git a/app/assets/fonts/opensans-lightitalic.woff2 b/app/assets/fonts/opensans-lightitalic.woff2 new file mode 100755 index 00000000000..b91b6f8075f Binary files /dev/null and b/app/assets/fonts/opensans-lightitalic.woff2 differ diff --git a/app/assets/fonts/opensans-regular.eot b/app/assets/fonts/opensans-regular.eot new file mode 100755 index 00000000000..18331ec52d2 Binary files /dev/null and b/app/assets/fonts/opensans-regular.eot differ diff --git a/app/assets/fonts/opensans-regular.svg b/app/assets/fonts/opensans-regular.svg new file mode 100755 index 00000000000..3e5d0ac3774 --- /dev/null +++ b/app/assets/fonts/opensans-regular.svg @@ -0,0 +1,1824 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/assets/fonts/opensans-regular.ttf b/app/assets/fonts/opensans-regular.ttf new file mode 100755 index 00000000000..12c9ba0093a Binary files /dev/null and b/app/assets/fonts/opensans-regular.ttf differ diff --git a/app/assets/fonts/opensans-regular.woff b/app/assets/fonts/opensans-regular.woff new file mode 100755 index 00000000000..ce026ebbb9c Binary files /dev/null and b/app/assets/fonts/opensans-regular.woff differ diff --git a/app/assets/fonts/opensans-regular.woff2 b/app/assets/fonts/opensans-regular.woff2 new file mode 100755 index 00000000000..90d4d672d54 Binary files /dev/null and b/app/assets/fonts/opensans-regular.woff2 differ diff --git a/app/assets/fonts/roboto-blackitalic.eot b/app/assets/fonts/roboto-blackitalic.eot deleted file mode 100755 index a2aebfb7da3..00000000000 Binary files a/app/assets/fonts/roboto-blackitalic.eot and /dev/null differ diff --git a/app/assets/fonts/roboto-blackitalic.svg b/app/assets/fonts/roboto-blackitalic.svg deleted file mode 100755 index c9cc3cdb7b0..00000000000 --- a/app/assets/fonts/roboto-blackitalic.svg +++ /dev/null @@ -1,642 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/app/assets/fonts/roboto-blackitalic.ttf b/app/assets/fonts/roboto-blackitalic.ttf deleted file mode 100755 index 2020dcbc9cc..00000000000 Binary files a/app/assets/fonts/roboto-blackitalic.ttf and /dev/null differ diff --git a/app/assets/fonts/roboto-blackitalic.woff b/app/assets/fonts/roboto-blackitalic.woff deleted file mode 100755 index 1875c0b9506..00000000000 Binary files a/app/assets/fonts/roboto-blackitalic.woff and /dev/null differ diff --git a/app/assets/fonts/roboto-bold.eot b/app/assets/fonts/roboto-bold.eot deleted file mode 100755 index b73776ee3bc..00000000000 Binary files a/app/assets/fonts/roboto-bold.eot and /dev/null differ diff --git a/app/assets/fonts/roboto-bold.svg b/app/assets/fonts/roboto-bold.svg deleted file mode 100755 index 43b5ed22224..00000000000 --- a/app/assets/fonts/roboto-bold.svg +++ /dev/null @@ -1,593 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/app/assets/fonts/roboto-bold.ttf b/app/assets/fonts/roboto-bold.ttf deleted file mode 100755 index 1da72769a88..00000000000 Binary files a/app/assets/fonts/roboto-bold.ttf and /dev/null differ diff --git a/app/assets/fonts/roboto-bold.woff b/app/assets/fonts/roboto-bold.woff deleted file mode 100755 index 0c6994871e3..00000000000 Binary files a/app/assets/fonts/roboto-bold.woff and /dev/null differ diff --git a/app/assets/fonts/roboto-bolditalic.eot b/app/assets/fonts/roboto-bolditalic.eot deleted file mode 100755 index b803ec16873..00000000000 Binary files a/app/assets/fonts/roboto-bolditalic.eot and /dev/null differ diff --git a/app/assets/fonts/roboto-bolditalic.svg b/app/assets/fonts/roboto-bolditalic.svg deleted file mode 100755 index f877a3c821f..00000000000 --- a/app/assets/fonts/roboto-bolditalic.svg +++ /dev/null @@ -1,642 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/app/assets/fonts/roboto-bolditalic.ttf b/app/assets/fonts/roboto-bolditalic.ttf deleted file mode 100755 index 78bab05c8c7..00000000000 Binary files a/app/assets/fonts/roboto-bolditalic.ttf and /dev/null differ diff --git a/app/assets/fonts/roboto-bolditalic.woff b/app/assets/fonts/roboto-bolditalic.woff deleted file mode 100755 index 99de61af52d..00000000000 Binary files a/app/assets/fonts/roboto-bolditalic.woff and /dev/null differ diff --git a/app/assets/fonts/roboto-italic.eot b/app/assets/fonts/roboto-italic.eot deleted file mode 100755 index b708f047ff7..00000000000 Binary files a/app/assets/fonts/roboto-italic.eot and /dev/null differ diff --git a/app/assets/fonts/roboto-italic.svg b/app/assets/fonts/roboto-italic.svg deleted file mode 100755 index 49ddd4ab763..00000000000 --- a/app/assets/fonts/roboto-italic.svg +++ /dev/null @@ -1,642 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/app/assets/fonts/roboto-italic.ttf b/app/assets/fonts/roboto-italic.ttf deleted file mode 100755 index ae258e84163..00000000000 Binary files a/app/assets/fonts/roboto-italic.ttf and /dev/null differ diff --git a/app/assets/fonts/roboto-italic.woff b/app/assets/fonts/roboto-italic.woff deleted file mode 100755 index dd742443826..00000000000 Binary files a/app/assets/fonts/roboto-italic.woff and /dev/null differ diff --git a/app/assets/fonts/roboto-light b/app/assets/fonts/roboto-light deleted file mode 100755 index 072cdc480c8..00000000000 Binary files a/app/assets/fonts/roboto-light and /dev/null differ diff --git a/app/assets/fonts/roboto-light.svg b/app/assets/fonts/roboto-light.svg deleted file mode 100755 index db6a6171ed8..00000000000 --- a/app/assets/fonts/roboto-light.svg +++ /dev/null @@ -1,641 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/app/assets/fonts/roboto-light.ttf b/app/assets/fonts/roboto-light.ttf deleted file mode 100755 index 3b2fea0ace1..00000000000 Binary files a/app/assets/fonts/roboto-light.ttf and /dev/null differ diff --git a/app/assets/fonts/roboto-light.woff b/app/assets/fonts/roboto-light.woff deleted file mode 100755 index cc534a38154..00000000000 Binary files a/app/assets/fonts/roboto-light.woff and /dev/null differ diff --git a/app/assets/fonts/roboto-lightitalic b/app/assets/fonts/roboto-lightitalic deleted file mode 100755 index 77396a1ff9c..00000000000 Binary files a/app/assets/fonts/roboto-lightitalic and /dev/null differ diff --git a/app/assets/fonts/roboto-lightitalic.svg b/app/assets/fonts/roboto-lightitalic.svg deleted file mode 100755 index 4bd14bcca70..00000000000 --- a/app/assets/fonts/roboto-lightitalic.svg +++ /dev/null @@ -1,641 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/app/assets/fonts/roboto-lightitalic.ttf b/app/assets/fonts/roboto-lightitalic.ttf deleted file mode 100755 index b9b38118a37..00000000000 Binary files a/app/assets/fonts/roboto-lightitalic.ttf and /dev/null differ diff --git a/app/assets/fonts/roboto-lightitalic.woff b/app/assets/fonts/roboto-lightitalic.woff deleted file mode 100755 index 3071ff4f231..00000000000 Binary files a/app/assets/fonts/roboto-lightitalic.woff and /dev/null differ diff --git a/app/assets/fonts/roboto-regular.eot b/app/assets/fonts/roboto-regular.eot deleted file mode 100755 index 9b5e8e41389..00000000000 Binary files a/app/assets/fonts/roboto-regular.eot and /dev/null differ diff --git a/app/assets/fonts/roboto-regular.svg b/app/assets/fonts/roboto-regular.svg deleted file mode 100755 index de7d77fea50..00000000000 --- a/app/assets/fonts/roboto-regular.svg +++ /dev/null @@ -1,621 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/app/assets/fonts/roboto-regular.ttf b/app/assets/fonts/roboto-regular.ttf deleted file mode 100755 index 44dd78d5e1e..00000000000 Binary files a/app/assets/fonts/roboto-regular.ttf and /dev/null differ diff --git a/app/assets/fonts/roboto-regular.woff b/app/assets/fonts/roboto-regular.woff deleted file mode 100755 index bfa05d53f4e..00000000000 Binary files a/app/assets/fonts/roboto-regular.woff and /dev/null differ diff --git a/app/assets/images/comments_divider.png b/app/assets/images/comments_divider.png deleted file mode 100644 index 1d2bffd9b83..00000000000 Binary files a/app/assets/images/comments_divider.png and /dev/null differ diff --git a/app/assets/images/footer.jpg b/app/assets/images/footer.jpg deleted file mode 100644 index 5364cc23375..00000000000 Binary files a/app/assets/images/footer.jpg and /dev/null differ diff --git a/app/assets/images/user_default.jpg b/app/assets/images/user_default.jpg deleted file mode 100644 index c67f27f5553..00000000000 Binary files a/app/assets/images/user_default.jpg and /dev/null differ diff --git a/app/assets/images/user_default_2.jpg b/app/assets/images/user_default_2.jpg deleted file mode 100644 index ed164ab5797..00000000000 Binary files a/app/assets/images/user_default_2.jpg and /dev/null differ diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js index 08153c4ec6f..11bbe4cad88 100644 --- a/app/assets/javascripts/application.js +++ b/app/assets/javascripts/application.js @@ -15,16 +15,22 @@ //= require foundation //= require turbolinks //= require ckeditor/init +//= require social-share-button +//= require initial //= require app //= require_tree . var initialize_modules = function() { App.Comments.initialize(); + App.Users.initialize(); + App.Votes.initialize(); + App.Tags.initialize(); }; $(function(){ $(document).foundation(); - $(document).ready(initialize_modules) - $(document).on('page:load', initialize_modules) + $(document).ready(initialize_modules); + $(document).on('page:load', initialize_modules); + $(document).on('ajax:complete', initialize_modules); }); diff --git a/app/assets/javascripts/comments.js.coffee b/app/assets/javascripts/comments.js.coffee index 7a8743f882d..377fa4d1a00 100644 --- a/app/assets/javascripts/comments.js.coffee +++ b/app/assets/javascripts/comments.js.coffee @@ -3,18 +3,29 @@ App.Comments = add_response: (parent_id, response_html) -> $(response_html).insertAfter($("#js-comment-form-#{parent_id}")) + display_error: (field_with_errors, error_html) -> + $(error_html).insertAfter($("#{field_with_errors}")) + reset_and_hide_form: (id) -> - form = $("#js-comment-form-#{id}") - form.val('') - form.hide() + form_container = $("#js-comment-form-#{id}") + input = form_container.find("form textarea") + input.val('') + form_container.hide() + + reset_form: (id) -> + input = $("#js-comment-form-#{id} form textarea") + input.val('') toggle_form: (id) -> $("#js-comment-form-#{id}").toggle() initialize: -> - $('body').on 'click', '.js-add-comment-link', -> - id = $(this).data().id - App.Comments.toggle_form(id) - false - + $('body .js-add-comment-link').each -> + $this = $(this) + unless $this.data('initialized') is 'yes' + $this.on('click', -> + id = $(this).data().id + App.Comments.toggle_form(id) + false + ).data 'initialized', 'yes' diff --git a/app/assets/javascripts/tags.js.coffee b/app/assets/javascripts/tags.js.coffee new file mode 100644 index 00000000000..12c4c311560 --- /dev/null +++ b/app/assets/javascripts/tags.js.coffee @@ -0,0 +1,21 @@ +App.Tags = + + initialize: -> + $tag_input = $('input#debate_tag_list') + + $('body .js-add-tag-link').each -> + $this = $(this) + + unless $this.data('initialized') is 'yes' + $this.on('click', -> + name = $(this).text() + current_tags = $tag_input.val().split(',').filter(Boolean) + + if $.inArray(name, current_tags) >= 0 + current_tags.splice($.inArray(name, current_tags), 1); + else + current_tags.push name + + $tag_input.val(current_tags.join(',')) + false + ).data 'initialized', 'yes' diff --git a/app/assets/javascripts/users.js.coffee b/app/assets/javascripts/users.js.coffee new file mode 100644 index 00000000000..9c4fa42b0be --- /dev/null +++ b/app/assets/javascripts/users.js.coffee @@ -0,0 +1,5 @@ +App.Users = + + initialize: -> + $('.initialjs-avatar').initial(); + false diff --git a/app/assets/javascripts/votes.js.coffee b/app/assets/javascripts/votes.js.coffee new file mode 100644 index 00000000000..5005ad5b8c0 --- /dev/null +++ b/app/assets/javascripts/votes.js.coffee @@ -0,0 +1,15 @@ +App.Votes = + + hoverize: (votes) -> + $(votes).hover -> + $("div.not-logged", votes).show() + , -> + $("div.not-logged", votes).hide() + + initialize: -> + App.Votes.hoverize votes for votes in $("div.votes") + false + + + + diff --git a/app/assets/stylesheets/application.scss b/app/assets/stylesheets/application.scss index 1bcdc722a3f..e4379397e9b 100644 --- a/app/assets/stylesheets/application.scss +++ b/app/assets/stylesheets/application.scss @@ -1,6 +1,10 @@ +/* + *= require social-share-button + */ + @import "foundation_and_overrides"; @import "fonts"; @import "icons"; @import "variables"; @import "participacion"; -@import "debates"; \ No newline at end of file +@import "debates"; diff --git a/app/assets/stylesheets/debates.scss b/app/assets/stylesheets/debates.scss index 8e68dc5bb59..f242e875725 100644 --- a/app/assets/stylesheets/debates.scss +++ b/app/assets/stylesheets/debates.scss @@ -11,16 +11,17 @@ // - - - - - - - - - - - - - - - - - - - - - - - - - @mixin votes { + background: $votes-bg; border-top: 1px solid $votes-border; + margin: 0 rem-calc(-12); padding: rem-calc(14) rem-calc(12); - background: $votes-background; - margin: 0 -12px; + position: relative; .icon-like { background: white; border: 2px solid $votes-border; border-radius: rem-calc(3); - color: $votes-neutral; + color: $text-light; display: inline-block; font-size: rem-calc(30); line-height: rem-calc(30); @@ -44,7 +45,7 @@ background: white; border: 2px solid $votes-border; border-radius: rem-calc(3); - color: $votes-neutral; + color: $text-light; display: inline-block; font-size: rem-calc(30); line-height: rem-calc(30); @@ -69,7 +70,7 @@ vertical-align: super; span { - color: $votes-text; + color: white; display: inline-block; font-size: rem-calc(16); font-weight: lighter; @@ -106,7 +107,7 @@ } .total-votes { - color: $votes-text; + color: white; float: right; line-height: $line-height*2; } @@ -114,25 +115,45 @@ .divider { margin: 0 rem-calc(6); } + + .not-logged { + background: rgba(22,99,135,.9); + color: white; + height: 100%; + left: 0; + line-height: $line-height*2; + padding-top: rem-calc(12); + position: absolute; + text-align: center; + top: 0; + width: 100%; + + a { + color: white; + text-decoration: underline; + } + } } // 02. Index // - - - - - - - - - - - - - - - - - - - - - - - - - -.debate-featured { - margin-bottom: rem-calc(34); +.featured-debates { margin-top: rem-calc(23); +} + +.debate-featured { .panel { background: white; border: 1px solid; border-color: #e5e6e9 #dfe0e4 #d0d1d5; border-radius: rem-calc(3); - margin-bottom: $line-height; + margin-bottom: rem-calc(24); padding: rem-calc(24) rem-calc(12) 0 rem-calc(12); .debate-content { - min-height: $line-height*14.71; + min-height: rem-calc(353); } .label { @@ -152,7 +173,7 @@ line-height: $line-height; position: absolute; right: rem-calc(18); - top: rem-calc(24); + top: rem-calc(12); } h3 { @@ -162,7 +183,7 @@ a { clear: both; - color: $header-color; + color: $text; display: block; font-size: rem-calc(16); line-height: $line-height; @@ -170,7 +191,7 @@ } .debate-info { - color: $text-light; + color: $text-medium; font-weight: lighter; margin-bottom: 0; @@ -178,20 +199,24 @@ font-size: rem-calc(16); vertical-align: top; } + + a { + color: $text-medium; + } } .debate-description { - color: $text-color; + color: $text; font-size: rem-calc(13); - height: $line-height*6.5; + height: rem-calc(156); line-height: $line-height; - margin-bottom: $line-height/2; - margin-top: $line-height; + margin-bottom: rem-calc(12); + margin-top: rem-calc(24); overflow: hidden; position: relative; a { - color: $text-color; + color: $text; } } @@ -205,10 +230,10 @@ } p { - color: $text-color; + color: $text; font-size: rem-calc(13); line-height: $line-height; - margin-bottom: $line-height/2; + margin-bottom: rem-calc(12); } } @@ -218,7 +243,8 @@ } .debates-list { - margin-bottom: $line-height*2; + margin-bottom: rem-calc(48); + margin-top: rem-calc(24); } .debate { @@ -227,12 +253,13 @@ margin-top: 0; .panel { + border: 0; margin-bottom: 0; - min-height: $line-height*8; + min-height: rem-calc(192); padding: 0 rem-calc(12) rem-calc(2) rem-calc(12); &:first-child { - padding-top: $line-height; + padding-top: rem-calc(24); } .label { @@ -242,7 +269,7 @@ h3 { margin-top: 0; - min-height: $line-height*2; + min-height: rem-calc(48); } p { @@ -265,13 +292,29 @@ } .debate-description { - height: $line-height*3; + height: rem-calc(72); margin-top: 0; } } .votes { - border: 0; + border: 1px solid $votes-border; + border-top-left-radius: 3px; + border-bottom-left-radius: 3px; + margin: 0 rem-calc(-24) 0 rem-calc(12); + + &:after { + content: ""; + position: absolute; + display: block; + border-style: solid; + border-color: #166387 transparent transparent transparent; + bottom: rem-calc(-14); + border-left-width: 0; + border-right-color: transparent; + right: rem-calc(-1); + border-width: 1em 1em 0 0; + } .total-votes { display: block; @@ -282,11 +325,16 @@ .like { span { - color: $votes-text; + color: white; display: block; line-height: $line-height/2; } } + + .not-logged { + line-height: $line-height; + padding-top: rem-calc(36); + } } } @@ -295,7 +343,7 @@ .debate-show { background: white; - padding: rem-calc(24) rem-calc(12) 0 rem-calc(12); + padding: rem-calc(24) rem-calc(12) 0; .back { @include back; @@ -309,17 +357,20 @@ clear: both; font-size: rem-calc(24); font-weight: bold; - line-height: $line-height*2; margin: 0; } .debate-info { clear: both; - color: $text-light; + color: $text-medium; font-weight: lighter; line-height: $line-height*2; text-align: justify; + a { + color: $text-medium; + } + .bullet { color: $border; } @@ -332,30 +383,30 @@ } .author-photo { - border-radius: 2px; - display: inline-block; - height: 32px; line-height: $line-height*2; - margin-right: $line-height/4; + margin-right: rem-calc(6); vertical-align: middle; width: 32px; } .author { - color: $text-color; + color: $text; font-weight: bold; } h3 { - border-bottom: 2px solid $votes-border; - font-size: rem-calc(18); - margin: 0; + border-top: 1px solid $votes-border; + display: inline-block; + font-size: rem-calc(16); + margin: -1px 0 rem-calc(12); + padding-top: rem-calc(6); text-transform: uppercase; } .votes { @include votes; - border: 0; + border: 1px solid $votes-border; + border-radius: rem-calc(3); margin: 0; .total-votes { @@ -363,11 +414,25 @@ float: none; line-height: $line-height; } + + .not-logged { + line-height: $line-height; + padding: rem-calc(24); + } } .leave-comment { display: inline-block; - margin-top: $line-height; + margin-top: rem-calc(24); + } + + .tags { + display: block; + margin-top: rem-calc(24); + + a { + margin-right: rem-calc(6); + } } } @@ -376,7 +441,7 @@ .debate-new { background: white; - padding-top: $line-height; + padding-top: rem-calc(24); .back { @include back; @@ -387,7 +452,7 @@ font-size: rem-calc(36); font-weight: bold; line-height: $line-height*2; - margin-bottom: $line-height; + margin-bottom: rem-calc(24); } .icon-comment-quotes { @@ -408,7 +473,7 @@ .recommendations { list-style-type: none; margin-left: 0; - margin-top: $line-height; + margin-top: rem-calc(24); li { font-size: rem-calc(12); @@ -427,64 +492,83 @@ // - - - - - - - - - - - - - - - - - - - - - - - - - .comments { - background: $comments-bg; - background-image: url('comments_divider.png'); + background: $white; background-repeat: repeat-x; - padding-top: $line-height; - padding-bottom: $line-height*4; + padding-top: rem-calc(24); + padding-bottom: rem-calc(96); h2 { margin: 0; font-weight: bold; + + span { + font-size: rem-calc(14); + font-weight: normal; + opacity: .8; + } } .comment { - margin: $line-height/4 0; + margin: rem-calc(6) 0; p { - color: $comments-text; - font-size: rem-calc(15); margin-bottom: 0; } - a { - color: $comments-info; - } + .comment-votes { + color: $text-medium; + font-weight: lighter; + margin: rem-calc(15) rem-calc(6) 0; - .user-photo { - border-radius: 2px; - display: inline-block; - height: 32px; - line-height: $line-height*2; - margin-right: $line-height/4; - vertical-align: top; - width: 32px; + a { + color: $text-light; + display: inline-block; + vertical-align: top; + + &:hover { + color: $text-medium; + } + } + + [class^="icon-"] { + font-size: rem-calc(20); + vertical-align: top; + } } .comment-body { - margin-left: $line-height*1.6; + margin-left: rem-calc(36); .reply { + background: white; + border: 1px solid $border; font-size: rem-calc(12); font-weight: lighter; + margin: rem-calc(6) 0; + padding: rem-calc(6); } } .comment-children { - border-left: 1px dotted $border; - margin-left: $line-height*1.6; - padding-left: $line-height/4; + border-left: 1px dashed $border; + margin-left: rem-calc(36); + padding-left: rem-calc(6); @media only screen and (max-width: 40em) { - margin-left: $line-height/1.5; + margin-left: rem-calc(16); } } .comment-info { - color: $comments-info; + color: $text-light; font-size: rem-calc(13); font-weight: lighter; vertical-align: middle; + + span { + color: $text; + font-weight: bold; + } } } -} \ No newline at end of file +} diff --git a/app/assets/stylesheets/fonts.scss b/app/assets/stylesheets/fonts.scss index b6fc2d97309..80d1259a906 100644 --- a/app/assets/stylesheets/fonts.scss +++ b/app/assets/stylesheets/fonts.scss @@ -1,160 +1,119 @@ -// List of fonts +// List of fonts +// +// 01. Open Sans (http://www.fontsquirrel.com/fonts/open-sans) +// 02. Lato (http://www.fontsquirrel.com/fonts/lato) // -// 01. Roboto (https://www.google.com/fonts/specimen/Roboto) -// 02. Lato (https://www.google.com/fonts/specimen/Lato) - -// 01. Roboto +// 01. Open Sans // - - - - - - - - - - - - - - - - - - - - - - - - - @font-face { - font-family: 'Roboto'; - src: font-url('roboto-light.eot'); - src: font-url('roboto-light.eot?#iefix') format('embedded-opentype'), - font-url('roboto-light.woff') format('woff'), - font-url('roboto-light.ttf') format('truetype'), - font-url('roboto-light.svg#latolight') format('svg'); - font-weight: 300; - font-style: normal; + font-family: 'Open Sans'; + src: font-url('opensans-light.eot'); + src: font-url('opensans-light.eot?#iefix') format('embedded-opentype'), + font-url('opensans-light.woff2') format('woff2'), + font-url('opensans-light.woff') format('woff'), + font-url('opensans-light.ttf') format('truetype'), + font-url('opensans-light.svg#open_sanslight') format('svg'); + font-weight: lighter; + font-style: normal; } @font-face { - font-family: 'Roboto'; - src: font-url('roboto-lightitalic.eot'); - src: font-url('roboto-lightitalic.eot?#iefix') format('embedded-opentype'), - font-url('roboto-lightitalic.woff') format('woff'), - font-url('roboto-lightitalic.ttf') format('truetype'), - font-url('roboto-lightitalic.svg#latolight_italic') format('svg'); - font-weight: 300; - font-style: italic; + font-family: 'Open Sans'; + src: font-url('opensans-lightitalic.eot'); + src: font-url('opensans-lightitalic.eot?#iefix') format('embedded-opentype'), + font-url('opensans-lightitalic.woff2') format('woff2'), + font-url('opensans-lightitalic.woff') format('woff'), + font-url('opensans-lightitalic.ttf') format('truetype'), + font-url('opensans-lightitalic.svg#open_sanslight_italic') format('svg'); + font-weight: lighter; + font-style: italic; } @font-face { - font-family: 'Roboto'; - src: font-url('roboto-regular.eot'); - src: font-url('roboto-regular.eot?#iefix') format('embedded-opentype'), - font-url('roboto-regular.woff') format('woff'), - font-url('roboto-regular.ttf') format('truetype'), - font-url('roboto-regular.svg#latoregular') format('svg'); - font-weight: 400; - font-style: normal; + font-family: 'Open Sans'; + src: font-url('opensans-regular.eot'); + src: font-url('opensans-regular.eot?#iefix') format('embedded-opentype'), + font-url('opensans-regular.woff2') format('woff2'), + font-url('opensans-regular.woff') format('woff'), + font-url('opensans-regular.ttf') format('truetype'), + font-url('opensans-regular.svg#open_sansregular') format('svg'); + font-weight: normal; + font-style: normal; } @font-face { - font-family: 'Roboto'; - src: font-url('roboto-italic.eot'); - src: font-url('roboto-italic.eot?#iefix') format('embedded-opentype'), - font-url('roboto-italic.woff') format('woff'), - font-url('roboto-italic.ttf') format('truetype'), - font-url('roboto-italic.svg#latoitalic') format('svg'); - font-weight: 400; - font-style: italic; + font-family: 'Open Sans'; + src: url('opensans-italic.eot'); + src: url('opensans-italic.eot?#iefix') format('embedded-opentype'), + url('opensans-italic.woff2') format('woff2'), + url('opensans-italic.woff') format('woff'), + url('opensans-italic.ttf') format('truetype'), + url('opensans-italic.svg#open_sansitalic') format('svg'); + font-weight: normal; + font-style: italic; } @font-face { - font-family: 'Roboto'; - src: font-url('roboto-bold.eot'); - src: font-url('roboto-bold.eot?#iefix') format('embedded-opentype'), - font-url('roboto-bold.woff') format('woff'), - font-url('roboto-bold.ttf') format('truetype'), - font-url('roboto-bold.svg#latobold') format('svg'); - font-weight: bold; - font-style: normal; + font-family: 'Open Sans'; + src: font-url('opensans-bold.eot'); + src: font-url('opensans-bold.eot?#iefix') format('embedded-opentype'), + font-url('opensans-bold.woff2') format('woff2'), + font-url('opensans-bold.woff') format('woff'), + font-url('opensans-bold.ttf') format('truetype'), + font-url('opensans-bold.svg#open_sansbold') format('svg'); + font-weight: bold; + font-style: normal; } @font-face { - font-family: 'Roboto'; - src: font-url('roboto-bolditalic.eot'); - src: font-url('roboto-bolditalic.eot?#iefix') format('embedded-opentype'), - font-url('roboto-bolditalic.woff') format('woff'), - font-url('roboto-bolditalic.ttf') format('truetype'), - font-url('roboto-bolditalic.svg#latobold_italic') format('svg'); - font-weight: bold; - font-style: italic; -} - -@font-face { - font-family: 'Roboto'; - src: font-url('roboto-blackitalic.eot'); - src: font-url('roboto-blackitalic.eot?#iefix') format('embedded-opentype'), - font-url('roboto-blackitalic.woff') format('woff'), - font-url('roboto-blackitalic.ttf') format('truetype'), - font-url('roboto-blackitalic.svg#latobold_italic') format('svg'); - font-weight: bolder; - font-style: italic; + font-family: 'Open Sans'; + src: url('opensans-bolditalic.eot'); + src: url('opensans-bolditalic.eot?#iefix') format('embedded-opentype'), + url('opensans-bolditalic.woff2') format('woff2'), + url('opensans-bolditalic.woff') format('woff'), + url('opensans-bolditalic.ttf') format('truetype'), + url('opensans-bolditalic.svg#open_sansbold_italic') format('svg'); + font-weight: bold; + font-style: italic; } // 02. Lato // - - - - - - - - - - - - - - - - - - - - - - - - - @font-face { - font-family: 'Lato'; - src: font-url('lato-light.eot'); - src: font-url('lato-light.eot?#iefix') format('embedded-opentype'), - font-url('lato-light.woff2') format('woff2'), - font-url('lato-light.woff') format('woff'), - font-url('lato-light.ttf') format('truetype'), - font-url('lato-light.svg#latolight') format('svg'); - font-weight: 300; - font-style: normal; + font-family: 'Lato'; + src: font-url('lato-light.eot'); + src: font-url('lato-light.eot?#iefix') format('embedded-opentype'), + font-url('lato-light.woff2') format('woff2'), + font-url('lato-light.woff') format('woff'), + font-url('lato-light.ttf') format('truetype'), + font-url('lato-light.svg#latolight') format('svg'); + font-weight: lighter; + font-style: normal; } @font-face { - font-family: 'Lato'; - src: font-url('lato-lightitalic.eot'); - src: font-url('lato-lightitalic.eot?#iefix') format('embedded-opentype'), - font-url('lato-lightitalic.woff2') format('woff2'), - font-url('lato-lightitalic.woff') format('woff'), - font-url('lato-lightitalic.ttf') format('truetype'), - font-url('lato-lightitalic.svg#latolight_italic') format('svg'); - font-weight: 300; - font-style: italic; + font-family: 'Lato'; + src: font-url('lato-regular.eot'); + src: font-url('lato-regular.eot?#iefix') format('embedded-opentype'), + font-url('lato-regular.woff2') format('woff2'), + font-url('lato-regular.woff') format('woff'), + font-url('lato-regular.ttf') format('truetype'), + font-url('lato-regular.svg#latoregular') format('svg'); + font-weight: normal; + font-style: normal; } @font-face { - font-family: 'Lato'; - src: font-url('lato-regular.eot'); - src: font-url('lato-regular.eot?#iefix') format('embedded-opentype'), - font-url('lato-regular.woff2') format('woff2'), - font-url('lato-regular.woff') format('woff'), - font-url('lato-regular.ttf') format('truetype'), - font-url('lato-regular.svg#latoregular') format('svg'); - font-weight: normal; - font-style: normal; + font-family: 'Lato'; + src: font-url('lato-bold.eot'); + src: font-url('lato-bold.eot?#iefix') format('embedded-opentype'), + font-url('lato-bold.woff2') format('woff2'), + font-url('lato-bold.woff') format('woff'), + font-url('lato-bold.ttf') format('truetype'), + font-url('lato-bold.svg#latobold') format('svg'); + font-weight: bold; + font-style: normal; } - -@font-face { - font-family: 'Lato'; - src: font-url('lato-italic.eot'); - src: font-url('lato-italic.eot?#iefix') format('embedded-opentype'), - font-url('lato-italic.woff2') format('woff2'), - font-url('lato-italic.woff') format('woff'), - font-url('lato-italic.ttf') format('truetype'), - font-url('lato-italic.svg#latoitalic') format('svg'); - font-weight: normal; - font-style: italic; -} - -@font-face { - font-family: 'Lato'; - src: font-url('lato-bold.eot'); - src: font-url('lato-bold.eot?#iefix') format('embedded-opentype'), - font-url('lato-bold.woff2') format('woff2'), - font-url('lato-bold.woff') format('woff'), - font-url('lato-bold.ttf') format('truetype'), - font-url('lato-bold.svg#latobold') format('svg'); - font-weight: bold; - font-style: normal; -} - -@font-face { - font-family: 'Lato'; - src: font-url('lato-bolditalic.eot'); - src: font-url('lato-bolditalic.eot?#iefix') format('embedded-opentype'), - font-url('lato-bolditalic.woff2') format('woff2'), - font-url('lato-bolditalic.woff') format('woff'), - font-url('lato-bolditalic.ttf') format('truetype'), - font-url('lato-bolditalic.svg#latobold_italic') format('svg'); - font-weight: bold; - font-style: italic; -} \ No newline at end of file diff --git a/app/assets/stylesheets/icons.scss b/app/assets/stylesheets/icons.scss index c1c0d4f1e37..cfebe4e83d5 100644 --- a/app/assets/stylesheets/icons.scss +++ b/app/assets/stylesheets/icons.scss @@ -72,4 +72,10 @@ } .icon-check:before { content: "l"; -} \ No newline at end of file +} +.icon-edit:before { + content: "m"; +} +.icon-star:before { + content: "n"; +} diff --git a/app/assets/stylesheets/participacion.scss b/app/assets/stylesheets/participacion.scss index 09518ad238c..6e5ad3d7b08 100644 --- a/app/assets/stylesheets/participacion.scss +++ b/app/assets/stylesheets/participacion.scss @@ -2,7 +2,7 @@ // // 01. Variables // 02. Mixins -// 02. Global styles +// 03. Global styles // 04. Header // 05. Footer // 06. Tags @@ -30,7 +30,7 @@ a { color: white; - font-family: 'Lato'; + font-family: 'Lato' !important; font-size: rem-calc(20); font-weight: lighter; line-height: $line-height*4; @@ -43,7 +43,7 @@ } @media (min-width: 480px) { - font-size: rem-calc(30); + font-size: rem-calc(28); span { font-size: rem-calc(20); } @@ -60,17 +60,34 @@ } body { - background: $background; + background: $body; font-family: $font-family-sans-serif; font-size: rem-calc(13); font-weight: normal; text-rendering: optimizeLegibility; + + &::selection, ::-moz-selection { + background: $brand !important; + color: white !important; + } } p { font-size: rem-calc(13); line-height: $line-height; - margin-bottom: $line-height/2; + margin-bottom: rem-calc(12); +} + +a { + color: $link; + + &:hover { + color: $link-hover; + } +} + +h1, h2, h3, h4, h5, h6 { + font-family: $font-family-sans-serif; } .button { @@ -93,9 +110,18 @@ p { max-width: 100% !important; } -::selection, ::-moz-selection { - background: $brand; - color: white; +.sidebar { + margin-top: rem-calc(24); + margin-bottom: rem-calc(48); +} + +.sidebar-divider { + border-top: 1px solid $border; + margin-top: rem-calc(24); + + &:first-child { + margin-top: 0; + } } // 04. Header @@ -105,10 +131,10 @@ header { background: url('home_header_bg.jpg'); background-position: 50% 50%; background-size: cover; - min-height: $line-height*20; + min-height: rem-calc(480); &.results { - min-height: $line-height*8; + min-height: rem-calc(192); } h1 { @@ -116,7 +142,7 @@ header { font-size: rem-calc(45); font-weight: bolder; line-height: $line-height*3; - margin: $line-height 0 0 0; + margin: rem-calc(24) 0 0 0; padding: 0; } @@ -131,14 +157,14 @@ header { .button { color: white; font-family: inherit; - margin-top: $line-height; + margin-top: rem-calc(24); } .home-page { .button { color: white; font-family: inherit; - margin-top: $line-height*2; + margin-top: rem-calc(48); } } @@ -184,7 +210,7 @@ header { .top-bar { background: rgba(0,0,0,.5); color: white; - height: $line-height*4; + height: rem-calc(96); max-width: 1170px !important; .name a { @@ -201,13 +227,13 @@ header { } img { - margin-right: $line-height/2; + margin-right: rem-calc(12); } } } .top-bar-section { - margin-right: $line-height; + margin-right: rem-calc(24); ul li > a { font-size: rem-calc(14); @@ -230,7 +256,7 @@ header { li.active:not(.has-form) a:not(.button) { background: none; - height: $line-height*4; + height: rem-calc(96); line-height: $line-height*4; } } @@ -238,11 +264,11 @@ header { .top-links { color: white; font-size: rem-calc(14); - height: $line-height*3; - padding: $line-height/2 0; + height: rem-calc(72); + padding: rem-calc(12) 0; @media (min-width: 480px) { - height: $line-height*2; + height: rem-calc(48); } a { @@ -281,28 +307,26 @@ footer { padding-top: $line-height; } - // 06. Tags // - - - - - - - - - - - - - - - - - - - - - - - - - .tags { a { - background: $tags-bg; - border: 1px solid $tags-border; + background: $background; + border: 1px solid $border; border-radius: 3px; - color: $tags-color; + color: $text-medium; display: inline-block; font-size: rem-calc(13); line-height: rem-calc(22); margin-bottom: rem-calc(8); - margin-right: rem-calc(8); padding: 0 rem-calc(6); &:hover { color: $link; cursor: pointer; - background: #e5f1f8; + background: #E5F1F8; border: 1px solid $brand; } } @@ -312,14 +336,28 @@ footer { @extend .tags; h3 { - font-size: rem-calc(24); - font-weight: bold; - line-height: $line-height*2; - margin: 0; + border-top: 1px solid $votes-border; + display: inline-block; + font-family: $font-family-sans-serif; + font-size: rem-calc(16); + margin: -1px 0 rem-calc(12); + padding-top: rem-calc(6); + text-transform: uppercase; } a { - padding: $line-height/4 $line-height/3; + padding: rem-calc(6) rem-calc(8); + + .label { + color: white; + } + + &:hover { + + .label { + background: $brand; + } + } } } @@ -328,10 +366,10 @@ footer { .auth-page { background: url('auth_bg.jpg'); - margin-top: $line-height; + margin-top: rem-calc(24); @media (min-width: 480px) { - margin-top: $line-height*2; + margin-top: rem-calc(48); } h1 { @@ -340,10 +378,22 @@ footer { } .auth { - min-height: $line-height*20; + min-height: rem-calc(480); + + h2 { + clear: both; + font-size: rem-calc(30); + font-weight: bold; + line-height: $line-height*2; + } + + .back, .icon-angle-left { + @include back; + } .panel { background: white; + border: 0; h1 { font-size: rem-calc(30); @@ -362,12 +412,21 @@ form { line-height: $line-height; } - input[type]:not([type=submit]) { + input[type]:not([type=submit]):not([type=file]) { background: $input-bg; - height: $line-height*2; + height: rem-calc(48); margin-bottom: rem-calc(16); } + input[type="checkbox"] { + height: rem-calc(24) !important; + margin: 0 !important; + } + + input[type=file] { + margin: rem-calc(12) 0; + } + .note { display: block; font-size: rem-calc(13); @@ -375,17 +434,31 @@ form { } .ckeditor { - margin-bottom: $line-height; - min-height: $line-height*14; + margin-bottom: rem-calc(24); + min-height: rem-calc(336); } .checkbox { display: inline-block; font-size: rem-calc(14); - line-height: $line-height*2; + font-weight: normal; + line-height: $line-height; margin: 0 0 0 rem-calc(6); vertical-align: top; } + + .captcha { + border: 0; + padding: rem-calc(12) 0; + + input { + margin-bottom: 0 !important; + } + } + + .button { + margin-top: rem-calc(24); + } } // 09. Alerts @@ -423,23 +496,14 @@ form { .account { background: white; - min-height: $line-height*23; - padding-top: $line-height; - - input[type="checkbox"], .checkbox { - margin-top: -(rem-calc(12)); - } - - .back, .icon-angle-left { - @include back; - } + padding-top: rem-calc(24); h1 { clear: both; font-size: rem-calc(36); font-weight: bold; line-height: $line-height*2; - margin-bottom: $line-height; + margin-bottom: rem-calc(24); } .icon-comment-quotes { @@ -449,18 +513,36 @@ form { opacity: .5; } + .avatar { + margin-bottom: rem-calc(24); + } + + .initialjs-avatar { + margin-bottom: $line-height; + } + h2 { + clear: both; + font-size: rem-calc(30); + font-weight: bold; + line-height: $line-height; + margin: 0; + margin-bottom: rem-calc(12); + } + + h3 { clear: both; font-size: rem-calc(20); font-weight: bold; line-height: $line-height; margin: 0; + margin-bottom: rem-calc(12); } .recommendations { list-style-type: none; margin-left: 0; - margin-top: $line-height; + margin-top: rem-calc(24); li { font-size: rem-calc(12); @@ -473,4 +555,4 @@ form { } } } -} \ No newline at end of file +} diff --git a/app/assets/stylesheets/variables.scss b/app/assets/stylesheets/variables.scss index 6251d669daa..ca40c4e538a 100644 --- a/app/assets/stylesheets/variables.scss +++ b/app/assets/stylesheets/variables.scss @@ -9,44 +9,35 @@ // 01. Fonts // - - - - - - - - - - - - - - - - - - - - - - - - - -$font-family-sans-serif: 'Roboto', 'Helvetica Neue', Helvetica, Arial, sans-serif; +$font-family-sans-serif: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; $line-height: rem-calc(24); // 02. Colors // - - - - - - - - - - - - - - - - - - - - - - - - - +$body: #E9E9E9; $background: #EDEFF0; $border: #DEE0E3; $brand: #0077B9; -$check: #46DB91; -$debates: #008CCF; -$comments-bg: #F1F1F1; -$comments-info: #A5B2B9; -$comments-text: #3F4549; +$text: #222222; +$text-medium: #999999; +$text-light: #CCCCCC; -$header-color: #292B33; $link: #2895F1; -$link-hover: #2178BF; - -$tags-bg: #FAFAFA; -$tags-border: #F0F0F0; -$tags-color: #8F8F8F; - -$text-color: #222222; -$text-medium: #999999; -$text-light: #A3A6AD; +$link-hover: #2178BF; -$votes: #31708f; -$votes-background: #26AEEE; +$debates: #008CCF; +$votes-bg: #26AEEE; $votes-border: #1F94CB; + $votes-like: #7BD2A8; $votes-like-act: #5D9E7F; -$votes-neutral: #CCCCCC; -$votes-text: #FFFFFF; $votes-unlike: #EF8585; $votes-unlike-act: #BD6A6A; +$check: #46DB91; + // 03. Forms // - - - - - - - - - - - - - - - - - - - - - - - - - @@ -59,7 +50,7 @@ $success-bg: #DFF0D8; $success-border: #D6E9C6; $success-color: #3C763D; -$info-bg: #D9EDF7; +$info-bg: #D9EDF7; $info-border: #BCE8F1; $info-color: #31708F; diff --git a/app/controllers/account_controller.rb b/app/controllers/account_controller.rb index 3c81da2912d..091a280e697 100644 --- a/app/controllers/account_controller.rb +++ b/app/controllers/account_controller.rb @@ -11,17 +11,23 @@ def update if @account.update(account_params) redirect_to account_path, notice: t("flash.actions.save_changes.notice") else + @account.errors.messages.delete(:organization) render :show end end private + def set_account @account = current_user end def account_params - params.require(:account).permit(:first_name, :last_name, :phone_number, :nickname, :use_nickname, :email_on_debate_comment, :email_on_comment_reply) + if @account.organization? + params.require(:account).permit(:phone_number, :email_on_debate_comment, :email_on_comment_reply, organization_attributes: [:name]) + else + params.require(:account).permit(:first_name, :last_name, :phone_number, :nickname, :use_nickname, :email_on_debate_comment, :email_on_comment_reply) + end end end diff --git a/app/controllers/admin/base_controller.rb b/app/controllers/admin/base_controller.rb index 91524b6d3f3..f4322efe71d 100644 --- a/app/controllers/admin/base_controller.rb +++ b/app/controllers/admin/base_controller.rb @@ -10,4 +10,4 @@ def verify_administrator raise CanCan::AccessDenied unless current_user.try(:administrator?) end -end +end \ No newline at end of file diff --git a/app/controllers/admin/dashboard_controller.rb b/app/controllers/admin/dashboard_controller.rb index f7aa5c440b1..870d7ef5597 100644 --- a/app/controllers/admin/dashboard_controller.rb +++ b/app/controllers/admin/dashboard_controller.rb @@ -1,4 +1,5 @@ class Admin::DashboardController < Admin::BaseController + layout 'admin' def index end diff --git a/app/controllers/admin/tags_controller.rb b/app/controllers/admin/tags_controller.rb new file mode 100644 index 00000000000..ecacdbdb2bd --- /dev/null +++ b/app/controllers/admin/tags_controller.rb @@ -0,0 +1,37 @@ +class Admin::TagsController < Admin::BaseController + layout 'admin' + before_action :find_tag, only: [:update, :destroy] + + respond_to :html, :js + + def index + @tags = ActsAsTaggableOn::Tag.order(featured: :desc) + @tag = ActsAsTaggableOn::Tag.new + end + + def create + ActsAsTaggableOn::Tag.create(tag_params) + redirect_to admin_tags_path + end + + def update + @tag.update(tag_params) + redirect_to admin_tags_path + end + + def destroy + @tag.destroy + redirect_to admin_tags_path + end + + private + + def tag_params + params.require(:tag).permit(:featured, :name) + end + + def find_tag + @tag = ActsAsTaggableOn::Tag.find(params[:id]) + end + +end diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index ad69fd5118c..b879a4a8d17 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -1,9 +1,8 @@ require "application_responder" class ApplicationController < ActionController::Base - check_authorization unless: :devise_controller? - + include SimpleCaptcha::ControllerHelpers self.responder = ApplicationResponder respond_to :html @@ -20,27 +19,25 @@ class ApplicationController < ActionController::Base private - def set_locale - if params[:locale] && I18n.available_locales.include?(params[:locale].to_sym) - session[:locale] = params[:locale] - end + def set_locale + if params[:locale] && I18n.available_locales.include?(params[:locale].to_sym) + session[:locale] = params[:locale] + end - session[:locale] ||= I18n.default_locale - - I18n.locale = session[:locale] - end + session[:locale] ||= I18n.default_locale - def set_layout - if devise_controller? - "devise" - else - "application" + I18n.locale = session[:locale] end - end - def verify_captcha?(resource) - return true unless recaptcha_keys? - verify_recaptcha(model: resource) - end + def set_layout + if devise_controller? + "devise" + else + "application" + end + end + def set_debate_votes(debates) + @voted_values = current_user ? current_user.debate_votes(debates) : {} + end end diff --git a/app/controllers/comments_controller.rb b/app/controllers/comments_controller.rb index abee2974de4..71de112a9c9 100644 --- a/app/controllers/comments_controller.rb +++ b/app/controllers/comments_controller.rb @@ -1,17 +1,19 @@ class CommentsController < ApplicationController before_action :authenticate_user! before_action :build_comment, only: :create + before_action :parent, only: :create load_and_authorize_resource respond_to :html, :js def create - @comment.save! - @comment.move_to_child_of(parent) if reply? + if @comment.save + @comment.move_to_child_of(parent) if reply? - Mailer.comment(@comment).deliver_now if email_on_debate_comment? - Mailer.reply(@comment).deliver_now if email_on_comment_reply? - - respond_with @comment + Mailer.comment(@comment).deliver_now if email_on_debate_comment? + Mailer.reply(@comment).deliver_now if email_on_comment_reply? + else + render :new + end end def vote @@ -20,12 +22,13 @@ def vote end private + def comment_params - params.require(:comments).permit(:commentable_type, :commentable_id, :body) + params.require(:comment).permit(:commentable_type, :commentable_id, :body) end def build_comment - @comment = Comment.build(debate, current_user, params[:comment][:body]) + @comment = Comment.build(debate, current_user, comment_params[:body]) end def debate @@ -33,7 +36,7 @@ def debate end def parent - @parent ||= Comment.find_parent(params[:comment]) + @parent ||= Comment.find_parent(comment_params) end def reply? diff --git a/app/controllers/debates_controller.rb b/app/controllers/debates_controller.rb index d7296543267..0816245c739 100644 --- a/app/controllers/debates_controller.rb +++ b/app/controllers/debates_controller.rb @@ -1,61 +1,60 @@ class DebatesController < ApplicationController - include RecaptchaHelper before_action :authenticate_user!, except: [:index, :show] load_and_authorize_resource def index - if params[:tag] - @debates = Debate.tagged_with(params[:tag]).order("created_at DESC") - set_voted_values @debates.map(&:id) - else - @debates = Debate.all.order("created_at DESC") - set_voted_values @debates.map(&:id) - @featured_debates = @debates.to_a.shift(3) - end + @debates = Debate.search(params) + set_debate_votes(@debates) end def show - set_voted_values [@debate.id] + set_debate_votes(@debate) end def new @debate = Debate.new + load_featured_tags end def edit + load_featured_tags end def create @debate = Debate.new(debate_params) @debate.author = current_user - if verify_captcha?(@debate) and @debate.save + if @debate.save_with_captcha redirect_to @debate, notice: t('flash.actions.create.notice', resource_name: 'Debate') else + load_featured_tags render :new end end def update - @debate.update(debate_params) - respond_with @debate + @debate.assign_attributes(debate_params) + if @debate.save_with_captcha + redirect_to @debate, notice: t('flash.actions.update.notice', resource_name: 'Debate') + else + load_featured_tags + render :edit + end end def vote @debate.vote_by(voter: current_user, vote: params[:value]) - set_voted_values [@debate.id] + set_debate_votes(@debate) end private - def set_debate - @debate = Debate.find(params[:id]) - end def debate_params - params.require(:debate).permit(:title, :description, :tag_list, :terms_of_service) + params.require(:debate).permit(:title, :description, :tag_list, :terms_of_service, :captcha, :captcha_key) end - def set_voted_values(debates_ids) - @voted_values = current_user ? current_user.votes_on_debates(debates_ids) : {} + def load_featured_tags + @featured_tags = ActsAsTaggableOn::Tag.where(featured: true) end + end diff --git a/app/controllers/moderation/dashboard_controller.rb b/app/controllers/moderation/dashboard_controller.rb index ceaddd6f411..86196af376a 100644 --- a/app/controllers/moderation/dashboard_controller.rb +++ b/app/controllers/moderation/dashboard_controller.rb @@ -1,4 +1,5 @@ class Moderation::DashboardController < Moderation::BaseController + layout 'admin' def index end diff --git a/app/controllers/organizations/registrations_controller.rb b/app/controllers/organizations/registrations_controller.rb index 2751bc988d0..8602ba4bad2 100644 --- a/app/controllers/organizations/registrations_controller.rb +++ b/app/controllers/organizations/registrations_controller.rb @@ -1,6 +1,4 @@ class Organizations::RegistrationsController < Devise::RegistrationsController - include RecaptchaHelper - def new super do |user| user.build_organization @@ -8,22 +6,21 @@ def new end def create - if verify_captcha?(resource) + build_resource(sign_up_params) + if resource.valid_with_captcha? super do |user| # Removes unuseful "organization is invalid" error message user.errors.messages.delete(:organization) end else - build_resource(sign_up_params) - flash.now[:alert] = t('recaptcha.errors.verification_failed') - respond_with resource + render :new end end private def sign_up_params - params.require(:user).permit(:email, :password, :phone_number, :password_confirmation, organization_attributes: [:name]) + params.require(:user).permit(:email, :password, :phone_number, :password_confirmation, :captcha, :captcha_key, organization_attributes: [:name]) end end diff --git a/app/controllers/users/registrations_controller.rb b/app/controllers/users/registrations_controller.rb index 916b5128b0b..65da7e1e05f 100644 --- a/app/controllers/users/registrations_controller.rb +++ b/app/controllers/users/registrations_controller.rb @@ -1,12 +1,10 @@ class Users::RegistrationsController < Devise::RegistrationsController - include RecaptchaHelper def create - if verify_captcha?(resource) + build_resource(sign_up_params) + if resource.valid_with_captcha? super else - build_resource(sign_up_params) - flash.now[:alert] = t('recaptcha.errors.verification_failed') render :new end end @@ -14,7 +12,7 @@ def create private def sign_up_params - params.require(:user).permit(:first_name, :last_name, :email, :phone_number, :password, :password_confirmation, :use_nickname, :nickname) + params.require(:user).permit(:first_name, :last_name, :email, :phone_number, :password, :password_confirmation, :use_nickname, :nickname, :captcha, :captcha_key) end end diff --git a/app/controllers/welcome_controller.rb b/app/controllers/welcome_controller.rb new file mode 100644 index 00000000000..923609fab54 --- /dev/null +++ b/app/controllers/welcome_controller.rb @@ -0,0 +1,9 @@ +class WelcomeController < ApplicationController + skip_authorization_check + + def index + @featured_debates = Debate.limit(9) + set_debate_votes(@featured_debates) + end + +end \ No newline at end of file diff --git a/app/helpers/admin_helper.rb b/app/helpers/admin_helper.rb new file mode 100644 index 00000000000..a7fef3aa245 --- /dev/null +++ b/app/helpers/admin_helper.rb @@ -0,0 +1,13 @@ +module AdminHelper + + def side_menu + render "/#{namespace}/menu" + end + + private + + def namespace + controller.class.parent.name.downcase + end + +end \ No newline at end of file diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 70828c01a42..cee6db1991e 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -1,9 +1,4 @@ module ApplicationHelper - - def tags(debate) - debate.tag_list.sort.map { |tag| link_to sanitize(tag), debates_path(tag: tag) }.join('').html_safe - end - def percentage(vote, debate) return "0%" if debate.total_votes == 0 debate.send(vote).percent_of(debate.total_votes).to_s + "%" diff --git a/app/helpers/recaptcha_helper.rb b/app/helpers/recaptcha_helper.rb deleted file mode 100644 index fb4cceb2028..00000000000 --- a/app/helpers/recaptcha_helper.rb +++ /dev/null @@ -1,12 +0,0 @@ -module RecaptchaHelper - - def recaptchable?(resource) - resource.new_record? - end - - def recaptcha_keys? - Recaptcha.configuration.public_key.present? && - Recaptcha.configuration.private_key.present? - end - -end \ No newline at end of file diff --git a/app/models/comment.rb b/app/models/comment.rb index c2cf7529223..b8182b04fa6 100644 --- a/app/models/comment.rb +++ b/app/models/comment.rb @@ -1,5 +1,5 @@ class Comment < ActiveRecord::Base - acts_as_nested_set scope: [:commentable_id, :commentable_type] + acts_as_nested_set scope: [:commentable_id, :commentable_type], counter_cache: :children_count acts_as_votable validates :body, presence: true @@ -8,6 +8,8 @@ class Comment < ActiveRecord::Base belongs_to :commentable, polymorphic: true belongs_to :user + scope :recent, -> { order(id: :desc) } + def self.build(commentable, user, body) new commentable: commentable, user_id: user.id, @@ -26,4 +28,16 @@ def author user end + def total_votes + votes_for.size + end + + # TODO: faking counter cache since there is a bug with acts_as_nested_set :counter_cache + # Remove when https://github.com/collectiveidea/awesome_nested_set/issues/294 is fixed + # and reset counters using + # > Comment.find_each { |comment| Comment.reset_counters(comment.id, :children) } + def children_count + children.count + end + end diff --git a/app/models/debate.rb b/app/models/debate.rb index 28181101af0..b0d022c5199 100644 --- a/app/models/debate.rb +++ b/app/models/debate.rb @@ -1,7 +1,9 @@ require 'numeric' class Debate < ActiveRecord::Base + default_scope { order('created_at DESC') } - TITLE_LENGTH = Debate.columns.find{|c| c.name == 'title'}.limit + apply_simple_captcha + TITLE_LENGTH = Debate.columns.find { |c| c.name == 'title' }.limit acts_as_votable acts_as_commentable @@ -18,6 +20,14 @@ class Debate < ActiveRecord::Base before_validation :sanitize_description before_validation :sanitize_tag_list + def self.search(params) + if params[:tag] + tagged_with(params[:tag]) + else + all + end + end + def likes get_likes.size end @@ -42,6 +52,17 @@ def description super.try :html_safe end + def tag_list_with_limit(limit = nil) + tags.most_used(limit).pluck :name + end + + def tags_count_out_of_limit(limit = nil) + return 0 unless limit + + count = tags.count - limit + count < 0 ? 0 : count + end + protected def sanitize_description @@ -49,7 +70,7 @@ def sanitize_description end def sanitize_tag_list - self.tag_list = TagSanitizer.new.sanitize_tag_list(self.tag_list) + self.tag_list = TagSanitizer.new.sanitize_tag_list(self.tag_list) end end diff --git a/app/models/user.rb b/app/models/user.rb index ef1afc5ee82..764454874a6 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -1,4 +1,5 @@ class User < ActiveRecord::Base + apply_simple_captcha devise :database_authenticatable, :registerable, :confirmable, :recoverable, :rememberable, :trackable, :validatable @@ -23,20 +24,15 @@ class User < ActiveRecord::Base attr_accessor :organization_name attr_accessor :is_organization - after_save :create_associated_organization - def name return nickname if use_nickname? return organization.name if organization? "#{first_name} #{last_name}" end - def votes_on_debates(debates_ids = []) - debates_ids = debates_ids.flatten.compact.uniq - return {} if debates_ids.empty? - - voted = votes.where("votable_type = ? AND votable_id IN (?)", "Debate", debates_ids) - voted.each_with_object({}){ |v,_| _[v.votable_id] = v.vote_flag } + def debate_votes(debates) + voted = votes.for_debates.in(debates) + voted.each_with_object({}) { |v, _| _[v.votable_id] = v.value } end def administrator? diff --git a/app/views/account/show.html.erb b/app/views/account/show.html.erb index aae6ae28a65..fb647ef1d9e 100644 --- a/app/views/account/show.html.erb +++ b/app/views/account/show.html.erb @@ -1,57 +1,51 @@ diff --git a/app/views/comments/_errors.html.erb b/app/views/comments/_errors.html.erb new file mode 100644 index 00000000000..777225f645b --- /dev/null +++ b/app/views/comments/_errors.html.erb @@ -0,0 +1,2 @@ +
<%= t("errors.messages.blank").capitalize %>
+ diff --git a/app/views/comments/_votes.html.erb b/app/views/comments/_votes.html.erb index 2f92ff246c1..73efa56ba8f 100644 --- a/app/views/comments/_votes.html.erb +++ b/app/views/comments/_votes.html.erb @@ -1,11 +1,20 @@ + + + <%= t('debates.comment.votes', count: comment.total_votes) %> + + |  - <%= link_to "up", vote_comment_path(comment, value: 'yes'), - method: "post", remote: true %> + <%= link_to vote_comment_path(comment, value: 'yes'), + method: "post", remote: true do %> + + <% end %> <%= comment.get_likes.size %> - <%= link_to "down", vote_comment_path(comment, value: 'no'), - method: "post", remote: true %> + <%= link_to vote_comment_path(comment, value: 'no'), + method: "post", remote: true do %> + + <% end %> <%= comment.get_dislikes.size %> - \ No newline at end of file + diff --git a/app/views/comments/create.js.erb b/app/views/comments/create.js.erb index 9eeec31082c..f2b078195e9 100644 --- a/app/views/comments/create.js.erb +++ b/app/views/comments/create.js.erb @@ -1,3 +1,9 @@ var parent_id = '<%= dom_id(@parent) %>'; -App.Comments.reset_and_hide_form(parent_id); + +<% if @parent.is_a?(Debate) -%> + App.Comments.reset_form(parent_id); +<% else -%> + App.Comments.reset_and_hide_form(parent_id); +<% end -%> + App.Comments.add_response(parent_id, "<%= j(render @comment) %>"); diff --git a/app/views/comments/new.js.erb b/app/views/comments/new.js.erb new file mode 100644 index 00000000000..645129c7647 --- /dev/null +++ b/app/views/comments/new.js.erb @@ -0,0 +1,2 @@ +var field_with_errors = "#js-comment-form-<%= dom_id(@parent) %> #comment_body"; +App.Comments.display_error(field_with_errors, "<%= j render('comments/errors') %>"); diff --git a/app/views/debates/_debate.html.erb b/app/views/debates/_debate.html.erb index f31328ec9c0..56a5127c5ac 100644 --- a/app/views/debates/_debate.html.erb +++ b/app/views/debates/_debate.html.erb @@ -1,4 +1,4 @@ -
+
@@ -9,14 +9,13 @@

<%= link_to debate.title, debate %>

  - <%= pluralize(debate.comment_threads.count, - t("debates.debate.comment"), t("debates.debate.comments")) %> + <%= link_to t("debates.debate.comments", count: debate.comment_threads.count), debate_path(debate, anchor: "comments") %>

<%= link_to debate.description, debate %>
- <%= render "shared/tags", debate: debate %> + <%= render "shared/tags", debate: debate, limit: 5 %>
@@ -26,4 +25,4 @@
- \ No newline at end of file + diff --git a/app/views/debates/_form.html.erb b/app/views/debates/_form.html.erb index c38d2c476f6..096d88b22b8 100644 --- a/app/views/debates/_form.html.erb +++ b/app/views/debates/_form.html.erb @@ -1,20 +1,11 @@ <%= form_for(@debate) do |f| %> - <% if @debate.errors.any? %> -
-

<%= pluralize(@debate.errors.count, t("debates.form.error"), t("debates.form.errors")) %> <%= t("debates.form.not_saved") %>

-
    - <% @debate.errors.full_messages.each do |message| %> -
  • <%= message %>
  • - <% end %> -
-
- <% end %> + <%= render 'shared/errors', resource: @debate %>
<%= f.label :title, t("debates.form.debate_title") %> <%= t("debates.form.title_instructions") %> - <%= f.text_field :title, maxlength: Debate::TITLE_LENGTH %> + <%= f.text_field :title, maxlength: Debate::TITLE_LENGTH, placeholder: t("debates.form.debate_title") %>
@@ -26,22 +17,26 @@
<%= f.label :tag_list, t("debates.form.tags_label") %> <%= t("debates.form.tags_instructions") %> + + <% @featured_tags.each do |tag| %> + <%= tag.name %> + <% end %> + <%= f.text_field :tag_list, value: @debate.tag_list.to_s %>
<% if @debate.new_record? %> - <%= f.check_box :terms_of_service %> - <%= t("debates.form.accept_terms") %> + <%= f.check_box :terms_of_service, label: t("form.accept_terms") %> <% end %>
- <%= render 'shared/captcha', resource: @debate %> + <%= f.simple_captcha input_html: { required: false } %>
<%= f.submit(class: "button radius") %>
-<% end %> \ No newline at end of file +<% end %> diff --git a/app/views/debates/_votes.html.erb b/app/views/debates/_votes.html.erb index 7f47e26492d..4c252c8b59f 100644 --- a/app/views/debates/_votes.html.erb +++ b/app/views/debates/_votes.html.erb @@ -18,6 +18,14 @@
- <%= pluralize(debate.total_votes, t("debates.debate.vote"), t("debates.debate.votes")) %> + <%= t("debates.debate.votes", count: debate.total_votes) %> + + <% unless user_signed_in? %> + + <% end %> \ No newline at end of file diff --git a/app/views/debates/index.html.erb b/app/views/debates/index.html.erb index 9f521727069..3a3881b768e 100644 --- a/app/views/debates/index.html.erb +++ b/app/views/debates/index.html.erb @@ -1,13 +1,10 @@
-
<%= render @debates %>
-
-

<%= t("debates.show.comments") %>

+ +

+ <%= t("debates.show.comments_title") %> + (<%= t("debates.show.comments", count: @debate.comment_threads.count) %>) +

<% if user_signed_in? %>
<%= t("debates.show.leave_comment") %> <%= render 'comments/form', {parent: @debate, toggeable: false} %>
<% end %> - <%= render @debate.root_comments %> + <%= render @debate.root_comments.recent %>
- <% if current_user && @debate.editable_by?(current_user) %> - <%= link_to t("debates.show.edit_debate_link"), edit_debate_path(@debate), :class => 'button radius right' %> - <% end %>
diff --git a/app/views/devise/confirmations/new.html.erb b/app/views/devise/confirmations/new.html.erb index 8379bfeb4a7..188d6a8004d 100644 --- a/app/views/devise/confirmations/new.html.erb +++ b/app/views/devise/confirmations/new.html.erb @@ -4,11 +4,10 @@

<%= t("devise_views.confirmations.title") %>

<%= form_for(resource, as: resource_name, url: confirmation_path(resource_name), html: { method: :post }) do |f| %> - <%= devise_error_messages! %> + <%= render 'shared/errors', resource: resource %>
- <%= f.label :email, t("devise_views.confirmations.email_label") %> <%= f.email_field :email, autofocus: true, placeholder: t("devise_views.confirmations.email_label"), value: (resource.pending_reconfirmation? ? resource.unconfirmed_email : resource.email) %>
diff --git a/app/views/devise/passwords/edit.html.erb b/app/views/devise/passwords/edit.html.erb index cd0cf81ecca..6c1c822bc29 100644 --- a/app/views/devise/passwords/edit.html.erb +++ b/app/views/devise/passwords/edit.html.erb @@ -1,25 +1,30 @@ -

<%= t("devise_views.passwords.edit.title") %>

+
+
+
+

<%= t("devise_views.passwords.edit.title") %>

-<%= form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :put }) do |f| %> - <%= devise_error_messages! %> - <%= f.hidden_field :reset_password_token %> + <%= form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :put }) do |f| %> + <%= render 'shared/errors', resource: resource %> -
- <%= f.label :password, t("devise_views.passwords.edit.password_label") %>
- <% if @minimum_password_length %> - <%= t("devise_views.passwords.edit.min_length", min: @minimum_password_length) %> - <% end %>
- <%= f.password_field :password, autofocus: true, autocomplete: "off" %> -
+ <%= f.hidden_field :reset_password_token %> -
- <%= f.label :password_confirmation, t("devise_views.passwords.edit.password_confirmation_label") %>
- <%= f.password_field :password_confirmation, autocomplete: "off" %> -
+
+ <%= f.password_field :password, autofocus: true, autocomplete: "off", + label: t("devise_views.passwords.edit.password_label") %> +
-
- <%= f.submit t("devise_views.passwords.edit.change_submit") %> -
-<% end %> +
+ <%= f.password_field :password_confirmation, autocomplete: "off", + label: t("devise_views.passwords.edit.password_confirmation_label") %> +
-<%= render "devise/shared/links" %> +
+ <%= f.submit t("devise_views.passwords.edit.change_submit") %> +
+ <% end %> + + <%= render "devise/shared/links" %> + +
+
+
diff --git a/app/views/devise/passwords/new.html.erb b/app/views/devise/passwords/new.html.erb index b09e0435a2f..78a8b8b4ca9 100644 --- a/app/views/devise/passwords/new.html.erb +++ b/app/views/devise/passwords/new.html.erb @@ -3,10 +3,10 @@

<%= t("devise_views.passwords.new.title") %>

<%= form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :post }) do |f| %> - <%= devise_error_messages! %> + <%= render 'shared/errors', resource: resource %> +
- <%= f.label :email, t("devise_views.passwords.new.email_label") %> <%= f.email_field :email, autofocus: true, placeholder: t("devise_views.passwords.new.email_label") %>
diff --git a/app/views/devise/sessions/new.html.erb b/app/views/devise/sessions/new.html.erb index 1ff5330739e..391ef186c73 100644 --- a/app/views/devise/sessions/new.html.erb +++ b/app/views/devise/sessions/new.html.erb @@ -1,24 +1,21 @@
-

<%= t("devise_views.sessions.new.title") %>

+

<%= t("devise_views.sessions.new.title") %>

<%= form_for(resource, as: resource_name, url: session_path(resource_name)) do |f| %>
- <%= f.label :email, t("devise_views.sessions.new.email_label") %> <%= f.email_field :email, autofocus: true, placeholder: t("devise_views.sessions.new.email_label") %>
- <%= f.label :password, t("devise_views.sessions.new.password_label") %> <%= f.password_field :password, autocomplete: "off", placeholder: t("devise_views.sessions.new.password_label") %>
<% if devise_mapping.rememberable? -%>
- <%= f.check_box :remember_me %> - <%= f.label :remember_me, t("devise_views.sessions.new.remember_me") %> + <%= f.check_box :remember_me, label: t("devise_views.sessions.new.remember_me") %>
<% end -%> diff --git a/app/views/devise/unlocks/new.html.erb b/app/views/devise/unlocks/new.html.erb index a9266266407..d2120943807 100644 --- a/app/views/devise/unlocks/new.html.erb +++ b/app/views/devise/unlocks/new.html.erb @@ -1,16 +1,23 @@ -

<%= t("devise_views.unlocks.new.title") %>

+
+
+
+

<%= t("devise_views.unlocks.new.title") %>

-<%= form_for(resource, as: resource_name, url: unlock_path(resource_name), html: { method: :post }) do |f| %> - <%= devise_error_messages! %> + <%= form_for(resource, as: resource_name, url: unlock_path(resource_name), html: { method: :post }) do |f| %> + <%= render 'shared/errors', resource: resource %> -
- <%= f.label :email, t("devise_views.unlocks.new.email_label") %>
- <%= f.email_field :email, autofocus: true %> -
+
+ <%= f.email_field :email, autofocus: true, + label: t("devise_views.unlocks.new.email_label") %> +
-
- <%= f.submit t("devise_views.unlocks.new.submit") %> -
-<% end %> +
+ <%= f.submit t("devise_views.unlocks.new.submit") %> +
+ <% end %> -<%= render "devise/shared/links" %> + <%= render "devise/shared/links" %> + +
+
+
\ No newline at end of file diff --git a/app/views/layouts/_header.html.erb b/app/views/layouts/_header.html.erb index 48ffa41d574..b88dcded4ad 100644 --- a/app/views/layouts/_header.html.erb +++ b/app/views/layouts/_header.html.erb @@ -11,9 +11,10 @@ ]
@@ -32,6 +33,7 @@
<%= render 'devise/menu/login_items' %> + <%= render 'shared/admin_login_items' %>
@@ -41,8 +43,8 @@

<%= t("layouts.header.open_city") %>

<%= t("layouts.header.open_city_slogan") %>

- <%= link_to t("layouts.header.create_debate"), new_debate_path, class: 'button radius' %> + <%= link_to t("layouts.header.see_all_debates"), debates_path, class: 'button radius' %>
<% end %> - \ No newline at end of file + diff --git a/app/views/layouts/admin.html.erb b/app/views/layouts/admin.html.erb new file mode 100644 index 00000000000..b23b3e193e3 --- /dev/null +++ b/app/views/layouts/admin.html.erb @@ -0,0 +1,33 @@ + + + + + + + + <%= content_for?(:title) ? yield(:title) : "Admin" %> + <%= stylesheet_link_tag "application" %> + <%= javascript_include_tag "vendor/modernizr" %> + <%= javascript_include_tag "application", 'data-turbolinks-track' => true %> + <%= csrf_meta_tags %> + + + + <%= render 'layouts/header' %> + + <% if notice %> +

<%= notice %>

+ <% end %> + + <% if alert %> +

<%= alert %>

+ <% end %> + +
+ <%= side_menu %> +
+ + <%= yield %> + + + \ No newline at end of file diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index 36a3c44cc9c..eee30377e7f 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -9,7 +9,6 @@ <%= javascript_include_tag "vendor/modernizr" %> <%= javascript_include_tag "application", 'data-turbolinks-track' => true %> <%= csrf_meta_tags %> - diff --git a/app/views/layouts/devise.html.erb b/app/views/layouts/devise.html.erb index fe73e555332..85f448f81f5 100644 --- a/app/views/layouts/devise.html.erb +++ b/app/views/layouts/devise.html.erb @@ -9,7 +9,6 @@ <%= javascript_include_tag "vendor/modernizr" %> <%= javascript_include_tag "application", 'data-turbolinks-track' => true %> <%= csrf_meta_tags %> - diff --git a/app/views/moderation/_menu.html.erb b/app/views/moderation/_menu.html.erb new file mode 100644 index 00000000000..21997abcaff --- /dev/null +++ b/app/views/moderation/_menu.html.erb @@ -0,0 +1,3 @@ +
+ Moderation links +
\ No newline at end of file diff --git a/app/views/organizations/registrations/new.html.erb b/app/views/organizations/registrations/new.html.erb index f8ca107be61..4f8b05862ca 100644 --- a/app/views/organizations/registrations/new.html.erb +++ b/app/views/organizations/registrations/new.html.erb @@ -1,64 +1,36 @@ -
-
-
-
-

<%= t("devise_views.organizations.registrations.new.title") %>

+
+
+
+

<%= t("devise_views.organizations.registrations.new.title") %>

- <%= form_for(resource, as: :user, url: organization_registration_path) do |f| %> + <%= form_for(resource, as: :user, url: organization_registration_path) do |f| %> + <%= render 'shared/errors', resource: resource %> +
+
- <%= devise_error_messages! %> + <%= f.fields_for :organization do |fo| %> + <%= fo.text_field :name, autofocus: true, placeholder: t("devise_views.organizations.registrations.new.organization_name_label") %> + <% end %> - <%= f.fields_for :organization do |fo| %> -
-
- <%= fo.label :organization_name, t("devise_views.organizations.registrations.new.organization_name_label") %> - <%= fo.text_field :name, autofocus: true, placeholder: t("devise_views.organizations.registrations.new.organization_name_label") %> -
-
- <% end %> + <%= f.email_field :email, placeholder: t("devise_views.organizations.registrations.new.email_label") %> -
-
- <%= f.label :email, t("devise_views.organizations.registrations.new.email_label") %> - <%= f.email_field :email, placeholder: t("devise_views.organizations.registrations.new.email_label") %> -
-
+ <%= f.text_field :phone_number, placeholder: t("devise_views.organizations.registrations.new.phone_number_label") %> -
-
- <%= f.label :phone_number, t("devise_views.organizations.registrations.new.phone_number_label") %> - <%= f.text_field :phone_number, placeholder: t("devise_views.organizations.registrations.new.phone_number_label") %> -
-
+ <%= f.password_field :password, autocomplete: "off", + placeholder: t("devise_views.organizations.registrations.new.password_label") %> -
-
- <%= f.label :password, t("devise_views.organizations.registrations.new.password_label"), class: "inline-block" %> - <% if @minimum_password_length %> - <%= t("devise_views.organizations.registrations.new.min_length", min: @minimum_password_length) %> - <% end %> - <%= f.password_field :password, autocomplete: "off", placeholder: t("devise_views.organizations.registrations.new.password_label") %> -
-
+ <%= f.password_field :password_confirmation, autocomplete: "off", + label: t("devise_views.organizations.registrations.new.password_confirmation_label"), + placeholder: t("devise_views.organizations.registrations.new.password_confirmation_label") %> -
-
- <%= f.label :password_confirmation, t("devise_views.organizations.registrations.new.password_confirmation_label") %> - <%= f.password_field :password_confirmation, autocomplete: "off", placeholder: t("devise_views.organizations.registrations.new.password_confirmation_label") %> -
-
+ <%= f.simple_captcha input_html: {required: false} %> - <%= render 'shared/captcha', resource: resource %> - -
-
- <%= f.submit t("devise_views.organizations.registrations.new.submit"), class: "button radius expand" %> -
-
- <% end %> - - <%= render "devise/shared/links" %> -
+ <%= f.submit t("devise_views.organizations.registrations.new.submit"), class: "button radius expand" %> +
+ <% end %> + + <%= render "devise/shared/links" %>
+
diff --git a/app/views/shared/_admin_login_items.html.erb b/app/views/shared/_admin_login_items.html.erb new file mode 100644 index 00000000000..e268def4b6e --- /dev/null +++ b/app/views/shared/_admin_login_items.html.erb @@ -0,0 +1,15 @@ +
    + <% if current_user %> + <% if current_user.administrator? %> +
  • + <%= link_to t("layouts.header.administration"), admin_root_path %> +
  • + <% end %> + + <% if current_user.moderator? %> +
  • + <%= link_to t("layouts.header.moderation"), moderation_root_path %> +
  • + <% end %> + <% end %> +
\ No newline at end of file diff --git a/app/views/shared/_captcha.html.erb b/app/views/shared/_captcha.html.erb deleted file mode 100644 index 42ccb593682..00000000000 --- a/app/views/shared/_captcha.html.erb +++ /dev/null @@ -1,3 +0,0 @@ -<% if recaptchable?(resource) and recaptcha_keys? %> - <%= recaptcha_tags ajax: true, hl: I18n.locale %> -<% end %> \ No newline at end of file diff --git a/app/views/shared/_errors.html.erb b/app/views/shared/_errors.html.erb new file mode 100644 index 00000000000..4e22c3038fa --- /dev/null +++ b/app/views/shared/_errors.html.erb @@ -0,0 +1,10 @@ +<% if resource.errors.any? %> +
+

+ + <%= pluralize resource.errors.count, t("form.error"), t("form.errors") %> + <%= t("form.not_saved", resource: t("form.#{resource.class.to_s.downcase}")) %> + +

+
+<% end %> \ No newline at end of file diff --git a/app/views/shared/_tag_cloud.html.erb b/app/views/shared/_tag_cloud.html.erb index c113a76bb92..9fb4ff37130 100644 --- a/app/views/shared/_tag_cloud.html.erb +++ b/app/views/shared/_tag_cloud.html.erb @@ -1,6 +1,8 @@
+

<%= t("shared.tags_cloud.tags") %>

+
<% tag_cloud Debate.tag_counts, %w[s m l] do |tag, css_class| %> - <%= link_to sanitize("#{tag.name}(#{tag.taggings_count})"), debates_path(tag: tag.name), class: css_class %> + <%= link_to sanitize("#{tag.name} #{tag.taggings_count}"), debates_path(tag: tag.name), class: css_class %> <% end %> -
\ No newline at end of file +
diff --git a/app/views/shared/_tags.html.erb b/app/views/shared/_tags.html.erb index 8be6da57904..6a61bd4b482 100644 --- a/app/views/shared/_tags.html.erb +++ b/app/views/shared/_tags.html.erb @@ -1,3 +1,13 @@ +<%- limit ||= nil %> + <% if debate.tags.any? %> - <%= tags(debate) %> -<% end %> \ No newline at end of file + + <% debate.tag_list_with_limit(limit).each do |tag| %> + <%= link_to sanitize(tag), debates_path(tag: tag) %> + <% end %> + + <% if debate.tags_count_out_of_limit(limit) > 0 %> + <%= link_to "#{debate.tags_count_out_of_limit(limit)}+", debate_path(debate) %> + <% end %> + +<% end %> diff --git a/app/views/simple_captcha/_simple_captcha.erb b/app/views/simple_captcha/_simple_captcha.erb new file mode 100644 index 00000000000..f97b9b5a64c --- /dev/null +++ b/app/views/simple_captcha/_simple_captcha.erb @@ -0,0 +1,8 @@ +
+ <%= simple_captcha_options[:image] %> + <%= simple_captcha_options[:refresh_button] %> + + <%= simple_captcha_options[:label] %> + + <%= simple_captcha_options[:field] %> +
diff --git a/app/views/users/registrations/new.html.erb b/app/views/users/registrations/new.html.erb index c41028fe6a7..c39c5f5f178 100644 --- a/app/views/users/registrations/new.html.erb +++ b/app/views/users/registrations/new.html.erb @@ -1,82 +1,36 @@ -
-
-
-
-

<%= t("devise_views.users.registrations.new.title") %>

- - <%= form_for(resource, as: resource_name, url: registration_path(resource_name)) do |f| %> - <%= devise_error_messages! %> - -
-
- <%= f.label :first_name, t("devise_views.users.registrations.new.first_name_label") %> - <%= f.text_field :first_name, autofocus: true, placeholder: t("devise_views.users.registrations.new.first_name_label") %> -
-
- -
-
- <%= f.label :last_name, t("devise_views.users.registrations.new.last_name_label") %> - <%= f.text_field :last_name, placeholder: t("devise_views.users.registrations.new.last_name_label") %> -
-
- -
-
- <%= f.check_box :use_nickname %> - <%= t("devise_views.users.registrations.new.use_nickname_label") %> -
-
- -
-
- <%= f.label :nickname, t("devise_views.users.registrations.new.nickname_label") %> - <%= f.text_field :nickname, placeholder: t("devise_views.users.registrations.new.nickname_label") %> -
-
- -
-
- <%= f.label :email, t("devise_views.users.registrations.new.email_label") %> - <%= f.email_field :email, placeholder: t("devise_views.users.registrations.new.email_label") %> -
-
- -
-
- <%= f.label :phone_number, t("devise_views.users.registrations.new.phone_number_label") %> - <%= f.text_field :phone_number, placeholder: t("devise_views.users.registrations.new.phone_number_label") %> -
-
- -
-
- <%= f.label :password, t("devise_views.users.registrations.new.password_label"), class: "inline-block" %> - <% if @minimum_password_length %> - <%= t("devise_views.users.registrations.new.min_length", min: @minimum_password_length) %> - <% end %> - <%= f.password_field :password, autocomplete: "off", placeholder: t("devise_views.users.registrations.new.password_label") %> -
-
- -
-
- <%= f.label :password_confirmation, t("devise_views.users.registrations.new.password_confirmation_label") %> - <%= f.password_field :password_confirmation, autocomplete: "off", placeholder: t("devise_views.users.registrations.new.password_confirmation_label") %> -
-
- - <%= render 'shared/captcha', resource: resource %> - -
-
- <%= f.submit t("devise_views.users.registrations.new.submit"), class: "button radius expand" %> -
-
- <% end %> - - <%= render "devise/shared/links" %> -
+
+
+
+

<%= t("devise_views.users.registrations.new.title") %>

+ <%= form_for(resource, as: resource_name, url: registration_path(resource_name)) do |f| %> + <%= render 'shared/errors', resource: resource %> +
+
+ <%= f.text_field :first_name, autofocus: true, + placeholder: t("devise_views.users.registrations.new.first_name_label") %> + <%= f.text_field :last_name, placeholder: t("devise_views.users.registrations.new.last_name_label") %> + <%= f.email_field :email, placeholder: t("devise_views.users.registrations.new.email_label") %> + <%= f.text_field :nickname, placeholder: t("devise_views.users.registrations.new.nickname_label") %> + + <%= f.check_box :use_nickname, label: t("devise_views.users.registrations.new.use_nickname_label") %> + + <%= f.text_field :phone_number, placeholder: t("devise_views.users.registrations.new.phone_number_label") %> + + <%= f.password_field :password, autocomplete: "off", + placeholder: t("devise_views.users.registrations.new.password_label") %> + + <%= f.password_field :password_confirmation, autocomplete: "off", + label: t("devise_views.users.registrations.new.password_confirmation_label"), + placeholder: t("devise_views.users.registrations.new.password_confirmation_label") %> + + <%= f.simple_captcha input_html: {required: false} %> + + <%= f.submit t("devise_views.users.registrations.new.submit"), class: "button radius expand" %> +
+ <% end %> + + <%= render "devise/shared/links" %>
+
diff --git a/app/views/debates/_featured_debate.html.erb b/app/views/welcome/_featured_debate.html.erb similarity index 79% rename from app/views/debates/_featured_debate.html.erb rename to app/views/welcome/_featured_debate.html.erb index 602b3d603d5..a1992e3374f 100644 --- a/app/views/debates/_featured_debate.html.erb +++ b/app/views/welcome/_featured_debate.html.erb @@ -8,14 +8,13 @@

<%= link_to featured_debate.title, featured_debate %>

  - <%= pluralize(featured_debate.comment_threads.count, - t("debates.show.comment"), t("debates.show.comments")) %> + <%= link_to t("debates.show.comments", count: featured_debate.comment_threads.count), debate_path(featured_debate, anchor: "comments") %>

<%= link_to featured_debate.description, featured_debate %>
- <%= render "shared/tags", debate: featured_debate %> + <%= render "shared/tags", debate: featured_debate, limit: 5 %>
@@ -26,4 +25,4 @@
-
\ No newline at end of file +
diff --git a/app/views/welcome/index.html.erb b/app/views/welcome/index.html.erb new file mode 100644 index 00000000000..434499859f2 --- /dev/null +++ b/app/views/welcome/index.html.erb @@ -0,0 +1,5 @@ +
+ +
\ No newline at end of file diff --git a/config/application.rb b/config/application.rb index cc325bc6ced..8cd17632d4a 100644 --- a/config/application.rb +++ b/config/application.rb @@ -32,5 +32,6 @@ class Application < Rails::Application # Add lib to the autoload path config.autoload_paths << Rails.root.join('lib') + config.time_zone = 'Madrid' end end diff --git a/config/database.yml.example b/config/database.yml.example index 7813e5e3aca..93d3fd3b876 100644 --- a/config/database.yml.example +++ b/config/database.yml.example @@ -10,6 +10,9 @@ development: <<: *default database: participacion_development +staging: + <<: *default + test: <<: *default database: participacion_test \ No newline at end of file diff --git a/config/deploy-secrets.yml.example b/config/deploy-secrets.yml.example index b69fea22574..696f6ce7558 100644 --- a/config/deploy-secrets.yml.example +++ b/config/deploy-secrets.yml.example @@ -3,6 +3,8 @@ staging: ssh_port: 21 server: staging.participacion.madrid.es user: xxxxx + server_name: staging.participacion.madrid.es + db_server: postgre.participacion.madrid.es preproduction: deploy_to: "/var/www/participacion" diff --git a/config/deploy.rb b/config/deploy.rb index 8104d742f5c..9c45bd28389 100644 --- a/config/deploy.rb +++ b/config/deploy.rb @@ -8,14 +8,20 @@ def deploysecret(key) set :rails_env, fetch(:stage) set :rvm_ruby_version, '2.2.2' +set :rvm_type, :user set :application, 'participacion' -set :repo_url, 'git@github.com:AyuntamientoMadrid/participacion.git' +set :server_name, deploysecret(:server_name) +#set :repo_url, 'git@github.com:AyuntamientoMadrid/participacion.git' +# If ssh access is restricted, probably you need to use https access +set :repo_url, 'https://github.com/AyuntamientoMadrid/participacion.git' set :scm, :git set :revision, `git rev-parse --short #{fetch(:branch)}`.strip set :log_level, :info +set :pty, true +set :use_sudo, false set :linked_files, %w{config/database.yml config/secrets.yml} set :linked_dirs, %w{log tmp public/system public/assets} @@ -24,15 +30,27 @@ def deploysecret(key) set :local_user, ENV['USER'] -namespace :deploy do +# Run test before deploy +set :tests, ["spec"] + +# Config files should be copied by deploy:setup_config +set(:config_files, %w( + log_rotation + database.yml + secrets.yml + unicorn.rb + sidekiq.yml +)) - after :restart, :clear_cache do - on roles(:web), in: :groups, limit: 3, wait: 10 do - # Here we can do anything such as: - # within release_path do - # execute :rake, 'cache:clear' - # end - end - end +namespace :deploy do + # Check right version of deploy branch + before :deploy, "deploy:check_revision" + # Run test aund continue only if passed + before :deploy, "deploy:run_tests" + # Compile assets locally and then rsync + after 'deploy:symlink:shared', 'deploy:compile_assets_locally' + after :finishing, 'deploy:cleanup' + # Restart unicorn + after 'deploy:publishing', 'deploy:restart' end diff --git a/config/deploy/preproduction.rb b/config/deploy/preproduction.rb index fb9033c038f..7a18c011d95 100644 --- a/config/deploy/preproduction.rb +++ b/config/deploy/preproduction.rb @@ -1,5 +1,9 @@ set :deploy_to, deploysecret(:deploy_to) -set :branch, :production +set :server_name, deploysecret(:server_name) +set :db_server, deploysecret(:db_server) +set :branch, :master set :ssh_options, port: deploysecret(:ssh_port) +set :stage, :production +set :rails_env, :production -server deploysecret(:server), user: deploysecret(:user), roles: %w(web app db importer) \ No newline at end of file +server deploysecret(:server), user: deploysecret(:user), roles: %w(web app db importer) diff --git a/config/deploy/production.rb b/config/deploy/production.rb index fb9033c038f..7a18c011d95 100644 --- a/config/deploy/production.rb +++ b/config/deploy/production.rb @@ -1,5 +1,9 @@ set :deploy_to, deploysecret(:deploy_to) -set :branch, :production +set :server_name, deploysecret(:server_name) +set :db_server, deploysecret(:db_server) +set :branch, :master set :ssh_options, port: deploysecret(:ssh_port) +set :stage, :production +set :rails_env, :production -server deploysecret(:server), user: deploysecret(:user), roles: %w(web app db importer) \ No newline at end of file +server deploysecret(:server), user: deploysecret(:user), roles: %w(web app db importer) diff --git a/config/deploy/sample_config_files/apache_passenger.conf b/config/deploy/sample_config_files/apache_passenger.conf new file mode 100644 index 00000000000..f97fc9b2ad0 --- /dev/null +++ b/config/deploy/sample_config_files/apache_passenger.conf @@ -0,0 +1,19 @@ + + + ServerName yourdomain.com + ServerAlias www.yourdomain.com + ServerAdmin webmaster@localhost + + DocumentRoot /path/to/deploy_to/current/public + + # RailsEnv production + + ErrorLog ${APACHE_LOG_DIR}/yourdomain.error.log + CustomLog ${APACHE_LOG_DIR}/yourdomain.access.log combined + + + Options FollowSymLinks + Require all granted + + + diff --git a/config/deploy/sample_config_files/apache_unicorn.conf b/config/deploy/sample_config_files/apache_unicorn.conf new file mode 100644 index 00000000000..93aafec2342 --- /dev/null +++ b/config/deploy/sample_config_files/apache_unicorn.conf @@ -0,0 +1,31 @@ + + + ServerAdmin admin@yourdomain.com + ServerName yourdomain.com + ServerAlias www.yourdomain.com + + DocumentRoot /path/to/deploy_to/current/public + + RewriteEngine On + + + BalancerMember http://127.0.0.1:5000 + + + # Redirect all non-static requests to thin + RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f + RewriteRule ^/(.*)$ balancer://unicornservers%{REQUEST_URI} [P,QSA,L] + + ProxyPass / balancer://unicornservers/ + ProxyPassReverse / balancer://unicornservers/ + ProxyPreserveHost on + + + Order deny,allow + Allow from all + + + ErrorLog ${APACHE_LOG_DIR}/yourdomain.error.log + CustomLog ${APACHE_LOG_DIR}/yourdomain.access.log combined + + diff --git a/config/deploy/sample_config_files/unicorn_init.sh b/config/deploy/sample_config_files/unicorn_init.sh new file mode 100644 index 00000000000..1cef9110ba8 --- /dev/null +++ b/config/deploy/sample_config_files/unicorn_init.sh @@ -0,0 +1,96 @@ +#!/bin/sh + +### BEGIN INIT INFO +# Provides: unicorn +# Required-Start: $local_fs $remote_fs $network $syslog +# Required-Stop: $local_fs $remote_fs $network $syslog +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: starts the unicorn web server +# Description: starts unicorn +### END INIT INFO + +set -e + +TIMEOUT=${TIMEOUT-60} +APP_ROOT=<%= current_path %> +PID_DIR=$APP_ROOT/tmp/pids +PID=$PID_DIR/unicorn.pid +CMD="cd $APP_ROOT; bundle exec unicorn -D -c /path/to/shared/config/unicorn.rb -E production" +AS_USER=deploy +set -u + +OLD_PIN="$PID.oldbin" + +sig () { + test -s "$PID" && kill -$1 `cat $PID` +} + +oldsig () { + test -s $OLD_PIN && kill -$1 `cat $OLD_PIN` +} + +workersig () { + workerpid="$APP_ROOT/tmp/pids/unicorn.$2.pid" + + test -s "$workerpid" && kill -$1 `cat $workerpid` +} + +run () { + if [ "$(id -un)" = "$AS_USER" ]; then + eval $1 + else + su -c "$1" - $AS_USER + fi +} + +case "$1" in +start) + sig 0 && echo >&2 "Already running" && exit 0 + run "$CMD" + ;; +stop) + sig QUIT && exit 0 + echo >&2 "Not running" + ;; +force-stop) + sig TERM && exit 0 + echo >&2 "Not running" + ;; +kill_worker) + workersig QUIT $2 && exit 0 + echo >&2 "Worker not running" + ;; +restart|reload) + sig USR2 && echo reloaded OK && exit 0 + echo >&2 "Couldn't reload, starting '$CMD' instead" + run "$CMD" + ;; +upgrade) + if sig USR2 && sleep 2 && sig 0 && oldsig QUIT + then + n=$TIMEOUT + while test -s $OLD_PIN && test $n -ge 0 + do + printf '.' && sleep 1 && n=$(( $n - 1 )) + done + echo + + if test $n -lt 0 && test -s $OLD_PIN + then + echo >&2 "$OLD_PIN still exists after $TIMEOUT seconds" + exit 1 + fi + exit 0 + fi + echo >&2 "Couldn't upgrade, starting '$CMD' instead" + run "$CMD" + ;; +reopen-logs) + sig USR1 + ;; +*) + echo >&2 "Usage: $0 " + exit 1 + ;; +esac diff --git a/config/deploy/shared/database.yml.erb b/config/deploy/shared/database.yml.erb new file mode 100644 index 00000000000..2449ae6f827 --- /dev/null +++ b/config/deploy/shared/database.yml.erb @@ -0,0 +1,10 @@ +<%= fetch(:rails_env) %>: + adapter: postgresql + timeout: 5000 + encoding: unicode + reconnect: false + database: <%= "#{fetch(:application)}" %> + pool: 5 + username: + password: + host: <%= fetch(:db_server) %> diff --git a/config/deploy/shared/log_rotation.erb b/config/deploy/shared/log_rotation.erb new file mode 100755 index 00000000000..7507de18401 --- /dev/null +++ b/config/deploy/shared/log_rotation.erb @@ -0,0 +1,11 @@ +<%= fetch(:deploy_to) %>/shared/log/*.log { + daily + missingok + rotate 52 + compress + delaycompress + notifempty + sharedscripts + endscript + copytruncate +} diff --git a/config/deploy/shared/secrets.yml.erb b/config/deploy/shared/secrets.yml.erb new file mode 100644 index 00000000000..d3c3251af9a --- /dev/null +++ b/config/deploy/shared/secrets.yml.erb @@ -0,0 +1,4 @@ +<%= fetch(:rails_env) %>: + recaptcha_public_key: <%= ENV["MADRID_RECAPTCHA_PUBLIC_KEY"] %> + recaptcha_private_key: <%= ENV["MADRID_RECAPTCHA_PRIVATE_KEY"] %> + secret_key_base: <%= ENV["SECRET_KEY_BASE"] %> diff --git a/config/deploy/shared/sidekiq.yml.erb b/config/deploy/shared/sidekiq.yml.erb new file mode 100644 index 00000000000..1d4747933a1 --- /dev/null +++ b/config/deploy/shared/sidekiq.yml.erb @@ -0,0 +1,2 @@ +<%= fetch(:rails_env) %>: + :concurrency: <%= fetch(:sidekiq_concurrency, 5) %> diff --git a/config/deploy/shared/unicorn.rb.erb b/config/deploy/shared/unicorn.rb.erb new file mode 100755 index 00000000000..805734276da --- /dev/null +++ b/config/deploy/shared/unicorn.rb.erb @@ -0,0 +1,42 @@ +root = "<%= current_path %>" +working_directory root +pid "#{root}/tmp/pids/unicorn.pid" +stderr_path "#{root}/log/unicorn.log" +stdout_path "#{root}/log/unicorn.log" + +listen 5000 +#listen "/tmp/unicorn.<%= fetch(:application) %>.sock" +worker_processes 4 +timeout 40 +preload_app true + +# Force unicorn to look at the Gemfile in the current_path +# otherwise once we've first started a master process, it +# will always point to the first one it started. +before_exec do |server| + ENV['BUNDLE_GEMFILE'] = "<%= current_path %>/Gemfile" +end + +before_fork do |server, worker| + defined?(ActiveRecord::Base) and + ActiveRecord::Base.connection.disconnect! + # Quit the old unicorn process + old_pid = "#{server.config[:pid]}.oldbin" + if File.exists?(old_pid) && server.pid != old_pid + puts "We've got an old pid and server pid is not the old pid" + begin + Process.kill("QUIT", File.read(old_pid).to_i) + puts "killing master process (good thing tm)" + rescue Errno::ENOENT, Errno::ESRCH + puts "unicorn master already killed" + end + end +end + +after_fork do |server, worker| + port = 5000 + worker.nr + child_pid = server.config[:pid].sub('.pid', ".#{port}.pid") + system("echo #{Process.pid} > #{child_pid}") + defined?(ActiveRecord::Base) and + ActiveRecord::Base.establish_connection +end diff --git a/config/deploy/staging.rb b/config/deploy/staging.rb index 5ca436c4297..09ba7401a98 100644 --- a/config/deploy/staging.rb +++ b/config/deploy/staging.rb @@ -1,7 +1,11 @@ set :deploy_to, deploysecret(:deploy_to) +set :server_name, deploysecret(:server_name) +set :db_server, deploysecret(:db_server) set :branch, :master set :ssh_options, port: deploysecret(:ssh_port) - -set :passenger_restart_with_sudo, false +set :stage, :staging +set :rails_env, :staging server deploysecret(:server), user: deploysecret(:user), roles: %w(web app db importer) + + diff --git a/config/i18n-tasks.yml b/config/i18n-tasks.yml index f0afba346e5..5e6eb28995d 100644 --- a/config/i18n-tasks.yml +++ b/config/i18n-tasks.yml @@ -89,6 +89,7 @@ search: # - '{devise,simple_form}.*' ignore_missing: - 'unauthorized.*' + - 'errors.messages.blank' ## Consider these keys used: ignore_unused: @@ -99,6 +100,7 @@ ignore_unused: # - 'simple_form.{error_notification,required}.:' ignore_unused: - 'unauthorized.*' + - 'simple_captcha.*' ## Exclude these keys from the `i18n-tasks eq-base' report: # ignore_eq_base: diff --git a/config/initializers/devise.rb b/config/initializers/devise.rb index 3be902f1818..f7cdfb2927c 100644 --- a/config/initializers/devise.rb +++ b/config/initializers/devise.rb @@ -6,7 +6,7 @@ # confirmation, reset password and unlock tokens in the database. # Devise will use the `secret_key_base` on Rails 4+ applications as its `secret_key` # by default. You can change it below and use your own secret key. - # config.secret_key = '486ed5e25dcabac12a62c72a26e8057cfc2b822dd46c8b593a77aa95479bac481c3d70d5e5ee88a04aac3cf9b40e592575ca7674e248ff747f5afcdf3a320969' + config.secret_key = '486ed5e25dcabac12a62c72a26e8057cfc2b822dd46c8b593a77aa95479bac481c3d70d5e5ee88a04aac3cf9b40e592575ca7674e248ff747f5afcdf3a320969' # ==> Mailer Configuration # Configure the e-mail address which will be shown in Devise::Mailer, diff --git a/config/initializers/recaptcha.rb b/config/initializers/recaptcha.rb deleted file mode 100644 index 36a5cef8b96..00000000000 --- a/config/initializers/recaptcha.rb +++ /dev/null @@ -1,5 +0,0 @@ -Recaptcha.configure do |config| - config.public_key = Rails.application.secrets.recaptcha_public_key - config.private_key = Rails.application.secrets.recaptcha_private_key - config.api_version = 'v2' -end \ No newline at end of file diff --git a/config/initializers/simple_captcha.rb b/config/initializers/simple_captcha.rb new file mode 100644 index 00000000000..25d3a134264 --- /dev/null +++ b/config/initializers/simple_captcha.rb @@ -0,0 +1,37 @@ +SimpleCaptcha.always_pass = Rails.env.test? + +SimpleCaptcha.setup do |sc| + # default: 100x28 + sc.image_size = '120x40' + + # default: 5 + sc.length = 6 + + # default: simply_blue + # possible values: + # 'embosed_silver', + # 'simply_red', + # 'simply_green', + # 'simply_blue', + # 'distorted_black', + # 'all_black', + # 'charcoal_grey', + # 'almost_invisible' + # 'random' + sc.image_style = 'simply_green' + + # default: low + # possible values: 'low', 'medium', 'high', 'random' + sc.distortion = 'random' + + # default: medium + # possible values: 'none', 'low', 'medium', 'high' + sc.implode = 'medium' + + # sc.image_style = 'mycaptha' + # sc.add_image_style('mycaptha', [ + # "-background '#F4F7F8'", + # "-fill '#86818B'", + # "-border 1", + # "-bordercolor '#E0E2E3'"]) +end diff --git a/config/initializers/social_share_button.rb b/config/initializers/social_share_button.rb new file mode 100644 index 00000000000..d8b6e52546a --- /dev/null +++ b/config/initializers/social_share_button.rb @@ -0,0 +1,3 @@ +SocialShareButton.configure do |config| + config.allow_sites = %w(twitter facebook google_plus) +end diff --git a/config/initializers/vote_extensions.rb b/config/initializers/vote_extensions.rb new file mode 100644 index 00000000000..4bbf48d206b --- /dev/null +++ b/config/initializers/vote_extensions.rb @@ -0,0 +1,13 @@ +ActsAsVotable::Vote.class_eval do + def self.for_debates + where(votable_type: 'Debate') + end + + def self.in(debates) + where(votable_id: debates) + end + + def value + vote_flag + end +end \ No newline at end of file diff --git a/config/locales/activerecord.en.yml b/config/locales/activerecord.en.yml index e62df2a65e5..c9930c1ae8a 100644 --- a/config/locales/activerecord.en.yml +++ b/config/locales/activerecord.en.yml @@ -3,6 +3,7 @@ en: models: comment: Comment debate: Debate + tag: Topic user: User vote: Vote organization: Organization @@ -21,5 +22,6 @@ en: last_name: "Last name" nickname: Nickname password: Password + phone_number: Phone number organization: name: Organization name diff --git a/config/locales/activerecord.es.yml b/config/locales/activerecord.es.yml index 36af7e1b3f1..620e259a819 100644 --- a/config/locales/activerecord.es.yml +++ b/config/locales/activerecord.es.yml @@ -3,6 +3,7 @@ es: models: comment: Comentario debate: Debate + tag: Tema user: Usuario vote: Voto organization: Organización @@ -21,5 +22,6 @@ es: last_name: Apellidos nickname: Pseudónimo password: Contraseña + phone_number: Teléfono organization: name: Nombre de organización diff --git a/config/locales/admin.en.yml b/config/locales/admin.en.yml index dd8cc2b9469..a5b469e1bd9 100644 --- a/config/locales/admin.en.yml +++ b/config/locales/admin.en.yml @@ -2,4 +2,12 @@ en: admin: dashboard: index: - title: Administration \ No newline at end of file + title: Administration + tags: + index: + title: 'Debate topics' + add_tag: 'Add a new debate topic' + mark_as_featured: 'Mark as featured' + name: + placeholder: 'Write a topic' + destroy: Delete Tag diff --git a/config/locales/admin.es.yml b/config/locales/admin.es.yml index 7ebe05bc666..fecb7c5f428 100644 --- a/config/locales/admin.es.yml +++ b/config/locales/admin.es.yml @@ -2,4 +2,12 @@ es: admin: dashboard: index: - title: Administración \ No newline at end of file + title: Administración + tags: + index: + title: 'Temas de debate' + add_tag: 'Añade un nuevo tema de debate' + mark_as_featured: 'Marcar como destacado' + name: + placeholder: 'Escribe el nombre del tema' + destroy: Elimina la etiqueta diff --git a/config/locales/devise_views.en.yml b/config/locales/devise_views.en.yml index 6895790cb27..e5a1ec48d29 100644 --- a/config/locales/devise_views.en.yml +++ b/config/locales/devise_views.en.yml @@ -29,7 +29,6 @@ en: edit: title: "Change your password" password_label: "New password" - min_length: "(%{min} characters minimum)" password_confirmation_label: "Confirm new password" change_submit: "Change my password" new: @@ -58,7 +57,6 @@ en: email_label: "Email" phone_number_label: "Phone number" password_label: "Password" - min_length: "(%{min} characters minimum)" password_confirmation_label: "Confirm password" submit: "Sign up" organizations: @@ -69,7 +67,6 @@ en: email_label: "Email" password_label: "Password" phone_number_label: "Phone number" - min_length: "(%{min} characters minimum)" password_confirmation_label: "Confirm password" submit: "Sign up" sessions: diff --git a/config/locales/devise_views.es.yml b/config/locales/devise_views.es.yml index 700040e1256..c44ddfb31a2 100644 --- a/config/locales/devise_views.es.yml +++ b/config/locales/devise_views.es.yml @@ -8,7 +8,7 @@ es: confirmation_instructions: welcome: "Bienvenido" text: "Puedes confirmar tu cuenta de correo electrónico en el siguiente enlace:" - confirm_link: "Confirmar my cuenta" + confirm_link: "Confirmar mi cuenta" reset_password_instructions: hello: "Hola" text: "Se ha solicitado un enlace para cambiar tu contraseña, puedes hacerlo en el siguiente enlace:" @@ -29,7 +29,6 @@ es: edit: title: "Cambia tu contraseña" password_label: "Contraseña nueva" - min_length: "(mínimo %{min} caracteres)" password_confirmation_label: "Confirmar contraseña nueva" change_submit: "Cambiar mi contraseña" new: @@ -58,7 +57,6 @@ es: email_label: "Email" phone_number_label: "Teléfono" password_label: "Contraseña" - min_length: "(mínimo %{min} caracteres)" password_confirmation_label: "Confirmar contraseña" submit: "Registrarse" organizations: @@ -69,7 +67,6 @@ es: email_label: "Email" password_label: "Contraseña" phone_number_label: "Teléfono" - min_length: "(mínimo %{min} caracteres)" password_confirmation_label: "Confirmar contraseña" submit: "Registrarse" sessions: diff --git a/config/locales/en.yml b/config/locales/en.yml index 480a50a56c0..e5d6882c57e 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -3,44 +3,71 @@ en: header: external_link_transparency: Transparency external_link_opendata: Open data + external_link_blog: Blog open_gov: "%{open} government" open: "Open" participation: Participation menu: Menu open_city: We are opening Madrid open_city_slogan: So the citizens can decide what kind of city they want. - create_debate: Create a debate + see_all_debates: See all debates my_account_link: My account language: Site language + administration: Administration + moderation: Moderation footer: copyright: "Ayuntamiento de Madrid, 2015. All rights reserved" + form: + error: error + errors: errors + not_saved: "prohibited this %{resource} from being saved:" + accept_terms: I accept the privacy policy and the legal terms + user: account + debate: debate debates: index: create_debate: Create a debate debate: debate: Debate - vote: vote - votes: votes - comment: Comment - comments: Comments + comments: + zero: No comments + one: 1 Comment + other: "%{count} Comments" + votes: + zero: No votes + one: 1 vote + other: "%{count} votes" + comment: + responses: + zero: No Responses + one: 1 Response + other: "%{count} Responses" + votes: + zero: No votes + one: 1 vote + other: "%{count} votes" + votes_weighted_score: "Total: %{score}" form: - error: error - errors: errors - not_saved: "prohibited this debate from being saved:" debate_title: Debate title title_instructions: "SBe clear and precise with the title, but make it informative" debate_text: Ellaborate your opinion text_instructions: "Explain your opinion, go into details, tell us what's the purpose of your idea" tags_label: Topics - tags_instructions: Comma separated - accept_terms: I accept the privacy policy and the legal terms + tags_instructions: > + Tag this idea. You can choose among our proposals on the list or add any other topic you want by + writing them separated by "," and then pressing "enter". + Some suggestions: show: back_link: Back - comment: Comment - comments: Comments + comments_title: Comments + comments: + zero: No comments + one: 1 Comment + other: "%{count} Comments" leave_comment: Write a comment login_to_comment: Log in to participate edit_debate_link: Edit + share: Share edit: editing: Edit debate show_link: Show debate @@ -61,6 +88,9 @@ en: agree: I agree disagree: I disagree supports: Supports + unauthenticated: "You need to %{signin} or %{signup} before continuing." + signin: sign in + signup: sign up account: show: title: "My account" @@ -68,17 +98,25 @@ en: email_on_debate_comment_label: "Receive email when someone comments on my debates" email_on_comment_reply_label: "Receive email when someone replies to my comments" change_credentials_link: "Change my credentials" + avatar: "Avatar" + personal: "Personal data" first_name_label: "First Name" last_name_label: "Last Name" phone_number_label: "Phone number" + organization_name_label: "Organization name" use_nickname_label: "Use nickname" nickname_label: "Nickname" - recaptcha: - errors: - verification_failed: "The captcha verification failed" + notifications: Notifications + simple_captcha: + placeholder: "Enter the image value" + label: "Enter the code in the box" + refresh_button_text: "Refresh" + message: + user: "secret code did not match with the image" + debate: "secret code did not match with the image" shared: tags_cloud: - tags: Tags + tags: Topics mailer: comment: subject: Someone has commented on your debate diff --git a/config/locales/es.yml b/config/locales/es.yml index 2ee0d07b64a..ea68e07f8c3 100644 --- a/config/locales/es.yml +++ b/config/locales/es.yml @@ -1,46 +1,73 @@ es: layouts: header: - external_link_transparency: Portal de Transparencia + external_link_transparency: Transparencia external_link_opendata: Datos abiertos + external_link_blog: Blog open_gov: "Gobierno %{open}" open: "abierto" participation: Participación menu: Menú open_city: Estamos abriendo Madrid open_city_slogan: Para que todos los madrileños decidamos que ciudad queremos tener. - create_debate: Crea un debate + see_all_debates: Ver todos los debates my_account_link: Mi cuenta language: Idioma de la página + administration: Administar + moderation: Moderar footer: copyright: "Ayuntamiento de Madrid, %{year}. Todos los derechos reservados" + form: + error: error + errors: errores + not_saved: "impidieron guardar %{resource}:" + accept_terms: Acepto la política de privacidad y el aviso legal + user: la cuenta + debate: el debate debates: index: create_debate: Crea un debate debate: debate: Debate - vote: voto - votes: votos - comment: Comentario - comments: Comentarios + comments: + zero: Sin comentarios + one: 1 Comentario + other: "%{count} Comentarios" + votes: + zero: Sin votos + one: 1 voto + other: "%{count} votos" + comment: + responses: + zero: Sin respuestas + one: 1 Respuesta + other: "%{count} Respuestas" + votes: + zero: Sin votos + one: 1 voto + other: "%{count} votos" + votes_weighted_score: "Total: %{score}" form: - error: error - errors: errores - not_saved: "impidieron guardar el debate:" debate_title: Título del debate title_instructions: "Sé claro y conciso a la hora de poner un título, pero recuerda que debe explicar bien tu idea, ¡es tu carta de entrada!" debate_text: Describe tu opinión text_instructions: "Explica con todo el detalle que puedas y de una manera sencilla la idea y que crees que conseguiríamos con ella" tags_label: Temas - tags_instructions: Separados por comas - accept_terms: Acepto la política de privacidad y el aviso legal + tags_instructions: > + Etiqueta esta idea. Puedes elegir entre nuestras propuestas o introducir las que desees. + Para ello solo tienes que escribir las etiquetas que desees separadas por "," y pulsar "intro". + Algunas recomendaciones: show: back_link: Volver - comment: Comentario - comments: Comentarios + comments_title: Comentarios + comments: + zero: Sin comentarios + one: 1 Comentario + other: "%{count} Comentarios" leave_comment: Deja tu comentario login_to_comment: Entra para participar edit_debate_link: Editar + share: Compartir edit: editing: Editar debate show_link: Ver debate @@ -61,6 +88,9 @@ es: agree: Estoy de acuerdo disagree: No estoy de acuerdo supports: Apoyos + unauthenticated: "Necesitas %{signin} o %{signup} para continuar." + signin: iniciar sesión + signup: registrarte account: show: title: "Mi cuenta" @@ -68,17 +98,25 @@ es: change_credentials_link: "Cambiar mis credenciales" email_on_debate_comment_label: "Recibir un email cuando alguien comenta en mis debates" email_on_comment_reply_label: "Recibir un email cuando alguien contesta a mis comentarios" + avatar: "Avatar" + personal: "Datos personales" first_name_label: "Nombre" last_name_label: "Apellidos" phone_number_label: "Teléfono" + organization_name_label: "Nombre de la organización" use_nickname_label: "Usar pseudónimo" nickname_label: "Pseudónimo" - recaptcha: - errors: - verification_failed: "La verificación por captcha falló" + notifications: Notificaciones + simple_captcha: + placeholder: "Introduce el texto de la imagen" + label: "Introduce el texto en la caja" + refresh_button_text: "Refrescar" + message: + user: "el código secreto no coincide con la imagen" + debate: "el código secreto no coincide con la imagen" shared: tags_cloud: - tags: Etiquetas + tags: Temas mailer: comment: subject: Alguien ha comentado en tu debate @@ -100,5 +138,3 @@ es: all: "No tienes permiso para borrar %{subject}" manage: all: "No tienes permiso para realizar la acción '%{action}' sobre %{subject}." - - diff --git a/config/locales/rails.en.yml b/config/locales/rails.en.yml index d09a8dd0951..cb5bdc38ff6 100644 --- a/config/locales/rails.en.yml +++ b/config/locales/rails.en.yml @@ -20,7 +20,3 @@ # available at http://guides.rubyonrails.org/i18n.html. en: - recaptcha: - errors: - verification_failed: "Incorrect Captcha" - recaptcha_unreachable: "Internet connecion error. Could not load Captcha" diff --git a/config/locales/rails.es.yml b/config/locales/rails.es.yml index a5666614d4a..f29361c451c 100644 --- a/config/locales/rails.es.yml +++ b/config/locales/rails.es.yml @@ -10,7 +10,7 @@ es: - vie - sáb abbr_month_names: - - + - - ene - feb - mar @@ -36,7 +36,7 @@ es: long: "%d de %B de %Y" short: "%d de %b" month_names: - - + - - enero - febrero - marzo @@ -195,8 +195,4 @@ es: default: "%A, %d de %B de %Y %H:%M:%S %z" long: "%d de %B de %Y %H:%M" short: "%d de %b %H:%M" - pm: pm - recaptcha: - errors: - verification_failed: "El Captcha no es correcto" - recaptcha_unreachable: "Fallo de conexión a Internet. No se ha podido cargar el Captcha" \ No newline at end of file + pm: pm \ No newline at end of file diff --git a/config/locales/responders.en.yml b/config/locales/responders.en.yml index 41c13a32690..68bf8581b1a 100644 --- a/config/locales/responders.en.yml +++ b/config/locales/responders.en.yml @@ -4,12 +4,11 @@ en: create: notice: '%{resource_name} was successfully created.' # alert: '%{resource_name} could not be created.' - # update: - # notice: '%{resource_name} was successfully updated.' + update: + notice: '%{resource_name} was successfully updated.' # alert: '%{resource_name} could not be updated.' # destroy: # notice: '%{resource_name} was successfully destroyed.' # alert: '%{resource_name} could not be destroyed.' save_changes: notice: "Saved" - diff --git a/config/locales/responders.es.yml b/config/locales/responders.es.yml index e11fbccbc19..6b64f572863 100644 --- a/config/locales/responders.es.yml +++ b/config/locales/responders.es.yml @@ -3,8 +3,8 @@ es: actions: create: notice: "%{resource_name} creado correctamente." - # update: - # notice: "%{resource_name} actualizado correctamente." + update: + notice: "%{resource_name} actualizado correctamente." # destroy: # notice: "%{resource_name} borrado correctamente." # alert: "%{resource_name} no ha podido ser borrado." diff --git a/config/locales/social_share_button.en.yml b/config/locales/social_share_button.en.yml new file mode 100644 index 00000000000..95dba5da939 --- /dev/null +++ b/config/locales/social_share_button.en.yml @@ -0,0 +1,19 @@ +en: + social_share_button: + share_to: Share to %{name} + weibo: Sina Weibo + twitter: Twitter + facebook: Facebook + douban: Douban + qq: Qzone + tqq: Tqq + delicious: Delicious + baidu: Baidu.com + kaixin001: Kaixin001.com + renren: Renren.com + google_plus: Google+ + google_bookmark: Google Bookmark + tumblr: Tumblr + plurk: Plurk + pinterest: Pinterest + email: Email diff --git a/config/locales/social_share_button.es.yml b/config/locales/social_share_button.es.yml new file mode 100644 index 00000000000..e0520c19b2a --- /dev/null +++ b/config/locales/social_share_button.es.yml @@ -0,0 +1,19 @@ +es: + social_share_button: + share_to: Compartir en %{name} + weibo: Sina Weibo + twitter: Twitter + facebook: Facebook + douban: Douban + qq: Qzone + tqq: Tqq + delicious: Delicious + baidu: Baidu.com + kaixin001: Kaixin001.com + renren: Renren.com + google_plus: Google+ + google_bookmark: Google Bookmark + tumblr: Tumblr + plurk: Plurk + pinterest: Pinterest + email: Correo electrónico diff --git a/config/routes.rb b/config/routes.rb index ba2fc77c4a0..7ccbe2bb027 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -10,7 +10,7 @@ # See how all your routes lay out with "rake routes". # You can have the root of your site routed with "root" - root 'debates#index' + root 'welcome#index' resources :debates do member do @@ -28,6 +28,8 @@ namespace :admin do root to: "dashboard#index" + + resources :tags, only: [:index, :create, :update, :destroy] end namespace :moderation do diff --git a/config/secrets.yml.example b/config/secrets.yml.example index 7fc62888769..f4ad9802733 100644 --- a/config/secrets.yml.example +++ b/config/secrets.yml.example @@ -11,8 +11,6 @@ # if you're sharing your code publicly. default: &default - recaptcha_public_key: <%= ENV["MADRID_RECAPTCHA_PUBLIC_KEY"] %> - recaptcha_private_key: <%= ENV["MADRID_RECAPTCHA_PRIVATE_KEY"] %> development: secret_key_base: 56792feef405a59b18ea7db57b4777e855103882b926413d4afdfb8c0ea8aa86ea6649da4e729c5f5ae324c0ab9338f789174cf48c544173bc18fdc3b14262e4 diff --git a/db/migrate/20150808141306_create_simple_captcha_data.rb b/db/migrate/20150808141306_create_simple_captcha_data.rb new file mode 100644 index 00000000000..4573b205640 --- /dev/null +++ b/db/migrate/20150808141306_create_simple_captcha_data.rb @@ -0,0 +1,15 @@ +class CreateSimpleCaptchaData < ActiveRecord::Migration + def self.up + create_table :simple_captcha_data do |t| + t.string :key, :limit => 40 + t.string :value, :limit => 6 + t.timestamps + end + + add_index :simple_captcha_data, :key, :name => "idx_key" + end + + def self.down + drop_table :simple_captcha_data + end +end diff --git a/db/migrate/20150811161459_add_children_count_to_comments.rb b/db/migrate/20150811161459_add_children_count_to_comments.rb new file mode 100644 index 00000000000..ce233542d76 --- /dev/null +++ b/db/migrate/20150811161459_add_children_count_to_comments.rb @@ -0,0 +1,9 @@ +class AddChildrenCountToComments < ActiveRecord::Migration + def up + add_column :comments, :children_count, :integer, default: 0 + end + + def down + remove_column :comments, :children_count + end +end diff --git a/db/migrate/20150815154430_add_featured_to_tags.rb b/db/migrate/20150815154430_add_featured_to_tags.rb new file mode 100644 index 00000000000..6ad4d565874 --- /dev/null +++ b/db/migrate/20150815154430_add_featured_to_tags.rb @@ -0,0 +1,5 @@ +class AddFeaturedToTags < ActiveRecord::Migration + def change + add_column :tags, :featured, :boolean, default: false + end +end diff --git a/db/schema.rb b/db/schema.rb index 2c4e7e639eb..e0ca3ab78ce 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,7 +11,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 20150813161654) do +ActiveRecord::Schema.define(version: 20150815154430) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" @@ -88,6 +88,7 @@ create_table "tags", force: :cascade do |t| t.string "name" t.integer "taggings_count", default: 0 + t.boolean "featured", default: false end add_index "tags", ["name"], name: "index_tags_on_name", unique: true, using: :btree diff --git a/doc/style-guide.html b/doc/style-guide.html new file mode 100644 index 00000000000..a1a99d37417 --- /dev/null +++ b/doc/style-guide.html @@ -0,0 +1,455 @@ + + + + + gobierno abierto | Guía de estilo web + + + + + + + + + + + +
+

gobierno abierto Guía de estilo web

+ + + +
+

1. Introducción

+

¡Hola! hemos creado algunas directrices de cómo usar el diseño en los diferentes elementos.

+

IMPORTANTE
Esta guía de estilo no es definitiva ya que irá creciendo junto al proyecto, por lo que algunos elementos pueden tener modificaciones en el futuro.

+

En este proyecto para el maquetar el front utilizamos como base el framework Foundation. Puedes leer toda su documentación pero te recomendamos que leas con atención los siguientes enlaces, ya que resumen muy bien el funcionamiento del framework:

+ +

Para desarrollar el CSS utilizamos SASS. Si clonas el repositorio verás la siguiente estructura en las hojas de estilo:

+ +
    +
  • application.sccs hace un @import del resto de SCSS para compilarlos en un solo fichero.
  • +
  • debates.sccs todos los estilos relacionados con la sección de debates.
  • +
  • fonts.sccs desde aquí se important todas las fuentes.
  • +
  • foundation_and_overrides.sccs fichero SCSS de Foundation con todas sus variables por defecto.
  • +
  • icons.sccs fuente de iconos personalizada para el proyecto, creada en Fontastic.me.
  • +
  • variables.sccs lista de variables para utilizar en el resto de SCSS.
  • +
+ +

2. Tipografía

+

La fuente que utilizamos para el texto es Open Sans y utlizamos Lato para el logotipo: gobierno abierto

+ +

Heading 1

+ h1 {font-size: 32px;} + +

Heading 2

+ h2 {font-size: 24px;} + +

Heading 3

+ h3 {font-size: 18px;} + +

Heading 4

+ h4 {font-size: 16px;} + +
Heading 5
+ h5 {font-size: 14px;} + +
Heading 6
+ h6 {font-size: 13px;} + +

Ejemplo de texto

+

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo.

+ + p {font-size: 13px; line-height: 24px;} + +

3. Enlaces

+

Los enlaces sobre fondo blanco utilizan el color #2895F1; y al hacer hover cambian al color #2178BF; Ejemplo: Esto es un enlace

+ +

Los enlaces sobre fondo oscuro utilizan el color #FFFFF;/white y al hacer hover cambian al color #2178BF; Ejemplo: Esto es un enlace

+ +

4. Botones

+ +

Utilizamos los botones con bordes redondeados por defecto en Foundation, en varios tamaños.

+ +

Botones expandidos

+ Button default + class="button radius expand"> +

+ Button success + class="button radius success expand" +

+ Button secondary + class="button radius secondary expand"> +

+ Button alert + class="button radius alert expand" + +

Botones normales

+ Button default + class="button radius"> +
+ Button success + class="button radius success" +
+ Button secondary + class="button radius secondary"> +
+ Button alert + class="button radius alert" + +

Botones pequeños

+ Button default + class="button radius small"> +
+ Button success + class="button radius small success" +
+ Button secondary + class="button radius small secondary"> +
+ Button alert + class="button radius small alert" + +

5. Formularios

+ +
+
+
+ + Mensaje de información para rellenar el campo + + + + + + + +
+
+ form { background: #F8F8F8; height: 48px; margin-bottom: 16px; } +
+ +

6. Colores

+
+
+ body
#E9E9E9
+
+ +
+ background
#EDEFF0
+
+ +
+ border
#DEE0E3
+
+ +
+ brand
#0077B9
+
+
+
+ text
#222222
+
+ +
+ text-medium
#999999
+
+ +
+ text-light
#CCCCCC
+
+
+ +
+ link
#2895F1
+
+ +
+ link-hover
#2178BF
+
+
+
+ debates
#008CCF
+
+ +
+ votes-bg
#26AEEE
+
+ +
+ votes-border
#1F94CB
+
+
+
+ votes-like
#7BD2A8
+
+ +
+ votes-like-act
#5D9E7F
+
+ +
+ votes-unlike
#EF8585
+
+ +
+ votes-unlike-act
#BD6A6A
+
+
+
+ check
#46DB91
+
+
+ +

7. Alertas

+ +
Lorem ipsum dolor sit amet, consectetur adipisicing elit.
+ class="alert-bx radius success" +

+
Lorem ipsum dolor sit amet, consectetur adipisicing elit.
+ class="alert-bx radius info" +

+
Lorem ipsum dolor sit amet, consectetur adipisicing elit.
+ class="alert-bx radius alert" +

+
Lorem ipsum dolor sit amet, consectetur adipisicing elit.
+ class="alert-bx radius warning" +

+
Lorem ipsum dolor sit amet, consectetur adipisicing elit.
+ class="alert-bx radius secondary" + +
+
+ + \ No newline at end of file diff --git a/lib/capistrano/substitute_strings.rb b/lib/capistrano/substitute_strings.rb new file mode 100755 index 00000000000..d4b244323fe --- /dev/null +++ b/lib/capistrano/substitute_strings.rb @@ -0,0 +1,12 @@ +# we often want to refer to variables which +# are defined in subsequent stage files. This +# let's us use the {{var}} to represent fetch(:var) +# in strings which are only evaluated at runtime. + +def sub_strings(input_string) + output_string = input_string + input_string.scan(/{{(\w*)}}/).each do |var| + output_string.gsub!("{{#{var[0]}}}", fetch(var[0].to_sym)) + end + output_string +end diff --git a/lib/capistrano/tasks/apache.cap b/lib/capistrano/tasks/apache.cap new file mode 100755 index 00000000000..3dfbced57fa --- /dev/null +++ b/lib/capistrano/tasks/apache.cap @@ -0,0 +1,30 @@ +namespace :apache do + %w(start stop restart reload).each do |task_name| + desc "#{task } Apache" + task task_name do + on roles(:app), in: :sequence, wait: 5 do + sudo "/etc/init.d/apache2 #{task_name}" + end + end + end + + desc "Enable site virual host" + task "enable_virtual_host" do + on roles(:app) do + "cd /etc/apache2/sites-available/" + sudo "a2ensite #{fetch(:server_name)}" + end + end + + desc "Remove default Apache Virtual Host" + task "remove_default_vhost" do + on roles(:app) do + if test("[ -f /etc/apache2/sites-enabled/000-default.conf ]") + sudo "rm /etc/apache2/sites-enabled/000-default.conf" + puts "removed default Apache Virtualhost" + else + puts "No default Apache Virtualhost to remove" + end + end + end +end diff --git a/lib/capistrano/tasks/check_revision.cap b/lib/capistrano/tasks/check_revision.cap new file mode 100755 index 00000000000..12cf3390db8 --- /dev/null +++ b/lib/capistrano/tasks/check_revision.cap @@ -0,0 +1,14 @@ +namespace :deploy do + desc "checks whether the currently checkout out revision matches the + remote one we're trying to deploy from" + task :check_revision do + branch = fetch(:branch) + unless `git rev-parse HEAD` == `git rev-parse origin/#{branch}` + puts "WARNING: HEAD is not the same as origin/#{branch}" + puts "Run `git push` to sync changes or make sure you've" + puts "checked out the branch: #{branch} as you can only deploy" + puts "if you've got the target branch checked out" + exit + end + end +end diff --git a/lib/capistrano/tasks/compile_assets_locally.cap b/lib/capistrano/tasks/compile_assets_locally.cap new file mode 100755 index 00000000000..5966ff1ead8 --- /dev/null +++ b/lib/capistrano/tasks/compile_assets_locally.cap @@ -0,0 +1,17 @@ +namespace :deploy do + desc "compiles assets locally then rsyncs" + task :compile_assets_locally do + run_locally do + execute "RAILS_ENV=#{fetch(:rails_env)} bundle exec rake assets:precompile" + end + on roles(:app) do |role| + run_locally do + execute"rsync -av ./public/assets/ #{role.user}@#{role.hostname}:#{release_path}/public/assets/;" + end + "chmod -R 755 #{release_path}/public/assets/" + end + run_locally do + execute "rm -rf ./public/assets" + end + end +end diff --git a/lib/capistrano/tasks/logs.cap b/lib/capistrano/tasks/logs.cap new file mode 100755 index 00000000000..7bbfac2e45f --- /dev/null +++ b/lib/capistrano/tasks/logs.cap @@ -0,0 +1,14 @@ +namespace :logs do + task :tail, :file do |t, args| + if args[:file] + on roles(:app) do + execute "tail -f #{shared_path}/log/#{args[:file]}.log" + end + else + puts "please specify a logfile e.g: 'rake logs:tail[logfile]" + puts "will tail 'shared_path/log/logfile.log'" + puts "remember if you use zsh you'll need to format it as:" + puts "rake 'logs:tail[logfile]' (single quotes)" + end + end +end diff --git a/lib/capistrano/tasks/restart.cap b/lib/capistrano/tasks/restart.cap new file mode 100644 index 00000000000..ff8c028f030 --- /dev/null +++ b/lib/capistrano/tasks/restart.cap @@ -0,0 +1,10 @@ +namespace :deploy do + desc 'Commands for unicorn application' + %w(start stop force-stop restart upgrade reopen-logs).each do |command| + task command.to_sym do + on roles(:app), in: :sequence, wait: 5 do + sudo "/etc/init.d/unicorn_#{fetch(:full_app_name)} #{command}" + end + end + end +end diff --git a/lib/capistrano/tasks/run_tests.cap b/lib/capistrano/tasks/run_tests.cap new file mode 100755 index 00000000000..32f26f9cee7 --- /dev/null +++ b/lib/capistrano/tasks/run_tests.cap @@ -0,0 +1,18 @@ +namespace :deploy do + desc "Runs test before deploying, can't deploy unless they pass" + task :run_tests do + test_log = "log/capistrano.test.log" + tests = fetch(:tests) + tests.each do |test| + puts "--> Running tests: '#{test}', please wait ..." + unless system "bundle exec rspec #{test} > #{test_log} 2>&1" + puts "--> Tests: '#{test}' failed. Results in: #{test_log} and below:" + system "cat #{test_log}" + exit; + end + puts "--> '#{test}' passed" + end + puts "--> All tests passed" + system "rm #{test_log}" + end +end diff --git a/lib/capistrano/tasks/setup_config.cap b/lib/capistrano/tasks/setup_config.cap new file mode 100755 index 00000000000..27ba96a1251 --- /dev/null +++ b/lib/capistrano/tasks/setup_config.cap @@ -0,0 +1,27 @@ +namespace :deploy do + task :setup_config do + on roles(:app) do + # make the config dir + execute :mkdir, "-p #{shared_path}/config" + full_app_name = fetch(:full_app_name) + + # config files to be uploaded to shared/config, see the + # definition of smart_template for details of operation. + # Essentially looks for #{filename}.erb in deploy/#{full_app_name}/ + # and if it isn't there, falls back to deploy/#{shared}. Generally + # everything should be in deploy/shared with params which differ + # set in the stage files + config_files = fetch(:config_files) + config_files.each do |file| + smart_template file + end + + # symlink stuff which should be... symlinked + symlinks = fetch(:symlinks) + + symlinks.each do |symlink| + sudo "ln -nfs #{shared_path}/config/#{symlink[:source]} #{sub_strings(symlink[:link])}" + end + end + end +end diff --git a/lib/capistrano/template.rb b/lib/capistrano/template.rb new file mode 100755 index 00000000000..07bd0be37e2 --- /dev/null +++ b/lib/capistrano/template.rb @@ -0,0 +1,32 @@ +# will first try and copy the file: +# config/deploy/#{full_app_name}/#{from}.erb +# to: +# shared/config/to +# if the original source path doesn exist then it will +# search in: +# config/deploy/shared/#{from}.erb +# this allows files which are common to all enviros to +# come from a single source while allowing specific +# ones to be over-ridden +# if the target file name is the same as the source then +# the second parameter can be left out +def smart_template(from, to=nil) + to ||= from + full_to_path = "#{shared_path}/config/#{to}" + if from_erb_path = template_file(from) + from_erb = StringIO.new(ERB.new(File.read(from_erb_path)).result(binding)) + upload! from_erb, full_to_path + info "copying: #{from_erb} to: #{full_to_path}" + else + error "error #{from} not found" + end +end + +def template_file(name) + if File.exist?((file = "config/deploy/#{fetch(:full_app_name)}/#{name}.erb")) + return file + elsif File.exist?((file = "config/deploy/shared/#{name}.erb")) + return file + end + return nil +end diff --git a/spec/factories.rb b/spec/factories.rb index 6e7c2541314..6bf82bbaaa4 100644 --- a/spec/factories.rb +++ b/spec/factories.rb @@ -9,28 +9,24 @@ end factory :debate do - sequence(:title) {|n| "Debate #{n} title"} - description 'Debate description' - terms_of_service '1' + sequence(:title) { |n| "Debate #{n} title" } + description 'Debate description' + terms_of_service '1' association :author, factory: :user end factory :vote do association :votable, factory: :debate - association :voter, factory: :user + association :voter, factory: :user vote_flag true end factory :comment do - commentable + association :commentable, factory: :debate user body 'Comment body' end - factory :commentable do - debate - end - factory :administrator do user end @@ -52,4 +48,16 @@ rejected_at { Time.now} end + factory :tag, class: 'ActsAsTaggableOn::Tag' do + sequence(:name) { |n| "Tag #{n} name" } + + trait :featured do + featured true + end + + trait :unfeatured do + featured false + end + end + end diff --git a/spec/features/account_spec.rb b/spec/features/account_spec.rb index 59ee23f5b58..1294d59d200 100644 --- a/spec/features/account_spec.rb +++ b/spec/features/account_spec.rb @@ -3,35 +3,23 @@ feature 'Account' do background do - @user = create(:user, first_name: "Manuela", last_name:"Colau") + @user = create(:user, first_name: "Manuela", last_name: "Colau") + login_as(@user) end scenario 'Show' do - login_as(@user) visit root_path + click_link "My account" + expect(current_path).to eq(account_path) expect(page).to have_selector("input[value='Manuela']") expect(page).to have_selector("input[value='Colau']") - end - - scenario "Failed Edit" do - login_as(@user) - visit account_path - - fill_in 'account_first_name', with: '' - fill_in 'account_last_name', with: '' - fill_in 'account_nickname', with: '' - click_button 'Save changes' - - expect(page).to have_content "2 errors prohibited this debate from being saved" - expect(page).to have_content "First name can't be blank" - expect(page).to have_content "First name can't be blank" + expect(page).to have_selector(avatar('Manuela Colau'), count: 1) end scenario 'Edit' do - login_as(@user) visit account_path fill_in 'account_first_name', with: 'Larry' @@ -49,4 +37,22 @@ expect(page).to have_selector("input[id='account_email_on_debate_comment'][value='1']") expect(page).to have_selector("input[id='account_email_on_comment_reply'][value='1']") end + + scenario "Errors on edit" do + visit account_path + + fill_in 'account_first_name', with: '' + click_button 'Save changes' + + expect(page).to have_content error_message + end + + scenario 'Errors editing credentials' do + visit account_path + + click_link 'Change my credentials' + click_button 'Update' + + expect(page).to have_content error_message + end end diff --git a/spec/features/admin_spec.rb b/spec/features/admin_spec.rb index a4728623b39..6c19b03f7c6 100644 --- a/spec/features/admin_spec.rb +++ b/spec/features/admin_spec.rb @@ -2,6 +2,14 @@ feature 'Admin' do let(:user) { create(:user) } + let(:administrator) do + create(:administrator, user: user) + user + end + let(:moderator) do + create(:moderator, user: user) + user + end scenario 'Access as regular user is not authorized' do login_as(user) @@ -12,9 +20,7 @@ end scenario 'Access as a moderator is not authorized' do - create(:moderator, user: user) - - login_as(user) + login_as(moderator) visit admin_root_path expect(current_path).to eq(root_path) @@ -22,13 +28,92 @@ end scenario 'Access as an administrator is authorized' do - create(:administrator, user: user) - - login_as(user) + login_as(administrator) visit admin_root_path expect(current_path).to eq(admin_root_path) expect(page).to_not have_content "not authorized" end + scenario "Admin access links" do + login_as(administrator) + visit root_path + + expect(page).to have_link('Administration') + expect(page).to_not have_link('Moderator') + end + + scenario "Moderation access links" do + login_as(moderator) + visit root_path + + expect(page).to have_link('Moderation') + expect(page).to_not have_link('Administration') + end + + scenario 'Admin dashboard' do + login_as(administrator) + visit root_path + + click_link 'Administration' + + expect(current_path).to eq(admin_root_path) + expect(page).to have_css('#admin_menu') + expect(page).to_not have_css('#moderation_menu') + end + + scenario 'Moderation dashboard' do + login_as(moderator) + visit root_path + + click_link 'Moderation' + + expect(current_path).to eq(moderation_root_path) + expect(page).to have_css('#moderation_menu') + expect(page).to_not have_css('#admin_menu') + end + + context 'Tags' do + let(:unfeatured_tag) { create :tag, :unfeatured, name: 'Mi barrio' } + + background do + login_as(administrator) + end + + scenario 'adding a new tag' do + visit admin_tags_path + + fill_in 'tag_name', with: 'Papeleras' + + click_on 'Create Tag' + + expect(page).to have_content 'Papeleras' + end + + scenario 'deleting tag' do + unfeatured_tag + + visit admin_tags_path + + expect(page).to have_content 'Mi barrio' + + click_link 'Delete Tag' + + expect(page).not_to have_content 'Mi barrio' + end + + scenario 'marking tags as featured / unfeatured' do + expect(unfeatured_tag).not_to be_featured + + visit admin_tags_path + + expect(page).to have_content 'Mi barrio' + + check "tag_featured_#{unfeatured_tag.id}" + click_button 'Update Tag' + + expect(page).to have_checked_field("tag_featured_#{unfeatured_tag.id}") + end + end + end diff --git a/spec/features/comments_spec.rb b/spec/features/comments_spec.rb index 1ec6a8c107b..27a7ac1cd8d 100644 --- a/spec/features/comments_spec.rb +++ b/spec/features/comments_spec.rb @@ -26,7 +26,7 @@ visit debate_path(debate) expect(page).to have_content 'Log in to participate' - within ('#comments') do + within('#comments') do expect(page).to_not have_content 'Write a comment' expect(page).to_not have_content 'Reply' expect(page).to_not have_css('form') @@ -49,6 +49,18 @@ end end + scenario 'Errors on create', :js do + user = create(:user) + debate = create(:debate) + + login_as(user) + visit debate_path(debate) + + click_button 'Publish comment' + + expect(page).to have_content "Can't be blank" + end + scenario 'Reply', :js do citizen = create(:user, first_name: 'Ana') manuela = create(:user, first_name: 'Manuela') @@ -59,14 +71,34 @@ visit debate_path(debate) click_link "Reply" + within "#js-comment-form-comment_#{comment.id}" do fill_in 'comment_body', with: 'It will be done next week.' click_button 'Publish reply' end - within "#comment-#{comment.id}" do + within("#comment-#{comment.id}") do expect(page).to have_content 'It will be done next week.' end + + expect(page).to_not have_selector("#js-comment-form-comment_#{comment.id}", visible: true) + end + + scenario 'Errors on reply', :js do + user = create(:user) + debate = create(:debate) + comment = create(:comment, commentable: debate, user: user) + + login_as(user) + visit debate_path(debate) + + click_link "Reply" + + within "#js-comment-form-comment_#{comment.id}" do + click_button 'Publish reply' + expect(page).to have_content "Can't be blank" + end + end scenario "N replies", :js do @@ -74,13 +106,13 @@ parent = create(:comment, commentable: debate) 7.times do - create(:comment, commentable: debate). - move_to_child_of(parent) - parent = parent.children.first + create(:comment, commentable: debate). + move_to_child_of(parent) + parent = parent.children.first end visit debate_path(debate) expect(page).to have_css(".comment.comment.comment.comment.comment.comment.comment.comment") end -end \ No newline at end of file +end diff --git a/spec/features/debates_spec.rb b/spec/features/debates_spec.rb index 894b09b193c..36751e9d46a 100644 --- a/spec/features/debates_spec.rb +++ b/spec/features/debates_spec.rb @@ -4,18 +4,9 @@ scenario 'Index' do debates = [create(:debate), create(:debate), create(:debate)] - featured_debates = [create(:debate), create(:debate), create(:debate)] visit debates_path - expect(page).to have_selector('#featured-debates .debate-featured', count: 3) - featured_debates.each do |debate| - within('#featured-debates') do - expect(page).to have_content debate.title - expect(page).to have_css("a[href='#{debate_path(debate)}']", text: debate.description) - end - end - expect(page).to have_selector('#debates .debate', count: 3) debates.each do |debate| within('#debates') do @@ -33,7 +24,12 @@ expect(page).to have_content debate.title expect(page).to have_content "Debate description" expect(page).to have_content debate.author.name - expect(page).to have_content I18n.l(Date.today) + expect(page).to have_content I18n.l(debate.created_at.to_date) + expect(page).to have_selector(avatar(debate.author.name)) + + within('.social-share-button') do + expect(page.all('a').count).to be(3) # Twitter, Facebook, Google+ + end end scenario 'Create' do @@ -43,6 +39,7 @@ visit new_debate_path fill_in 'debate_title', with: 'Acabar con los desahucios' fill_in 'debate_description', with: 'Esto es un tema muy importante porque...' + fill_in 'debate_captcha', with: correct_captcha_text check 'debate_terms_of_service' click_button 'Create Debate' @@ -51,7 +48,57 @@ expect(page).to have_content 'Acabar con los desahucios' expect(page).to have_content 'Esto es un tema muy importante porque...' expect(page).to have_content author.name - expect(page).to have_content I18n.l(Date.today) + expect(page).to have_content I18n.l(Debate.last.created_at.to_date) + end + + scenario 'Captcha is required for debate creation' do + login_as(create(:user)) + + visit new_debate_path + fill_in 'debate_title', with: "Great title" + fill_in 'debate_description', with: 'Very important issue...' + fill_in 'debate_captcha', with: "wrongText!" + check 'debate_terms_of_service' + + click_button "Create Debate" + + expect(page).to_not have_content "Debate was successfully created." + expect(page).to have_content "1 error" + + fill_in 'debate_captcha', with: correct_captcha_text + click_button "Create Debate" + + expect(page).to have_content "Debate was successfully created." + end + + scenario 'Failed creation goes back to new showing featured tags' do + featured_tag = create(:tag, :featured) + tag = create(:tag) + login_as(create(:user)) + + visit new_debate_path + fill_in 'debate_title', with: "" + fill_in 'debate_description', with: 'Very important issue...' + fill_in 'debate_captcha', with: correct_captcha_text + check 'debate_terms_of_service' + + click_button "Create Debate" + + expect(page).to_not have_content "Debate was successfully created." + expect(page).to have_content "1 error" + within(".tags") do + expect(page).to have_content featured_tag.name + expect(page).to_not have_content tag.name + end + end + + scenario 'Errors on create' do + author = create(:user) + login_as(author) + + visit new_debate_path + click_button 'Create Debate' + expect(page).to have_content error_message end scenario 'JS injection is prevented but safe html is respected' do @@ -61,6 +108,7 @@ visit new_debate_path fill_in 'debate_title', with: 'A test' fill_in 'debate_description', with: '

This is

' + fill_in 'debate_captcha', with: correct_captcha_text check 'debate_terms_of_service' click_button 'Create Debate' @@ -72,25 +120,55 @@ expect(page.html).to_not include '<p>This is' end - scenario 'tagging using dangerous strings' do + context 'Tagging debates' do + let(:author) { create(:user) } - author = create(:user) - login_as(author) + background do + login_as(author) + end - visit new_debate_path + scenario 'using featured tags', :js do + ['Medio Ambiente', 'Ciencia'].each do |tag_name| + create(:tag, :featured, name: tag_name) + end - fill_in 'debate_title', with: 'A test' - fill_in 'debate_description', with: 'A test' - fill_in 'debate_tag_list', with: 'user_id=1, &a=3, ' - check 'debate_terms_of_service' + visit new_debate_path - click_button 'Create Debate' + fill_in 'debate_title', with: 'A test' + fill_in_ckeditor 'debate_description', with: 'A test' + fill_in 'debate_captcha', with: correct_captcha_text + check 'debate_terms_of_service' - expect(page).to have_content 'Debate was successfully created.' - expect(page).to have_content 'user_id1' - expect(page).to have_content 'a3' - expect(page).to have_content 'scriptalert("hey");script' - expect(page.html).to_not include 'user_id=1, &a=3, ' + ['Medio Ambiente', 'Ciencia'].each do |tag_name| + find('.js-add-tag-link', text: tag_name).click + end + + click_button 'Create Debate' + + expect(page).to have_content 'Debate was successfully created.' + ['Medio Ambiente', 'Ciencia'].each do |tag_name| + expect(page).to have_content tag_name + end + end + + scenario 'using dangerous strings' do + visit new_debate_path + + fill_in 'debate_title', with: 'A test' + fill_in 'debate_description', with: 'A test' + fill_in 'debate_captcha', with: correct_captcha_text + check 'debate_terms_of_service' + + fill_in 'debate_tag_list', with: 'user_id=1, &a=3, ' + + click_button 'Create Debate' + + expect(page).to have_content 'Debate was successfully created.' + expect(page).to have_content 'user_id1' + expect(page).to have_content 'a3' + expect(page).to have_content 'scriptalert("hey");script' + expect(page.html).to_not include 'user_id=1, &a=3, ' + end end scenario 'Update should not be posible if logged user is not the author' do @@ -105,12 +183,12 @@ scenario 'Update should not be posible if debate is not editable' do debate = create(:debate) - vote = create(:vote, votable: debate) + create(:vote, votable: debate) expect(debate).to_not be_editable login_as(debate.author) visit edit_debate_path(debate) - edit_debate_path(debate) + expect(current_path).to eq(root_path) expect(page).to have_content 'not authorized' end @@ -124,6 +202,7 @@ fill_in 'debate_title', with: "End child poverty" fill_in 'debate_description', with: "Let's..." + fill_in 'debate_captcha', with: correct_captcha_text click_button "Update Debate" @@ -132,4 +211,90 @@ expect(page).to have_content "Let's..." end + scenario 'Errors on update' do + debate = create(:debate) + login_as(debate.author) + + visit edit_debate_path(debate) + fill_in 'debate_title', with: "" + click_button 'Update Debate' + + expect(page).to have_content error_message + end + + scenario 'Captcha is required to update a debate' do + debate = create(:debate) + login_as(debate.author) + + visit edit_debate_path(debate) + expect(current_path).to eq(edit_debate_path(debate)) + + fill_in 'debate_title', with: "New title" + fill_in 'debate_captcha', with: "wrong!" + click_button "Update Debate" + + expect(page).to_not have_content "Debate was successfully updated." + expect(page).to have_content "1 error" + + fill_in 'debate_captcha', with: correct_captcha_text + click_button "Update Debate" + + expect(page).to have_content "Debate was successfully updated." + end + + scenario 'Failed update goes back to edit showing featured tags' do + debate = create(:debate) + featured_tag = create(:tag, :featured) + tag = create(:tag) + login_as(debate.author) + + visit edit_debate_path(debate) + expect(current_path).to eq(edit_debate_path(debate)) + + fill_in 'debate_title', with: "" + fill_in 'debate_captcha', with: correct_captcha_text + click_button "Update Debate" + + expect(page).to_not have_content "Debate was successfully updated." + expect(page).to have_content "1 error" + within(".tags") do + expect(page).to have_content featured_tag.name + expect(page).to_not have_content tag.name + end + end + + describe 'Limiting tags shown' do + tags = ["Hacienda", "Economía", "Medio Ambiente", "Corrupción", "Fiestas populares", "Prensa", "Huelgas"] + let(:all_tags) { tags } + let(:debate) { create :debate, tag_list: all_tags } + + scenario 'Index page shows up to 5 tags per debate' do + debate + visible_tags = ["Medio Ambiente", "Corrupción", "Fiestas populares", "Prensa", "Huelgas"] + + visit debates_path + + within('.debate .tags') do + visible_tags.each do |tag| + expect(page).to have_content tag + end + expect(page).to have_content '2+' + end + end + + scenario 'Index page shows 3 tags with no plus link' do + tag_list = ["Medio Ambiente", "Corrupción", "Fiestas populares"] + create :debate, tag_list: tag_list + + visit debates_path + + within('.debate .tags') do + tag_list.each do |tag| + expect(page).to have_content tag + end + expect(page).not_to have_content '+' + end + end + end + end diff --git a/spec/features/home_spec.rb b/spec/features/home_spec.rb index 2efa307cc12..fcad1ca249d 100644 --- a/spec/features/home_spec.rb +++ b/spec/features/home_spec.rb @@ -2,4 +2,19 @@ feature "Home" do + scenario 'featured debates' do + featured_debates = [create(:debate), create(:debate), create(:debate)] + + visit root_path + + expect(page).to have_selector('#featured-debates .debate-featured', count: 3) + featured_debates.each do |debate| + within('#featured-debates') do + expect(page).to have_content debate.title + expect(page).to have_css("a[href='#{debate_path(debate)}']", text: debate.description) + end + end + + end + end diff --git a/spec/features/organizations_spec.rb b/spec/features/organizations_spec.rb index d0144ecb536..a79264d656a 100644 --- a/spec/features/organizations_spec.rb +++ b/spec/features/organizations_spec.rb @@ -21,15 +21,6 @@ expect(user.organization).to_not be_verified end - scenario "Organization fields are validated" do - visit new_organization_registration_path - click_button 'Sign up' - - expect(page).to have_content "Email can't be blank" - expect(page).to have_content "Password can't be blank" - expect(page).to have_content "Organization name can't be blank" - end - scenario 'Shared links' do visit new_user_registration_path expect(page).to have_link "Sign up as an organization" diff --git a/spec/features/tags_spec.rb b/spec/features/tags_spec.rb index 8ea48eabc92..a15902dc7a9 100644 --- a/spec/features/tags_spec.rb +++ b/spec/features/tags_spec.rb @@ -51,11 +51,9 @@ visit debates_path - within "#tag-cloud" do - expect(page).to have_css(".s", text: "Medio Ambiente(1)") - expect(page).to have_css(".m", text: "Corrupción(5)") - expect(page).to have_css(".l", text: "Economía(10)") - end + within(:css, "#tag-cloud .s") { expect(page).to have_content('Medio Ambiente 1') } + within(:css, "#tag-cloud .m") { expect(page).to have_content('Corrupción 5') } + within(:css, "#tag-cloud .l") { expect(page).to have_content('Economía 10') } end scenario 'Create' do @@ -65,6 +63,7 @@ visit new_debate_path fill_in 'debate_title', with: 'Title' fill_in 'debate_description', with: 'Description' + fill_in 'debate_captcha', with: correct_captcha_text check 'debate_terms_of_service' fill_in 'debate_tag_list', with: "Impuestos, Economía, Hacienda" @@ -86,6 +85,7 @@ expect(page).to have_selector("input[value='Economía']") fill_in 'debate_tag_list', with: "Economía, Hacienda" + fill_in 'debate_captcha', with: correct_captcha_text click_button 'Update Debate' expect(page).to have_content 'Debate was successfully updated.' @@ -102,6 +102,7 @@ visit edit_debate_path(debate) fill_in 'debate_tag_list', with: "" + fill_in 'debate_captcha', with: correct_captcha_text click_button 'Update Debate' expect(page).to have_content 'Debate was successfully updated.' diff --git a/spec/features/users_spec.rb b/spec/features/users_spec.rb index c15869bae6a..2b79848334a 100644 --- a/spec/features/users_spec.rb +++ b/spec/features/users_spec.rb @@ -11,6 +11,7 @@ fill_in 'user_email', with: 'manuela@madrid.es' fill_in 'user_password', with: 'judgementday' fill_in 'user_password_confirmation', with: 'judgementday' + fill_in 'user_captcha', with: correct_captcha_text click_button 'Sign up' @@ -22,8 +23,16 @@ expect(page).to have_content "Your email address has been successfully confirmed" end + scenario 'Errors on sign up' do + visit '/' + click_link 'Sign up' + click_button 'Sign up' + + expect(page).to have_content error_message + end + scenario 'Sign in' do - user = create(:user, email: 'manuela@madrid.es', password: 'judgementday') + create(:user, email: 'manuela@madrid.es', password: 'judgementday') visit '/' click_link 'Log in' diff --git a/spec/features/votes_spec.rb b/spec/features/votes_spec.rb index ecb8a8b8fe8..548c7e30895 100644 --- a/spec/features/votes_spec.rb +++ b/spec/features/votes_spec.rb @@ -13,57 +13,106 @@ visit debate_path(@debate) end - scenario "Index show user votes on debates" do + scenario "Home shows user votes on featured debates" do debate1 = create(:debate) debate2 = create(:debate) debate3 = create(:debate) - vote = create(:vote, voter: @manuela, votable: debate1, vote_flag: true) - vote = create(:vote, voter: @manuela, votable: debate3, vote_flag: false) + create(:vote, voter: @manuela, votable: debate1, vote_flag: true) + create(:vote, voter: @manuela, votable: debate3, vote_flag: false) - visit debates_path + visit root_path - within("#debate_#{debate1.id}_votes") do - within(".in-favor") do - expect(page).to have_css("a.voted") - expect(page).to_not have_css("a.no-voted") + within("#featured-debates") do + within("#debate_#{debate1.id}_votes") do + within(".in-favor") do + expect(page).to have_css("a.voted") + expect(page).to_not have_css("a.no-voted") + end + + within(".against") do + expect(page).to have_css("a.no-voted") + expect(page).to_not have_css("a.voted") + end end - within(".against") do - expect(page).to have_css("a.no-voted") - expect(page).to_not have_css("a.voted") - end - end + within("#debate_#{debate2.id}_votes") do + within(".in-favor") do + expect(page).to_not have_css("a.voted") + expect(page).to_not have_css("a.no-voted") + end - within("#debate_#{debate2.id}_votes") do - within(".in-favor") do - expect(page).to_not have_css("a.voted") - expect(page).to_not have_css("a.no-voted") + within(".against") do + expect(page).to_not have_css("a.no-voted") + expect(page).to_not have_css("a.voted") + end end - within(".against") do - expect(page).to_not have_css("a.no-voted") - expect(page).to_not have_css("a.voted") + within("#debate_#{debate3.id}_votes") do + within(".in-favor") do + expect(page).to have_css("a.no-voted") + expect(page).to_not have_css("a.voted") + end + + within(".against") do + expect(page).to have_css("a.voted") + expect(page).to_not have_css("a.no-voted") + end end end + end - within("#debate_#{debate3.id}_votes") do - within(".in-favor") do - expect(page).to have_css("a.no-voted") - expect(page).to_not have_css("a.voted") + scenario "Index shows user votes on debates" do + debate1 = create(:debate) + debate2 = create(:debate) + debate3 = create(:debate) + create(:vote, voter: @manuela, votable: debate1, vote_flag: true) + create(:vote, voter: @manuela, votable: debate3, vote_flag: false) + + visit debates_path + + within("#debates") do + within("#debate_#{debate1.id}_votes") do + within(".in-favor") do + expect(page).to have_css("a.voted") + expect(page).to_not have_css("a.no-voted") + end + + within(".against") do + expect(page).to have_css("a.no-voted") + expect(page).to_not have_css("a.voted") + end end - within(".against") do - expect(page).to have_css("a.voted") - expect(page).to_not have_css("a.no-voted") + within("#debate_#{debate2.id}_votes") do + within(".in-favor") do + expect(page).to_not have_css("a.voted") + expect(page).to_not have_css("a.no-voted") + end + + within(".against") do + expect(page).to_not have_css("a.no-voted") + expect(page).to_not have_css("a.voted") + end end - end + within("#debate_#{debate3.id}_votes") do + within(".in-favor") do + expect(page).to have_css("a.no-voted") + expect(page).to_not have_css("a.voted") + end + + within(".against") do + expect(page).to have_css("a.voted") + expect(page).to_not have_css("a.no-voted") + end + end + end end scenario 'Show no votes' do visit debate_path(@debate) - expect(page).to have_content "0 votes" + expect(page).to have_content "No votes" within('.in-favor') do expect(page).to have_content "0%" @@ -71,7 +120,7 @@ expect(page).to_not have_css("a.no-voted") end - within('.against') do + within('.against') do expect(page).to have_content "0%" expect(page).to_not have_css("a.voted") expect(page).to_not have_css("a.no-voted") @@ -79,8 +128,8 @@ end scenario 'Show' do - vote = create(:vote, voter: @manuela, votable: @debate, vote_flag: true) - vote = create(:vote, voter: @pablo, votable: @debate, vote_flag: false) + create(:vote, voter: @manuela, votable: @debate, vote_flag: true) + create(:vote, voter: @pablo, votable: @debate, vote_flag: false) visit debate_path(@debate) @@ -91,7 +140,7 @@ expect(page).to have_css("a.voted") end - within('.against') do + within('.against') do expect(page).to have_content "50%" expect(page).to have_css("a.no-voted") end @@ -105,7 +154,7 @@ expect(page).to have_css("a.voted") end - within('.against') do + within('.against') do expect(page).to have_content "0%" expect(page).to have_css("a.no-voted") end @@ -114,7 +163,7 @@ end scenario 'Create from debate featured', :js do - visit debates_path + visit root_path within("#featured-debates") do find('.in-favor a').click @@ -124,22 +173,20 @@ expect(page).to have_css("a.voted") end - within('.against') do + within('.against') do expect(page).to have_content "0%" expect(page).to have_css("a.no-voted") end expect(page).to have_content "1 vote" end - expect(URI.parse(current_url).path).to eq(debates_path) + expect(URI.parse(current_url).path).to eq(root_path) end scenario 'Create from debate index', :js do - 3.times { create(:debate) } visit debates_path within("#debates") do - expect(page).to have_css(".debate", count: 1) find('.in-favor a').click @@ -148,7 +195,7 @@ expect(page).to have_css("a.voted") end - within('.against') do + within('.against') do expect(page).to have_content "0%" expect(page).to have_css("a.no-voted") end @@ -167,7 +214,7 @@ expect(page).to have_css("a.no-voted") end - within('.against') do + within('.against') do expect(page).to have_content "100%" expect(page).to have_css("a.voted") end @@ -183,18 +230,15 @@ expect(page).to have_content "100%" end - within('.against') do + within('.against') do expect(page).to have_content "0%" end expect(page).to have_content "1 vote" end - end - feature 'Comments' do - background do @manuela = create(:user) @pablo = create(:user) @@ -206,19 +250,21 @@ end scenario 'Show' do - vote = create(:vote, voter: @manuela, votable: @comment, vote_flag: true) - vote = create(:vote, voter: @pablo, votable: @comment, vote_flag: false) + create(:vote, voter: @manuela, votable: @comment, vote_flag: true) + create(:vote, voter: @pablo, votable: @comment, vote_flag: false) visit debate_path(@debate) within("#comment_#{@comment.id}_votes") do - within(".in_favor") do + within(".in_favor") do expect(page).to have_content "1" end - within(".against") do + within(".against") do expect(page).to have_content "1" end + + expect(page).to have_content "2 votes" end end @@ -230,9 +276,11 @@ expect(page).to have_content "1" end - within(".against") do + within(".against") do expect(page).to have_content "0" end + + expect(page).to have_content "1 vote" end end @@ -245,9 +293,11 @@ expect(page).to have_content "0" end - within('.against') do + within('.against') do expect(page).to have_content "1" end + + expect(page).to have_content "1 vote" end end @@ -260,11 +310,13 @@ expect(page).to have_content "1" end - within('.against') do + within('.against') do expect(page).to have_content "0" end + + expect(page).to have_content "1 vote" end end end -end \ No newline at end of file +end diff --git a/spec/helpers/recaptcha_helper_spec.rb b/spec/helpers/recaptcha_helper_spec.rb deleted file mode 100644 index 7d44e2f08ab..00000000000 --- a/spec/helpers/recaptcha_helper_spec.rb +++ /dev/null @@ -1,36 +0,0 @@ -require 'rails_helper' - -describe RecaptchaHelper do - - describe '#recaptchable?' do - - it 'should be true if new record' do - debate = build(:debate) - expect(helper.recaptchable?(debate)).to be true - end - - it 'should be false if existing record' do - debate = create(:debate) - expect(helper.recaptchable?(debate)).to be false - end - - end - - describe "#recaptcha_keys?" do - - it "should be true if Recaptcha keys are configured" do - allow(Recaptcha.configuration).to receive(:public_key).and_return("akjasf") - allow(Recaptcha.configuration).to receive(:private_key).and_return("akjasf4532") - - expect(helper.recaptcha_keys?).to be true - end - - it "should be false if Recaptcha keys are not configured" do - allow(Recaptcha.configuration).to receive(:public_key).and_return(nil) - allow(Recaptcha.configuration).to receive(:private_key).and_return(nil) - - expect(helper.recaptcha_keys?).to be false - end - - end -end diff --git a/spec/models/comment_spec.rb b/spec/models/comment_spec.rb new file mode 100644 index 00000000000..5af7afc1c18 --- /dev/null +++ b/spec/models/comment_spec.rb @@ -0,0 +1,41 @@ +require 'rails_helper' + +describe Comment do + + let(:comment) { build(:comment) } + + it "should be valid" do + expect(comment).to be_valid + end + + describe "#children_count" do + let(:comment) { create(:comment) } + let(:debate) { comment.debate } + + it "should count first level children" do + parent = comment + + 3.times do + create(:comment, commentable: debate). + move_to_child_of(parent) + parent = parent.children.first + end + + expect(comment.children_count).to eq(1) + expect(debate.comment_threads.count).to eq(4) + end + + it "should increase children count" do + expect do + create(:comment, commentable: debate). + move_to_child_of(comment) + end.to change { comment.children_count }.from(0).to(1) + end + + it "should decrease children count" do + new_comment = create(:comment, commentable: debate).move_to_child_of(comment) + + expect { new_comment.destroy }.to change { comment.children_count }.from(1).to(0) + end + end +end diff --git a/spec/models/debate_spec.rb b/spec/models/debate_spec.rb index 00f6217bdde..5e1ed76c8e2 100644 --- a/spec/models/debate_spec.rb +++ b/spec/models/debate_spec.rb @@ -1,88 +1,104 @@ require 'rails_helper' describe Debate do - - before(:each) do - @debate = build(:debate) - end + let(:debate) { build(:debate) } it "should be valid" do - expect(@debate).to be_valid + expect(debate).to be_valid end it "should not be valid without an author" do - @debate.author = nil - expect(@debate).to_not be_valid + debate.author = nil + expect(debate).to_not be_valid end it "should not be valid without a title" do - @debate.title = nil - expect(@debate).to_not be_valid + debate.title = nil + expect(debate).to_not be_valid end describe "#description" do it "should be mandatory" do - @debate.description = nil - expect(@debate).to_not be_valid + debate.description = nil + expect(debate).to_not be_valid end it "should be sanitized" do - @debate.description = "" - @debate.valid? - expect(@debate.description).to eq("alert('danger');") + debate.description = "" + debate.valid? + expect(debate.description).to eq("alert('danger');") end it "should be html_safe" do - @debate.description = "" - expect(@debate.description).to be_html_safe + debate.description = "" + expect(debate.description).to be_html_safe end end it "should sanitize the tag list" do - @debate.tag_list = "user_id=1" - @debate.valid? - expect(@debate.tag_list).to eq(['user_id1']) + debate.tag_list = "user_id=1" + debate.valid? + expect(debate.tag_list).to eq(['user_id1']) end it "should not be valid without accepting terms of service" do - @debate.terms_of_service = nil - expect(@debate).to_not be_valid + debate.terms_of_service = nil + expect(debate).to_not be_valid end describe "#editable?" do - before(:each) do - @debate = create(:debate) - end + let(:debate) { create(:debate) } it "should be true if debate has no votes yet" do - expect(@debate.total_votes).to eq(0) - expect(@debate.editable?).to be true + expect(debate.total_votes).to eq(0) + expect(debate.editable?).to be true end it "should be false if debate has votes" do - create(:vote, votable: @debate) - expect(@debate.total_votes).to eq(1) - expect(@debate.editable?).to be false + create(:vote, votable: debate) + expect(debate.total_votes).to eq(1) + expect(debate.editable?).to be false end end describe "#editable_by?" do - before(:each) do - @debate = create(:debate) - end + let(:debate) { create(:debate) } it "should be true if user is the author and debate is editable" do - expect(@debate.editable_by?(@debate.author)).to be true + expect(debate.editable_by?(debate.author)).to be true end it "should be false if debate is not editable" do - create(:vote, votable: @debate) - expect(@debate.editable_by?(@debate.author)).to be false + create(:vote, votable: debate) + expect(debate.editable_by?(debate.author)).to be false end it "should be false if user is not the author" do - expect(@debate.editable_by?(create(:user))).to be false + expect(debate.editable_by?(create(:user))).to be false + end + end + + describe "#search" do + let!(:economy) { create(:debate, tag_list: "Economy") } + let!(:health) { create(:debate, tag_list: "Health") } + + it "returns debates tagged with params tag" do + params = {tag: "Economy"} + expect(Debate.search(params)).to match_array([economy]) + end + + it "returns all debates if no parameters" do + params = {} + expect(Debate.search(params)).to match_array([economy, health]) + end + end + + describe '#default_order' do + let!(:economy) { create(:debate) } + let!(:health) { create(:debate) } + it "returns debates ordered by last one first" do + expect(Debate.all).to eq([health, economy]) end end diff --git a/spec/models/user_spec.rb b/spec/models/user_spec.rb index 7d79898c075..7f1cd3460ec 100644 --- a/spec/models/user_spec.rb +++ b/spec/models/user_spec.rb @@ -2,25 +2,21 @@ describe User do - describe "#votes_on_debates" do - before(:each) do - @user = create(:user) - end + describe "#debate_votes" do + let(:user) { create(:user) } it "returns {} if no debate" do - expect(@user.votes_on_debates()).to eq({}) - expect(@user.votes_on_debates([])).to eq({}) - expect(@user.votes_on_debates([nil, nil])).to eq({}) + expect(user.debate_votes([])).to eq({}) end it "returns a hash of debates ids and votes" do debate1 = create(:debate) debate2 = create(:debate) debate3 = create(:debate) - create(:vote, voter: @user, votable: debate1, vote_flag: true) - create(:vote, voter: @user, votable: debate3, vote_flag: false) + create(:vote, voter: user, votable: debate1, vote_flag: true) + create(:vote, voter: user, votable: debate3, vote_flag: false) - voted = @user.votes_on_debates([debate1.id, debate2.id, debate3.id]) + voted = user.debate_votes([debate1, debate2, debate3]) expect(voted[debate1.id]).to eq(true) expect(voted[debate2.id]).to eq(nil) diff --git a/spec/models/vote_spec.rb b/spec/models/vote_spec.rb new file mode 100644 index 00000000000..41fcf847166 --- /dev/null +++ b/spec/models/vote_spec.rb @@ -0,0 +1,46 @@ +require 'rails_helper' + +describe 'Vote' do + + describe '#for_debates' do + it 'returns votes for debates' do + debate = create(:debate) + create(:vote, votable: debate) + + expect(Vote.for_debates.count).to eq(1) + end + + it 'does not returns votes for other votables' do + comment = create(:comment) + create(:vote, votable: comment) + + expect(Vote.for_debates.count).to eq(0) + end + end + + describe '#in' do + it 'returns debates send in parameters' do + debate = create(:debate) + create(:vote, votable: debate) + + expect(Vote.in(debate).count).to eq(1) + end + + it 'does not return debates not in parameters' do + debate = create(:debate) + create(:vote, votable: debate) + + expect(Vote.in([]).count).to eq(0) + end + end + + describe '#value' do + it 'returns vote flag' do + vote = create(:vote, vote_flag: true) + expect(vote.value).to eq(true) + + vote = create(:vote, vote_flag: false) + expect(vote.value).to eq(false) + end + end +end \ No newline at end of file diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 640f9e96c82..5558c63d452 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -1,7 +1,7 @@ require 'factory_girl_rails' require 'database_cleaner' require "email_spec" -Dir["./spec/support/**/*.rb"].sort.each { |f| require f} +Dir["./spec/support/**/*.rb"].sort.each { |f| require f } RSpec.configure do |config| config.use_transactional_fixtures = false @@ -17,7 +17,7 @@ end config.before(:each) do |example| - DatabaseCleaner.strategy= example.metadata[:js] ? :truncation : :transaction + DatabaseCleaner.strategy = example.metadata[:js] ? :truncation : :transaction DatabaseCleaner.start end diff --git a/spec/support/common_actions.rb b/spec/support/common_actions.rb index d07f6026116..32252aa1a42 100644 --- a/spec/support/common_actions.rb +++ b/spec/support/common_actions.rb @@ -9,6 +9,7 @@ def sign_up fill_in 'user_email', with: 'manuela@madrid.es' fill_in 'user_password', with: 'judgementday' fill_in 'user_password_confirmation', with: 'judgementday' + fill_in 'user_captcha', with: correct_captcha_text click_button 'Sign up' end @@ -51,4 +52,30 @@ def reply_to(user) expect(page).to have_content 'It will be done next week.' end -end \ No newline at end of file + def correct_captcha_text + SimpleCaptcha::SimpleCaptchaData.last.value + end + + def avatar(name) + "img.initialjs-avatar[data-name='#{name}']" + end + + # Used to fill ckeditor fields + # @param [String] locator label text for the textarea or textarea id + def fill_in_ckeditor(locator, params = {}) + # Find out ckeditor id at runtime using its label + locator = find('label', text: locator)[:for] if page.has_css?('label', text: locator) + # Fill the editor content + page.execute_script <<-SCRIPT + var ckeditor = CKEDITOR.instances.#{locator} + ckeditor.setData('#{params[:with]}') + ckeditor.focus() + ckeditor.updateElement() + SCRIPT + end + + def error_message + /\d errors? prohibited this (.*) from being saved:/ + end + +end