From 7f805b63cad10b83833151460b24265608d10c3b Mon Sep 17 00:00:00 2001 From: Arnaud Bos Date: Tue, 1 Nov 2011 12:57:12 +0100 Subject: [PATCH] Improvement of the sidebar look. Related to #34. Fix #52. --- budget/forms.py | 2 +- budget/messages.pot | 66 ++++++++-------- budget/static/bootstrap-1.0.0.min.css | 4 +- budget/static/main.css | 9 ++- budget/templates/forms.html | 4 +- budget/templates/list_bills.html | 22 ++++-- .../translations/fr/LC_MESSAGES/messages.mo | Bin 7230 -> 7162 bytes .../translations/fr/LC_MESSAGES/messages.po | 74 +++++++++--------- 8 files changed, 97 insertions(+), 84 deletions(-) diff --git a/budget/forms.py b/budget/forms.py index 1fa81339..0af4994d 100644 --- a/budget/forms.py +++ b/budget/forms.py @@ -135,7 +135,7 @@ class BillForm(Form): class MemberForm(Form): name = TextField(_("Name"), validators=[Required()]) - submit = SubmitField(_("Add a member")) + submit = SubmitField(_("Add")) def __init__(self, project, *args, **kwargs): super(MemberForm, self).__init__(*args, **kwargs) diff --git a/budget/messages.pot b/budget/messages.pot index ca6bd29f..892d4bd0 100644 --- a/budget/messages.pot +++ b/budget/messages.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PROJECT VERSION\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" -"POT-Creation-Date: 2011-10-20 02:32+0200\n" +"POT-Creation-Date: 2011-11-01 12:48+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -81,7 +81,7 @@ msgstr "" msgid "Amount payed" msgstr "" -#: forms.py:106 templates/list_bills.html:89 +#: forms.py:106 templates/list_bills.html:98 msgid "For whom?" msgstr "" @@ -97,8 +97,8 @@ msgstr "" msgid "Name" msgstr "" -#: forms.py:138 -msgid "Add a member" +#: forms.py:138 templates/forms.html:91 +msgid "Add" msgstr "" #: forms.py:148 @@ -157,43 +157,43 @@ msgstr "" msgid "Your invitations have been sent" msgstr "" -#: web.py:252 +#: web.py:256 #, python-format msgid "%(member)s had been added" msgstr "" -#: web.py:264 +#: web.py:268 #, python-format msgid "%(name)s is part of this project again" msgstr "" -#: web.py:272 +#: web.py:276 #, python-format msgid "User '%(name)s' has been deactivated" msgstr "" -#: web.py:274 +#: web.py:278 #, python-format msgid "User '%(name)s' has been removed" msgstr "" -#: web.py:287 +#: web.py:295 msgid "The bill has been added" msgstr "" -#: web.py:302 +#: web.py:310 msgid "The bill has been deleted" msgstr "" -#: web.py:320 +#: web.py:328 msgid "The bill has been modified" msgstr "" -#: web.py:344 +#: web.py:352 msgid "The data from XX to XX has been archived" msgstr "" -#: templates/add_bill.html:23 templates/edit_bill.html:23 +#: templates/add_bill.html:4 templates/edit_bill.html:4 msgid "Back to the list" msgstr "" @@ -215,7 +215,7 @@ msgstr "" msgid "Create a new project" msgstr "" -#: templates/edit_bill.html:27 +#: templates/edit_bill.html:8 msgid "Edit a bill" msgstr "" @@ -239,10 +239,6 @@ msgstr "" msgid "Add a bill" msgstr "" -#: templates/forms.html:91 -msgid "Add a new user" -msgstr "" - #: templates/forms.html:99 msgid "Send the invitations" msgstr "" @@ -339,71 +335,71 @@ msgstr "" msgid "you can contribute and improve it!" msgstr "" -#: templates/list_bills.html:37 +#: templates/list_bills.html:43 msgid "you sure?" msgstr "" -#: templates/list_bills.html:56 +#: templates/list_bills.html:62 msgid "Balance" msgstr "" -#: templates/list_bills.html:67 templates/list_bills.html:99 +#: templates/list_bills.html:78 templates/list_bills.html:108 msgid "delete" msgstr "" -#: templates/list_bills.html:67 +#: templates/list_bills.html:78 msgid "reactivate" msgstr "" -#: templates/list_bills.html:80 +#: templates/list_bills.html:89 msgid "The project identifier is" msgstr "" -#: templates/list_bills.html:80 +#: templates/list_bills.html:89 msgid "remember it!" msgstr "" -#: templates/list_bills.html:81 +#: templates/list_bills.html:90 msgid "Add a new bill" msgstr "" -#: templates/list_bills.html:83 +#: templates/list_bills.html:92 msgid "hide this form" msgstr "" -#: templates/list_bills.html:89 +#: templates/list_bills.html:98 msgid "When?" msgstr "" -#: templates/list_bills.html:89 +#: templates/list_bills.html:98 msgid "Who paid?" msgstr "" -#: templates/list_bills.html:89 +#: templates/list_bills.html:98 msgid "For what?" msgstr "" -#: templates/list_bills.html:89 +#: templates/list_bills.html:98 msgid "How much?" msgstr "" -#: templates/list_bills.html:89 +#: templates/list_bills.html:98 msgid "Actions" msgstr "" -#: templates/list_bills.html:97 +#: templates/list_bills.html:106 msgid "each" msgstr "" -#: templates/list_bills.html:98 +#: templates/list_bills.html:107 msgid "edit" msgstr "" -#: templates/list_bills.html:106 +#: templates/list_bills.html:115 msgid "Nothing to list yet. You probably want to" msgstr "" -#: templates/list_bills.html:106 +#: templates/list_bills.html:115 msgid "add a bill" msgstr "" diff --git a/budget/static/bootstrap-1.0.0.min.css b/budget/static/bootstrap-1.0.0.min.css index 6b0b2183..aa3b75ab 100644 --- a/budget/static/bootstrap-1.0.0.min.css +++ b/budget/static/bootstrap-1.0.0.min.css @@ -44,7 +44,7 @@ body{margin:60px 0 0;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;fon div.container{width:940px;margin:0 auto;} div.container-fluid{padding:0 20px;zoom:1;}div.container-fluid:before,div.container-fluid:after{display:table;content:"";} div.container-fluid:after{clear:both;} -div.container-fluid div.sidebar{float:left;width:220px;} +div.container-fluid div.sidebar{float:left;} div.container-fluid div.content{min-width:700px;max-width:1180px;margin-left:240px;} a{color:#0069d6;text-decoration:none;line-height:inherit;}a:hover{color:#0050a3;text-decoration:underline;} .btn{display:inline-block;background-color:#e6e6e6;background-repeat:no-repeat;background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), color-stop(0.25, #ffffff), to(#e6e6e6));background-image:-webkit-linear-gradient(#ffffff, color-stop(0.25, #ffffff), #e6e6e6);background-image:-moz-linear-gradient(#ffffff, color-stop(#ffffff, 0.25), #e6e6e6);background-image:-ms-linear-gradient(#ffffff, color-stop(#ffffff, 0.25), #e6e6e6);background-image:-o-linear-gradient(#ffffff, color-stop(#ffffff, 0.25), #e6e6e6);background-image:linear-gradient(#ffffff, color-stop(#ffffff, 0.25), #e6e6e6);padding:4px 14px;text-shadow:0 1px 1px rgba(255, 255, 255, 0.75);color:#333333;font-size:13px;line-height:18px;border:1px solid rgba(0, 0, 0, 0.1);border-bottom-color:rgba(0, 0, 0, 0.25);-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.2),0 1px 2px rgba(0, 0, 0, 0.05);-moz-box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.2),0 1px 2px rgba(0, 0, 0, 0.05);box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.2),0 1px 2px rgba(0, 0, 0, 0.05);-webkit-transition:0.1s linear all;-moz-transition:0.1s linear all;transition:0.1s linear all;}.btn:hover{background-position:0 -15px;color:#333333;text-decoration:none;} @@ -82,7 +82,7 @@ address{display:block;line-height:18px;margin-bottom:18px;} code,pre{padding:0 3px 2px;font-family:Monaco, Andale Mono, Courier New, monospace;font-size:12px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;} code{background-color:#fee9cc;color:rgba(0, 0, 0, 0.75);padding:1px 3px;} pre{background-color:#f5f5f5;display:block;padding:17px;margin:0 0 18px;line-height:18px;font-size:12px;border:1px solid #ccc;border:1px solid rgba(0, 0, 0, 0.15);-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;white-space:pre-wrap;} -form{margin-bottom:18px;}form fieldset{margin-bottom:18px;padding-top:18px;}form fieldset legend{display:block;margin-left:150px;font-size:20px;line-height:1;color:#404040;} +form{margin-bottom:10px;}form fieldset{margin-bottom:18px;padding-top:18px;}form fieldset legend{display:block;margin-left:150px;font-size:20px;line-height:1;color:#404040;} form div.clearfix{margin-bottom:18px;} form label,form input,form select,form textarea{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px;font-weight:normal;line-height:normal;} form label{padding-top:6px;font-size:13px;line-height:18px;float:left;width:130px;text-align:right;color:#404040;} diff --git a/budget/static/main.css b/budget/static/main.css index 0dfffb84..79952950 100644 --- a/budget/static/main.css +++ b/budget/static/main.css @@ -19,7 +19,7 @@ div.topbar ul.secondary-nav { padding-right: 75px; } background-position: center bottom; background-repeat: no-repeat; height: 100%; - width: 220px; + width: 230px; padding-left: 10px; padding-right: 10px; padding-top: 10px; @@ -27,10 +27,12 @@ div.topbar ul.secondary-nav { padding-right: 75px; } margin-top: -10px; margin-right: 15px; color: black; - + position: fixed; } .sidebar h2 { text-align: center; } -.sidebar button { margin-top: 10px; float: right; } +.sidebar button { margin-top: 10px; width: 75px;} + +#table_overflow { overflow-y: auto; overflow-x: hidden; width: 235px; } .right h3 { float: right; } #bills { color: black; } @@ -104,6 +106,7 @@ div.topbar ul.secondary-nav { padding-right: 75px; } margin-top: 30px; position: fixed; bottom: 0px; + height: 20px; width: 100%; text-align: center; background-color: #fff; diff --git a/budget/templates/forms.html b/budget/templates/forms.html index 8c0cda37..0a06001d 100644 --- a/budget/templates/forms.html +++ b/budget/templates/forms.html @@ -87,8 +87,8 @@ {% macro add_member(form) %} {{ form.hidden_tag() }} - {{ form.name }} - + {{ form.name(style="width: 141px;") }} + {% endmacro %} diff --git a/budget/templates/list_bills.html b/budget/templates/list_bills.html index c8e7918e..c33a7e22 100644 --- a/budget/templates/list_bills.html +++ b/budget/templates/list_bills.html @@ -9,6 +9,11 @@ {% endblock %} {% block js %} + $(window).resize(function() { + $("#sidebar").height( window.innerHeight-40 ); + $("#table_overflow").height( $("#sidebar").height()-120 ); + }); + // display the form when clicking on the "add bill" button var show_form = function(){ $('#bill-form').show(70); @@ -53,9 +58,14 @@ {% endblock %} {% block sidebar %} - + {% endblock %} diff --git a/budget/translations/fr/LC_MESSAGES/messages.mo b/budget/translations/fr/LC_MESSAGES/messages.mo index 625bc5d2de25ed2ac11b7aba29bb3810203fee56..e08d5d651b7c315a31cbd8598839705fd49dafa1 100644 GIT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tO9SuNLe$<=xsIDqGmoNDxEmGVBx>U4QSUXQ0^C5IjaFBGhX>-! zzM>|)hryMZChUSOQ3~4Y+o(W~QGwc#%RX~c3KQw1dVf?uKla9Pu3nCuJDZCIxCE7v zdiOkr%18@xSsS;`Gxxz2x)4>F$V5#bi<<)aQGtqGeLiZds*qz~A?GGkW_F@dT#w4c zaa3lmVGiCz1%82keg7XRsH4ZxB}+C9$KX8FZ&4lU^V^LYs1XaW33V2ppaOnE_4|%G z6B*1}6Zg2OJ^{6$>COe%SKt3C3OXd)Q3Et~J}|q26RF?BZRq2n_PP!=(ZlHB8PxkX zQG5FwmHMBk75kZ`tUy+5Yw!b}!0E)dy=;s=zxy~E-=IFHEWSO)uo6_t7NAzL67`uz zQ2iQ_MOzCh6OT}5Eu%T|X%Hg&}ciq*mDWx=qktPO7b_nE4Z^}%qnFCi~6B|k5a@8t&y3j(9^ x1I;CAb#WzLWNpx^s$5\n" "Language-Team: fr \n" @@ -85,7 +85,7 @@ msgstr "Payeur" msgid "Amount payed" msgstr "Montant" -#: forms.py:106 templates/list_bills.html:89 +#: forms.py:106 templates/list_bills.html:98 msgid "For whom?" msgstr "Pour qui ?" @@ -101,9 +101,9 @@ msgstr "Le montant d'une facture ne peut pas être négatif" msgid "Name" msgstr "Nom" -#: forms.py:138 -msgid "Add a member" -msgstr "Ajouter un membre" +#: forms.py:138 templates/forms.html:91 +msgid "Add" +msgstr "Ajouter" #: forms.py:148 msgid "This project already have this member" @@ -161,43 +161,43 @@ msgstr "Vous avez été invité à partager vos dépenses pour %(project)s" msgid "Your invitations have been sent" msgstr "Vos invitations ont bien été envoyées" -#: web.py:252 +#: web.py:256 #, python-format msgid "%(member)s had been added" msgstr "%(member)s a bien été ajouté" -#: web.py:264 +#: web.py:268 #, python-format msgid "%(name)s is part of this project again" msgstr "%(name)s a rejoint le projet" -#: web.py:272 +#: web.py:276 #, python-format msgid "User '%(name)s' has been deactivated" msgstr "Le membre '%(name)s' a été désactivé" -#: web.py:274 +#: web.py:278 #, python-format msgid "User '%(name)s' has been removed" msgstr "Le membre '%(name)s' a été supprimé" -#: web.py:287 +#: web.py:295 msgid "The bill has been added" msgstr "La facture a bien été ajoutée" -#: web.py:302 +#: web.py:310 msgid "The bill has been deleted" msgstr "La facture a été supprimée" -#: web.py:320 +#: web.py:328 msgid "The bill has been modified" msgstr "La facture a été modifiée" -#: web.py:344 +#: web.py:352 msgid "The data from XX to XX has been archived" msgstr "Les données de XX à XX ont été archivées" -#: templates/add_bill.html:23 templates/edit_bill.html:23 +#: templates/add_bill.html:4 templates/edit_bill.html:4 msgid "Back to the list" msgstr "Retourner à la liste" @@ -219,7 +219,7 @@ msgstr " ?" msgid "Create a new project" msgstr "Créer un nouveau projet" -#: templates/edit_bill.html:27 +#: templates/edit_bill.html:8 msgid "Edit a bill" msgstr "Éditer une facture" @@ -243,10 +243,6 @@ msgstr "Éditer cette facture" msgid "Add a bill" msgstr "Ajouter une facture" -#: templates/forms.html:91 -msgid "Add a new user" -msgstr "Ajouter un membre" - #: templates/forms.html:99 msgid "Send the invitations" msgstr "Envoyer les invitations" @@ -343,71 +339,71 @@ msgstr "Ceci est un logiciel libre" msgid "you can contribute and improve it!" msgstr "vous pouvez y contribuer et l'améliorer" -#: templates/list_bills.html:37 +#: templates/list_bills.html:43 msgid "you sure?" msgstr "c'est sûr ?" -#: templates/list_bills.html:56 +#: templates/list_bills.html:62 msgid "Balance" msgstr "Balance" -#: templates/list_bills.html:67 templates/list_bills.html:99 +#: templates/list_bills.html:78 templates/list_bills.html:108 msgid "delete" msgstr "supprimer" -#: templates/list_bills.html:67 +#: templates/list_bills.html:78 msgid "reactivate" msgstr "ré-activer" -#: templates/list_bills.html:80 +#: templates/list_bills.html:89 msgid "The project identifier is" msgstr "L'identifiant de ce projet est" -#: templates/list_bills.html:80 +#: templates/list_bills.html:89 msgid "remember it!" msgstr "souvenez vous en !" -#: templates/list_bills.html:81 +#: templates/list_bills.html:90 msgid "Add a new bill" msgstr "Nouvelle facture" -#: templates/list_bills.html:83 +#: templates/list_bills.html:92 msgid "hide this form" msgstr "cacher ce formulaire" -#: templates/list_bills.html:89 +#: templates/list_bills.html:98 msgid "When?" msgstr "Quand ?" -#: templates/list_bills.html:89 +#: templates/list_bills.html:98 msgid "Who paid?" msgstr "Qui a payé ?" -#: templates/list_bills.html:89 +#: templates/list_bills.html:98 msgid "For what?" msgstr "Pour quoi ?" -#: templates/list_bills.html:89 +#: templates/list_bills.html:98 msgid "How much?" msgstr "Combien ?" -#: templates/list_bills.html:89 +#: templates/list_bills.html:98 msgid "Actions" msgstr "Actions" -#: templates/list_bills.html:97 +#: templates/list_bills.html:106 msgid "each" msgstr "chacun" -#: templates/list_bills.html:98 +#: templates/list_bills.html:107 msgid "edit" msgstr "éditer" -#: templates/list_bills.html:106 +#: templates/list_bills.html:115 msgid "Nothing to list yet. You probably want to" msgstr "Rien à lister pour l'instant. Vous voulez surement" -#: templates/list_bills.html:106 +#: templates/list_bills.html:115 msgid "add a bill" msgstr "ajouter une facture" @@ -453,3 +449,9 @@ msgstr "sauter cette étape" msgid "and notify them yourself" msgstr "et les notifier vous même" +#~ msgid "Add a member" +#~ msgstr "Ajouter un membre" + +#~ msgid "Add a new user" +#~ msgstr "Ajouter un membre" +