{"action":"created","issue":{"url":"https://api.github.com/repos/mxabierto/participa/issues/190","labels_url":"https://api.github.com/repos/mxabierto/participa/issues/190/labels{/name}","comments_url":"https://api.github.com/repos/mxabierto/participa/issues/190/comments","events_url":"https://api.github.com/repos/mxabierto/participa/issues/190/events","html_url":"https://github.com/mxabierto/participa/pull/190","id":105960841,"number":190,"title":"Feature/layout leyes. Resolves #173","user":{"login":"codemoe","id":4172905,"avatar_url":"https://avatars.githubusercontent.com/u/4172905?v=3","gravatar_id":"","url":"https://api.github.com/users/codemoe","html_url":"https://github.com/codemoe","followers_url":"https://api.github.com/users/codemoe/followers","following_url":"https://api.github.com/users/codemoe/following{/other_user}","gists_url":"https://api.github.com/users/codemoe/gists{/gist_id}","starred_url":"https://api.github.com/users/codemoe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codemoe/subscriptions","organizations_url":"https://api.github.com/users/codemoe/orgs","repos_url":"https://api.github.com/users/codemoe/repos","events_url":"https://api.github.com/users/codemoe/events{/privacy}","received_events_url":"https://api.github.com/users/codemoe/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/mxabierto/participa/labels/in%20progress","name":"in progress","color":"ededed"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-09-11T07:47:51Z","updated_at":"2015-09-16T05:18:02Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/mxabierto/participa/pulls/190","html_url":"https://github.com/mxabierto/participa/pull/190","diff_url":"https://github.com/mxabierto/participa/pull/190.diff","patch_url":"https://github.com/mxabierto/participa/pull/190.patch"},"body":"It is necessary to run composer install to install the graham-campbell/binput package that handles security on text and file inputs and to add a \"Leyes\" layout to the categories table on the DB\r\n\r\n<img width=\"358\" alt=\"captura de pantalla 2015-09-11 a las 2 52 17\" src=\"https://cloud.githubusercontent.com/assets/4172905/9809707/2ecaaccc-5830-11e5-9100-19844c686131.png\">\r\n\r\n\r\nAdd a leyes layout that relies on uploading a CSV file with a format same as: https://docs.google.com/spreadsheets/d/12BnK1P8-tIY0A2_htPaep_w3o_JPpaMzOf02UX7C56M/edit?usp=sharing\r\n\r\nand displays side by side and inline diff views. The CSV file gets parsed and saved as a json encoded array. If the CSV is too large for the content field on the DB to hold the contents, the parsed content gets stored to a txt file on the server and the actual content of the document stores the location for the source file\r\n\r\nTo display the diff properly, the document needs to be added to the \"Leyes - layout\" category\r\n\r\nDue to the fact that a file upload was added, this implements also the ability to upload a TXT or MD file to overwrite the document content.\r\n\r\nResolves #173 \r\n\r\nUploaded a CSV file \r\n\r\n![csv content](https://cloud.githubusercontent.com/assets/4172905/9809574/2b2f997a-582f-11e5-99f4-cc5b25bacdd7.png)\r\n\r\n\r\nUploaded a large CSV file\r\n\r\n![csv content large](https://cloud.githubusercontent.com/assets/4172905/9809581/36f17daa-582f-11e5-8090-acf4f0d02f70.png)\r\n\r\n\r\nEditing the document and adding the proper layout\r\n\r\n![edit doc](https://cloud.githubusercontent.com/assets/4172905/9809588/44dcc8a2-582f-11e5-9319-f4c35f3c4545.png)\r\n\r\n\r\nInline diff\r\n\r\n![inline diff](https://cloud.githubusercontent.com/assets/4172905/9809603/608d9270-582f-11e5-9428-6d7898c42133.png)\r\n\r\n\r\nSide by side diff\r\n\r\n![side by side diff](https://cloud.githubusercontent.com/assets/4172905/9809605/659af4c4-582f-11e5-87d6-e43e71848430.png)\r\n\r\n\r\n\r\nFinally, as we added the Binput package, this PR implements cleaning the create document and edit document input fields to avoid code injections like <script> tags"},"comment":{"url":"https://api.github.com/repos/mxabierto/participa/issues/comments/140628580","html_url":"https://github.com/mxabierto/participa/pull/190#issuecomment-140628580","issue_url":"https://api.github.com/repos/mxabierto/participa/issues/190","id":140628580,"user":{"login":"codemoe","id":4172905,"avatar_url":"https://avatars.githubusercontent.com/u/4172905?v=3","gravatar_id":"","url":"https://api.github.com/users/codemoe","html_url":"https://github.com/codemoe","followers_url":"https://api.github.com/users/codemoe/followers","following_url":"https://api.github.com/users/codemoe/following{/other_user}","gists_url":"https://api.github.com/users/codemoe/gists{/gist_id}","starred_url":"https://api.github.com/users/codemoe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codemoe/subscriptions","organizations_url":"https://api.github.com/users/codemoe/orgs","repos_url":"https://api.github.com/users/codemoe/repos","events_url":"https://api.github.com/users/codemoe/events{/privacy}","received_events_url":"https://api.github.com/users/codemoe/received_events","type":"User","site_admin":false},"created_at":"2015-09-16T05:18:02Z","updated_at":"2015-09-16T05:18:02Z","body":"@rodowi @jipster @urkonn @joecohens \r\n\r\nCreo que ya quedaron los cambios. Adjunto screenshots de cómo se ve el layout con los nuevos cambios. El CSV lo obtuve del documento https://docs.google.com/spreadsheets/d/1TkWQJmdUMxcuOgtmAJbmPd3bgFrVugsk-3wErVuXAaY/edit#gid=1115525267\r\n\r\nCabe mencionar que un CSV no funciona con pestañas si no que únicamente se genera el CSV sobre la pestaña de los cambios ignorando las demás pestañas del documento\r\n\r\n@jipster En el formato no hay que agregar \"Se elimina\" en las celdas donde se elimina el contenido si no que hay que dejar la celda vacía. También, en la medida de lo posible estaría bien que en las descripciones se agregara el párrafo o enunciado completo y no solo las palabras que cambian para que el diff tenga más sentido\r\n\r\n![side diff](https://cloud.githubusercontent.com/assets/4172905/9896945/54ec0c44-5c08-11e5-8d70-9f3340076f35.png)\r\n\r\n\r\n![inline diff](https://cloud.githubusercontent.com/assets/4172905/9896964/58460228-5c08-11e5-8f27-7c54d8c92e33.png)\r\n\r\n\r\nSaludos!"}}