From 5dd3299c83724bc30c0e2799aa6bc51c2c86f3fd Mon Sep 17 00:00:00 2001 From: Felipe Henrique de Almeida Bormann Date: Mon, 26 Dec 2016 16:34:25 -0300 Subject: [PATCH] create category button is 100% functional and create form is handling errors and restrictions --- amadeus/static/css/base/amadeus.css | 10 ++++++++++ amadeus/templates/base.html | 2 +- categories/templates/categories/create.html | 2 +- categories/templates/categories/list.html | 24 +++++++++++++++++++----- 4 files changed, 31 insertions(+), 7 deletions(-) diff --git a/amadeus/static/css/base/amadeus.css b/amadeus/static/css/base/amadeus.css index 4675d40..f4adc2a 100755 --- a/amadeus/static/css/base/amadeus.css +++ b/amadeus/static/css/base/amadeus.css @@ -39,6 +39,16 @@ margin-left: 2%; } +#create-category{ + margin-left: 40%; + margin-bottom: 1%; + border: none; + background-color: #66BB6A; + color: #FFFFFF; + width: 200px; + height: 40px; + font-size: 15px; +} /* category app ends */ diff --git a/amadeus/templates/base.html b/amadeus/templates/base.html index 6df7b2c..f63cffb 100644 --- a/amadeus/templates/base.html +++ b/amadeus/templates/base.html @@ -108,7 +108,7 @@
  • diff --git a/categories/templates/categories/create.html b/categories/templates/categories/create.html index bbd0b09..2a4222a 100644 --- a/categories/templates/categories/create.html +++ b/categories/templates/categories/create.html @@ -47,7 +47,7 @@ {% endfor %}
    - +
    diff --git a/categories/templates/categories/list.html b/categories/templates/categories/list.html index 21694d7..71eab69 100755 --- a/categories/templates/categories/list.html +++ b/categories/templates/categories/list.html @@ -23,6 +23,7 @@ {% endfor %} {% endif %} +
    @@ -36,13 +37,26 @@ {{category.name}} - - - + {% if user|has_role:'sys_admin' %} + + + {% endif %} - + {% if user|has_role:'student' %} + + - + + + + {% endif %} + + +
    -- libgit2 0.21.2