From 05c4a5da2fa2f495d9f8dfeeb9d758366f1bc451 Mon Sep 17 00:00:00 2001 From: Felix Hamann Date: Sun, 11 Nov 2018 23:13:57 +0100 Subject: [PATCH 1/3] updates to README --- README.md | 45 ++++++++++++++++++++++++++------------------- 1 file changed, 26 insertions(+), 19 deletions(-) diff --git a/README.md b/README.md index e6b42fe4f..afa47f082 100644 --- a/README.md +++ b/README.md @@ -6,68 +6,75 @@ The following Description applies to Ubuntu or similar. Clone this repository `git clone https://gitlab.cip.ifi.lmu.de/jost/UniWorX.git` and navigate into the new directory `cd UniWorX`. ## LDAP - install: + install: `sudo apt-get install slapd ldap-utils` ## PostgreSQL - install: + install: `sudo apt-get install postgresql` - switch to user *postgres* (got created during installation): + switch to user *postgres* (got created during installation): `sudo -i -u postgres` - add db user *uniworx*: + add db user *uniworx*: `createuser --interactive` you'll get a prompt: ``` - Enter name of role to add:` - [enter 'uniworx'] + Enter name of role to add:` - uniworx Shall the new role be a superuser? (y/n)` - [not exactly sure. Guess not?] + Password: uniworx + ... ``` - create database *uniworx*: + create database *uniworx*: `createdb uniworx` + after you added the database switch back to your own user with `Ctrl + D`. - to access the database as user *uniworx* you now need to add a new linux-user called *uniworx*: + to access the database as user *uniworx* you now need to add a new linux-user called *uniworx*. when you get asked for a password enter *uniworx*. `sudo adduser uniworx` - log-in as new user *uniworx*: + log-in as new user *uniworx*: `sudo -i -u uniworx` you can now use `psql uniworx` to execute SQL-commands and such. ## stack - Install with: + Install with: `curl -sSL https://get.haskellstack.org/ | sh` - setup stack and install dependencies: + setup stack and install dependencies: `stack setup` - During this step or the next you might get an error that says something about missing C libraries for `ldap` and `lber`. You can install these using + During this step or the next you might get an error that says something about missing C libraries for `ldap` and `lber`. You can install these using `sudo apt-get install libsasl2-dev libldap2-dev` - If you get an error that says *You need to install postgresql-server-dev-X.Y for building a server-side extension or libpq-dev for building a client-side application.* - Go ahead an install `libpq-dev` with + If you get an error that says *You need to install postgresql-server-dev-X.Y for building a server-side extension or libpq-dev for building a client-side application.* + Go ahead an install `libpq-dev` with `sudo apt-get install libpq-dev` - Build the app: + Other packages you might need to install during this process: + `sudo apt-get install pkg-config` + `sudo apt-get install libsodium-dev` + + Build the app: `stack build` This might take a few minutes if not hours... be prepared. - install yesod: + install yesod: `stack install yesod-bin --install-ghc` ## Add Dumy-Data and run the app After building the app you can prepare the database and add some dummy data: - `./fill-db.hs` + `./db.sh -f` - Run the app: + Run the app: `./start.sh` - `Devel application launched: http://localhost:3000` + `Devel application launched: http://localhost:3000` means you are good to go. If you followed the steps above you should now be able to login as user Gregor Kleen using `LDAP:g.kleen@ifi.lmu.de` as dummy login. @@ -75,7 +82,7 @@ The following Description applies to Ubuntu or similar. *** # Sources and more infos - PostgreSQl: + PostgreSQl: https://www.digitalocean.com/community/tutorials/how-to-install-and-use-postgresql-on-ubuntu-16-04 stack: https://docs.haskellstack.org/en/stable/README/#how-to-install From 22ebc3d96ab62b4b8919575d2ad85af1aaa2b569 Mon Sep 17 00:00:00 2001 From: Felix Hamann Date: Sun, 11 Nov 2018 23:24:18 +0100 Subject: [PATCH 2/3] more beautifully signalled shell commands in README --- README.md | 85 ++++++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 62 insertions(+), 23 deletions(-) diff --git a/README.md b/README.md index afa47f082..2d59db31a 100644 --- a/README.md +++ b/README.md @@ -3,26 +3,37 @@ The following Description applies to Ubuntu or similar. ## Clone repository - Clone this repository `git clone https://gitlab.cip.ifi.lmu.de/jost/UniWorX.git` and navigate into the new directory `cd UniWorX`. + Clone this repository and navigate into + ```sh + $ git clone https://gitlab.cip.ifi.lmu.de/jost/UniWorX.git && cd UniWorX + ``` ## LDAP install: - `sudo apt-get install slapd ldap-utils` + ```sh + $ sudo apt-get install slapd ldap-utils + ``` ## PostgreSQL install: - `sudo apt-get install postgresql` + ```sh + $ sudo apt-get install postgresql + ``` switch to user *postgres* (got created during installation): - `sudo -i -u postgres` + ```sh + $ sudo -i -u postgres + ``` add db user *uniworx*: - `createuser --interactive` + ```sh + $ createuser --interactive + ``` you'll get a prompt: - ``` + ```sh Enter name of role to add:` - uniworx Shall the new role be a superuser? (y/n)` - [not exactly sure. Guess not?] Password: uniworx @@ -30,52 +41,80 @@ The following Description applies to Ubuntu or similar. ``` create database *uniworx*: - `createdb uniworx` + ```sh + $ createdb uniworx + ``` + after you added the database switch back to your own user with `Ctrl + D`. to access the database as user *uniworx* you now need to add a new linux-user called *uniworx*. when you get asked for a password enter *uniworx*. - `sudo adduser uniworx` + ```sh + $ sudo adduser uniworx + ``` log-in as new user *uniworx*: - `sudo -i -u uniworx` + ```sh + $ sudo -i -u uniworx + ``` - you can now use `psql uniworx` to execute SQL-commands and such. + you can now use + ```sh + $ psql uniworx + ``` + to execute SQL-commands and such. ## stack Install with: - `curl -sSL https://get.haskellstack.org/ | sh` + ```sh + $ curl -sSL https://get.haskellstack.org/ | sh + ``` setup stack and install dependencies: - `stack setup` + ```sh + $ stack setup + ``` During this step or the next you might get an error that says something about missing C libraries for `ldap` and `lber`. You can install these using - `sudo apt-get install libsasl2-dev libldap2-dev` + ```sh + $ sudo apt-get install libsasl2-dev libldap2-dev + ``` If you get an error that says *You need to install postgresql-server-dev-X.Y for building a server-side extension or libpq-dev for building a client-side application.* Go ahead an install `libpq-dev` with - `sudo apt-get install libpq-dev` + ```sh + $ sudo apt-get install libpq-dev + ``` Other packages you might need to install during this process: - `sudo apt-get install pkg-config` - `sudo apt-get install libsodium-dev` + ```sh + $ sudo apt-get install pkg-config + sudo apt-get install libsodium-dev + ``` Build the app: - `stack build` + ```sh + $ stack build + ``` This might take a few minutes if not hours... be prepared. install yesod: - `stack install yesod-bin --install-ghc` + ```sh + $ stack install yesod-bin --install-ghc + ``` ## Add Dumy-Data and run the app After building the app you can prepare the database and add some dummy data: - `./db.sh -f` + ```sh + $ ./db.sh -f + ``` Run the app: - `./start.sh` - - `Devel application launched: http://localhost:3000` - means you are good to go. + ```sh + $ ./start.sh + ... + Devel application launched: http://localhost:3000 + ``` If you followed the steps above you should now be able to login as user Gregor Kleen using `LDAP:g.kleen@ifi.lmu.de` as dummy login. From 56d5da648aca7877194b022a7bf27b8ae41ffd9e Mon Sep 17 00:00:00 2001 From: Felix Hamann Date: Sun, 11 Nov 2018 23:34:47 +0100 Subject: [PATCH 3/3] dont text-align:right number inputs --- templates/standalone/inputs.lucius | 1 - 1 file changed, 1 deletion(-) diff --git a/templates/standalone/inputs.lucius b/templates/standalone/inputs.lucius index 54e6aa5a6..5f9d90206 100644 --- a/templates/standalone/inputs.lucius +++ b/templates/standalone/inputs.lucius @@ -91,7 +91,6 @@ input[type*="time"] { input[type="number"] { width: 100px; - text-align: right; } input[type*="date"],