├── asert ├── admin │ ├── css │ │ ├── autocomplete.css │ │ ├── base.css │ │ ├── changelists.css │ │ ├── dashboard.css │ │ ├── fonts.css │ │ ├── forms.css │ │ ├── login.css │ │ ├── nav_sidebar.css │ │ ├── responsive.css │ │ ├── responsive_rtl.css │ │ ├── rtl.css │ │ ├── vendor │ │ │ └── select2 │ │ │ │ ├── LICENSE-SELECT2.md │ │ │ │ ├── select2.css │ │ │ │ └── select2.min.css │ │ └── widgets.css │ ├── fonts │ │ ├── LICENSE.txt │ │ ├── README.txt │ │ ├── Roboto-Bold-webfont.woff │ │ ├── Roboto-Light-webfont.woff │ │ └── Roboto-Regular-webfont.woff │ ├── img │ │ ├── LICENSE │ │ ├── README.txt │ │ ├── calendar-icons.svg │ │ ├── gis │ │ │ ├── move_vertex_off.svg │ │ │ └── move_vertex_on.svg │ │ ├── icon-addlink.svg │ │ ├── icon-alert.svg │ │ ├── icon-calendar.svg │ │ ├── icon-changelink.svg │ │ ├── icon-clock.svg │ │ ├── icon-deletelink.svg │ │ ├── icon-no.svg │ │ ├── icon-unknown-alt.svg │ │ ├── icon-unknown.svg │ │ ├── icon-viewlink.svg │ │ ├── icon-yes.svg │ │ ├── inline-delete.svg │ │ ├── search.svg │ │ ├── selector-icons.svg │ │ ├── sorting-icons.svg │ │ ├── tooltag-add.svg │ │ └── tooltag-arrowright.svg │ └── js │ │ ├── SelectBox.js │ │ ├── SelectFilter2.js │ │ ├── actions.js │ │ ├── actions.min.js │ │ ├── admin │ │ ├── DateTimeShortcuts.js │ │ └── RelatedObjectLookups.js │ │ ├── autocomplete.js │ │ ├── calendar.js │ │ ├── cancel.js │ │ ├── change_form.js │ │ ├── collapse.js │ │ ├── collapse.min.js │ │ ├── core.js │ │ ├── inlines.js │ │ ├── inlines.min.js │ │ ├── jquery.init.js │ │ ├── nav_sidebar.js │ │ ├── popup_response.js │ │ ├── prepopulate.js │ │ ├── prepopulate.min.js │ │ ├── prepopulate_init.js │ │ ├── urlify.js │ │ └── vendor │ │ ├── jquery │ │ ├── LICENSE.txt │ │ ├── jquery.js │ │ └── jquery.min.js │ │ ├── select2 │ │ ├── LICENSE.md │ │ ├── i18n │ │ │ ├── af.js │ │ │ ├── ar.js │ │ │ ├── az.js │ │ │ ├── bg.js │ │ │ ├── bn.js │ │ │ ├── bs.js │ │ │ ├── ca.js │ │ │ ├── cs.js │ │ │ ├── da.js │ │ │ ├── de.js │ │ │ ├── dsb.js │ │ │ ├── el.js │ │ │ ├── en.js │ │ │ ├── es.js │ │ │ ├── et.js │ │ │ ├── eu.js │ │ │ ├── fa.js │ │ │ ├── fi.js │ │ │ ├── fr.js │ │ │ ├── gl.js │ │ │ ├── he.js │ │ │ ├── hi.js │ │ │ ├── hr.js │ │ │ ├── hsb.js │ │ │ ├── hu.js │ │ │ ├── hy.js │ │ │ ├── id.js │ │ │ ├── is.js │ │ │ ├── it.js │ │ │ ├── ja.js │ │ │ ├── ka.js │ │ │ ├── km.js │ │ │ ├── ko.js │ │ │ ├── lt.js │ │ │ ├── lv.js │ │ │ ├── mk.js │ │ │ ├── ms.js │ │ │ ├── nb.js │ │ │ ├── ne.js │ │ │ ├── nl.js │ │ │ ├── pl.js │ │ │ ├── ps.js │ │ │ ├── pt-BR.js │ │ │ ├── pt.js │ │ │ ├── ro.js │ │ │ ├── ru.js │ │ │ ├── sk.js │ │ │ ├── sl.js │ │ │ ├── sq.js │ │ │ ├── sr-Cyrl.js │ │ │ ├── sr.js │ │ │ ├── sv.js │ │ │ ├── th.js │ │ │ ├── tk.js │ │ │ ├── tr.js │ │ │ ├── uk.js │ │ │ ├── vi.js │ │ │ ├── zh-CN.js │ │ │ └── zh-TW.js │ │ ├── select2.full.js │ │ └── select2.full.min.js │ │ └── xregexp │ │ ├── LICENSE.txt │ │ ├── xregexp.js │ │ └── xregexp.min.js └── style.css ├── dashboard ├── __init__.py ├── __pycache__ │ ├── __init__.cpython-39.pyc │ ├── admin.cpython-39.pyc │ ├── apps.cpython-39.pyc │ ├── decorators.cpython-39.pyc │ ├── forms.cpython-39.pyc │ ├── models.cpython-39.pyc │ ├── urls.cpython-39.pyc │ └── views.cpython-39.pyc ├── admin.py ├── apps.py ├── decorators.py ├── filter.py ├── forms.py ├── migrations │ ├── 0001_initial.py │ ├── 0002_order_order_quantity.py │ ├── 0003_remove_product_price.py │ ├── 0004_auto_20210320_1908.py │ ├── __init__.py │ └── __pycache__ │ │ ├── 0001_initial.cpython-39.pyc │ │ ├── 0002_order_order_quantity.cpython-39.pyc │ │ ├── 0003_remove_product_price.cpython-39.pyc │ │ ├── 0004_auto_20210320_1908.cpython-39.pyc │ │ └── __init__.cpython-39.pyc ├── models.py ├── tests.py ├── urls.py └── views.py ├── db.sqlite3 ├── db.sqlite3-journal ├── inventoryproject ├── __init__.py ├── __pycache__ │ ├── __init__.cpython-39.pyc │ ├── settings.cpython-39.pyc │ ├── urls.cpython-39.pyc │ └── wsgi.cpython-39.pyc ├── asgi.py ├── settings.py ├── urls.py └── wsgi.py ├── manage.py ├── media ├── default.png └── profile_images │ ├── KBT.png │ ├── pro.jpg │ ├── pro_RgZ9xZj.jpg │ ├── profile-img1.jpg │ ├── profile-img2.jpg │ ├── profile.png │ ├── profile_5TOhE0J.png │ └── profile_tqghBQl.png ├── static └── style.css ├── templates ├── dashboard │ ├── customer_index.html │ ├── customers.html │ ├── customers_detail.html │ ├── index.html │ ├── order.html │ ├── products.html │ ├── products_delete.html │ ├── products_detail.html │ └── products_edit.html ├── partials │ ├── base.html │ ├── nav.html │ └── topside.html └── user │ ├── login.html │ ├── logout.html │ ├── profile.html │ ├── profile_update.html │ └── register.html └── user ├── __init__.py ├── __pycache__ ├── __init__.cpython-39.pyc ├── admin.cpython-39.pyc ├── apps.cpython-39.pyc ├── forms.cpython-39.pyc ├── models.cpython-39.pyc ├── signals.cpython-39.pyc └── views.cpython-39.pyc ├── admin.py ├── apps.py ├── forms.py ├── migrations ├── 0001_initial.py ├── __init__.py └── __pycache__ │ ├── 0001_initial.cpython-39.pyc │ └── __init__.cpython-39.pyc ├── models.py ├── signals.py ├── tests.py └── views.py /asert/admin/css/changelists.css: -------------------------------------------------------------------------------- 1 | /* CHANGELISTS */ 2 | 3 | #changelist { 4 | display: flex; 5 | align-items: flex-start; 6 | justify-content: space-between; 7 | } 8 | 9 | #changelist .changelist-form-container { 10 | flex: 1 1 auto; 11 | min-width: 0; 12 | } 13 | 14 | #changelist table { 15 | width: 100%; 16 | } 17 | 18 | .change-list .hiddenfields { display:none; } 19 | 20 | .change-list .filtered table { 21 | border-right: none; 22 | } 23 | 24 | .change-list .filtered { 25 | min-height: 400px; 26 | } 27 | 28 | .change-list .filtered .results, .change-list .filtered .paginator, 29 | .filtered #toolbar, .filtered div.xfull { 30 | width: auto; 31 | } 32 | 33 | .change-list .filtered table tbody th { 34 | padding-right: 1em; 35 | } 36 | 37 | #changelist-form .results { 38 | overflow-x: auto; 39 | width: 100%; 40 | } 41 | 42 | #changelist .toplinks { 43 | border-bottom: 1px solid #ddd; 44 | } 45 | 46 | #changelist .paginator { 47 | color: #666; 48 | border-bottom: 1px solid #eee; 49 | background: #fff; 50 | overflow: hidden; 51 | } 52 | 53 | /* CHANGELIST TABLES */ 54 | 55 | #changelist table thead th { 56 | padding: 0; 57 | white-space: nowrap; 58 | vertical-align: middle; 59 | } 60 | 61 | #changelist table thead th.action-checkbox-column { 62 | width: 1.5em; 63 | text-align: center; 64 | } 65 | 66 | #changelist table tbody td.action-checkbox { 67 | text-align: center; 68 | } 69 | 70 | #changelist table tfoot { 71 | color: #666; 72 | } 73 | 74 | /* TOOLBAR */ 75 | 76 | #toolbar { 77 | padding: 8px 10px; 78 | margin-bottom: 15px; 79 | border-top: 1px solid #eee; 80 | border-bottom: 1px solid #eee; 81 | background: #f8f8f8; 82 | color: #666; 83 | } 84 | 85 | #toolbar form input { 86 | border-radius: 4px; 87 | font-size: 14px; 88 | padding: 5px; 89 | color: #333; 90 | } 91 | 92 | #toolbar #searchbar { 93 | height: 19px; 94 | border: 1px solid #ccc; 95 | padding: 2px 5px; 96 | margin: 0; 97 | vertical-align: top; 98 | font-size: 13px; 99 | max-width: 100%; 100 | } 101 | 102 | #toolbar #searchbar:focus { 103 | border-color: #999; 104 | } 105 | 106 | #toolbar form input[type="submit"] { 107 | border: 1px solid #ccc; 108 | font-size: 13px; 109 | padding: 4px 8px; 110 | margin: 0; 111 | vertical-align: middle; 112 | background: #fff; 113 | box-shadow: 0 -15px 20px -10px rgba(0, 0, 0, 0.15) inset; 114 | cursor: pointer; 115 | color: #333; 116 | } 117 | 118 | #toolbar form input[type="submit"]:focus, 119 | #toolbar form input[type="submit"]:hover { 120 | border-color: #999; 121 | } 122 | 123 | #changelist-search img { 124 | vertical-align: middle; 125 | margin-right: 4px; 126 | } 127 | 128 | /* FILTER COLUMN */ 129 | 130 | #changelist-filter { 131 | flex: 0 0 240px; 132 | order: 1; 133 | width: 240px; 134 | background: #f8f8f8; 135 | border-left: none; 136 | margin: 0 0 0 30px; 137 | } 138 | 139 | #changelist-filter h2 { 140 | font-size: 14px; 141 | text-transform: uppercase; 142 | letter-spacing: 0.5px; 143 | padding: 5px 15px; 144 | margin-bottom: 12px; 145 | border-bottom: none; 146 | } 147 | 148 | #changelist-filter h3 { 149 | font-weight: 400; 150 | font-size: 14px; 151 | padding: 0 15px; 152 | margin-bottom: 10px; 153 | } 154 | 155 | #changelist-filter ul { 156 | margin: 5px 0; 157 | padding: 0 15px 15px; 158 | border-bottom: 1px solid #eaeaea; 159 | } 160 | 161 | #changelist-filter ul:last-child { 162 | border-bottom: none; 163 | } 164 | 165 | #changelist-filter li { 166 | list-style-type: none; 167 | margin-left: 0; 168 | padding-left: 0; 169 | } 170 | 171 | #changelist-filter a { 172 | display: block; 173 | color: #999; 174 | text-overflow: ellipsis; 175 | overflow-x: hidden; 176 | } 177 | 178 | #changelist-filter li.selected { 179 | border-left: 5px solid #eaeaea; 180 | padding-left: 10px; 181 | margin-left: -15px; 182 | } 183 | 184 | #changelist-filter li.selected a { 185 | color: #5b80b2; 186 | } 187 | 188 | #changelist-filter a:focus, #changelist-filter a:hover, 189 | #changelist-filter li.selected a:focus, 190 | #changelist-filter li.selected a:hover { 191 | color: #036; 192 | } 193 | 194 | #changelist-filter #changelist-filter-clear a { 195 | font-size: 13px; 196 | padding-bottom: 10px; 197 | border-bottom: 1px solid #eaeaea; 198 | } 199 | 200 | /* DATE DRILLDOWN */ 201 | 202 | .change-list ul.toplinks { 203 | display: block; 204 | float: left; 205 | padding: 0; 206 | margin: 0; 207 | width: 100%; 208 | } 209 | 210 | .change-list ul.toplinks li { 211 | padding: 3px 6px; 212 | font-weight: bold; 213 | list-style-type: none; 214 | display: inline-block; 215 | } 216 | 217 | .change-list ul.toplinks .date-back a { 218 | color: #999; 219 | } 220 | 221 | .change-list ul.toplinks .date-back a:focus, 222 | .change-list ul.toplinks .date-back a:hover { 223 | color: #036; 224 | } 225 | 226 | /* PAGINATOR */ 227 | 228 | .paginator { 229 | font-size: 13px; 230 | padding-top: 10px; 231 | padding-bottom: 10px; 232 | line-height: 22px; 233 | margin: 0; 234 | border-top: 1px solid #ddd; 235 | width: 100%; 236 | } 237 | 238 | .paginator a:link, .paginator a:visited { 239 | padding: 2px 6px; 240 | background: #79aec8; 241 | text-decoration: none; 242 | color: #fff; 243 | } 244 | 245 | .paginator a.showall { 246 | border: none; 247 | background: none; 248 | color: #5b80b2; 249 | } 250 | 251 | .paginator a.showall:focus, .paginator a.showall:hover { 252 | background: none; 253 | color: #036; 254 | } 255 | 256 | .paginator .end { 257 | margin-right: 6px; 258 | } 259 | 260 | .paginator .this-page { 261 | padding: 2px 6px; 262 | font-weight: bold; 263 | font-size: 13px; 264 | vertical-align: top; 265 | } 266 | 267 | .paginator a:focus, .paginator a:hover { 268 | color: white; 269 | background: #036; 270 | } 271 | 272 | /* ACTIONS */ 273 | 274 | .filtered .actions { 275 | border-right: none; 276 | } 277 | 278 | #changelist table input { 279 | margin: 0; 280 | vertical-align: baseline; 281 | } 282 | 283 | #changelist table tbody tr.selected { 284 | background-color: #FFFFCC; 285 | } 286 | 287 | #changelist .actions { 288 | padding: 10px; 289 | background: #fff; 290 | border-top: none; 291 | border-bottom: none; 292 | line-height: 24px; 293 | color: #999; 294 | width: 100%; 295 | } 296 | 297 | #changelist .actions.selected { 298 | background: #fffccf; 299 | border-top: 1px solid #fffee8; 300 | border-bottom: 1px solid #edecd6; 301 | } 302 | 303 | #changelist .actions span.all, 304 | #changelist .actions span.action-counter, 305 | #changelist .actions span.clear, 306 | #changelist .actions span.question { 307 | font-size: 13px; 308 | margin: 0 0.5em; 309 | display: none; 310 | } 311 | 312 | #changelist .actions:last-child { 313 | border-bottom: none; 314 | } 315 | 316 | #changelist .actions select { 317 | vertical-align: top; 318 | height: 24px; 319 | background: none; 320 | color: #000; 321 | border: 1px solid #ccc; 322 | border-radius: 4px; 323 | font-size: 14px; 324 | padding: 0 0 0 4px; 325 | margin: 0; 326 | margin-left: 10px; 327 | } 328 | 329 | #changelist .actions select:focus { 330 | border-color: #999; 331 | } 332 | 333 | #changelist .actions label { 334 | display: inline-block; 335 | vertical-align: middle; 336 | font-size: 13px; 337 | } 338 | 339 | #changelist .actions .button { 340 | font-size: 13px; 341 | border: 1px solid #ccc; 342 | border-radius: 4px; 343 | background: #fff; 344 | box-shadow: 0 -15px 20px -10px rgba(0, 0, 0, 0.15) inset; 345 | cursor: pointer; 346 | height: 24px; 347 | line-height: 1; 348 | padding: 4px 8px; 349 | margin: 0; 350 | color: #333; 351 | } 352 | 353 | #changelist .actions .button:focus, #changelist .actions .button:hover { 354 | border-color: #999; 355 | } 356 | -------------------------------------------------------------------------------- /asert/admin/css/dashboard.css: -------------------------------------------------------------------------------- 1 | /* DASHBOARD */ 2 | 3 | .dashboard .module table th { 4 | width: 100%; 5 | } 6 | 7 | .dashboard .module table td { 8 | white-space: nowrap; 9 | } 10 | 11 | .dashboard .module table td a { 12 | display: block; 13 | padding-right: .6em; 14 | } 15 | 16 | /* RECENT ACTIONS MODULE */ 17 | 18 | .module ul.actionlist { 19 | margin-left: 0; 20 | } 21 | 22 | ul.actionlist li { 23 | list-style-type: none; 24 | overflow: hidden; 25 | text-overflow: ellipsis; 26 | } 27 | -------------------------------------------------------------------------------- /asert/admin/css/fonts.css: -------------------------------------------------------------------------------- 1 | @font-face { 2 | font-family: 'Roboto'; 3 | src: url('../fonts/Roboto-Bold-webfont.woff'); 4 | font-weight: 700; 5 | font-style: normal; 6 | } 7 | 8 | @font-face { 9 | font-family: 'Roboto'; 10 | src: url('../fonts/Roboto-Regular-webfont.woff'); 11 | font-weight: 400; 12 | font-style: normal; 13 | } 14 | 15 | @font-face { 16 | font-family: 'Roboto'; 17 | src: url('../fonts/Roboto-Light-webfont.woff'); 18 | font-weight: 300; 19 | font-style: normal; 20 | } 21 | -------------------------------------------------------------------------------- /asert/admin/css/login.css: -------------------------------------------------------------------------------- 1 | /* LOGIN FORM */ 2 | 3 | .login { 4 | background: #f8f8f8; 5 | height: auto; 6 | } 7 | 8 | .login #header { 9 | height: auto; 10 | padding: 15px 16px; 11 | justify-content: center; 12 | } 13 | 14 | .login #header h1 { 15 | font-size: 18px; 16 | } 17 | 18 | .login #header h1 a { 19 | color: #fff; 20 | } 21 | 22 | .login #content { 23 | padding: 20px 20px 0; 24 | } 25 | 26 | .login #container { 27 | background: #fff; 28 | border: 1px solid #eaeaea; 29 | border-radius: 4px; 30 | overflow: hidden; 31 | width: 28em; 32 | min-width: 300px; 33 | margin: 100px auto; 34 | height: auto; 35 | } 36 | 37 | .login #content-main { 38 | width: 100%; 39 | } 40 | 41 | .login .form-row { 42 | padding: 4px 0; 43 | float: left; 44 | width: 100%; 45 | border-bottom: none; 46 | } 47 | 48 | .login .form-row label { 49 | padding-right: 0.5em; 50 | line-height: 2em; 51 | font-size: 1em; 52 | clear: both; 53 | color: #333; 54 | } 55 | 56 | .login .form-row #id_username, .login .form-row #id_password { 57 | clear: both; 58 | padding: 8px; 59 | width: 100%; 60 | box-sizing: border-box; 61 | } 62 | 63 | .login span.help { 64 | font-size: 10px; 65 | display: block; 66 | } 67 | 68 | .login .submit-row { 69 | clear: both; 70 | padding: 1em 0 0 9.4em; 71 | margin: 0; 72 | border: none; 73 | background: none; 74 | text-align: left; 75 | } 76 | 77 | .login .password-reset-link { 78 | text-align: center; 79 | } 80 | -------------------------------------------------------------------------------- /asert/admin/css/nav_sidebar.css: -------------------------------------------------------------------------------- 1 | .sticky { 2 | position: sticky; 3 | top: 0; 4 | max-height: 100vh; 5 | } 6 | 7 | .toggle-nav-sidebar { 8 | z-index: 20; 9 | left: 0; 10 | display: flex; 11 | align-items: center; 12 | justify-content: center; 13 | flex: 0 0 23px; 14 | width: 23px; 15 | border-right: 1px solid #eaeaea; 16 | background-color: #ffffff; 17 | cursor: pointer; 18 | font-size: 20px; 19 | color: #447e9b; 20 | padding: 0; 21 | } 22 | 23 | [dir="rtl"] .toggle-nav-sidebar { 24 | border-left: 1px solid #eaeaea; 25 | border-right: 0; 26 | } 27 | 28 | .toggle-nav-sidebar:hover, 29 | .toggle-nav-sidebar:focus { 30 | background-color: #f6f6f6; 31 | } 32 | 33 | #nav-sidebar { 34 | z-index: 15; 35 | flex: 0 0 275px; 36 | left: -276px; 37 | margin-left: -276px; 38 | border-top: 1px solid transparent; 39 | border-right: 1px solid #eaeaea; 40 | background-color: #ffffff; 41 | overflow: auto; 42 | } 43 | 44 | [dir="rtl"] #nav-sidebar { 45 | border-left: 1px solid #eaeaea; 46 | border-right: 0; 47 | left: 0; 48 | margin-left: 0; 49 | right: -276px; 50 | margin-right: -276px; 51 | } 52 | 53 | .toggle-nav-sidebar::before { 54 | content: '\00BB'; 55 | } 56 | 57 | .main.shifted .toggle-nav-sidebar::before { 58 | content: '\00AB'; 59 | } 60 | 61 | .main.shifted > #nav-sidebar { 62 | left: 24px; 63 | margin-left: 0; 64 | } 65 | 66 | [dir="rtl"] .main.shifted > #nav-sidebar { 67 | left: 0; 68 | right: 24px; 69 | margin-right: 0; 70 | } 71 | 72 | #nav-sidebar .module th { 73 | width: 100%; 74 | overflow-wrap: anywhere; 75 | } 76 | 77 | #nav-sidebar .module th, 78 | #nav-sidebar .module caption { 79 | padding-left: 16px; 80 | } 81 | 82 | #nav-sidebar .module td { 83 | white-space: nowrap; 84 | } 85 | 86 | [dir="rtl"] #nav-sidebar .module th, 87 | [dir="rtl"] #nav-sidebar .module caption { 88 | padding-left: 8px; 89 | padding-right: 16px; 90 | } 91 | 92 | #nav-sidebar .current-app .section:link, 93 | #nav-sidebar .current-app .section:visited { 94 | color: #ffc; 95 | font-weight: bold; 96 | } 97 | 98 | #nav-sidebar .current-model { 99 | background: #ffc; 100 | } 101 | 102 | .main > #nav-sidebar + .content { 103 | max-width: calc(100% - 23px); 104 | } 105 | 106 | .main.shifted > #nav-sidebar + .content { 107 | max-width: calc(100% - 299px); 108 | } 109 | 110 | @media (max-width: 767px) { 111 | #nav-sidebar, #toggle-nav-sidebar { 112 | display: none; 113 | } 114 | 115 | .main > #nav-sidebar + .content, 116 | .main.shifted > #nav-sidebar + .content { 117 | max-width: 100%; 118 | } 119 | } 120 | -------------------------------------------------------------------------------- /asert/admin/css/responsive_rtl.css: -------------------------------------------------------------------------------- 1 | /* TABLETS */ 2 | 3 | @media (max-width: 1024px) { 4 | [dir="rtl"] .colMS { 5 | margin-right: 0; 6 | } 7 | 8 | [dir="rtl"] #user-tools { 9 | text-align: right; 10 | } 11 | 12 | [dir="rtl"] #changelist .actions label { 13 | padding-left: 10px; 14 | padding-right: 0; 15 | } 16 | 17 | [dir="rtl"] #changelist .actions select { 18 | margin-left: 0; 19 | margin-right: 15px; 20 | } 21 | 22 | [dir="rtl"] .change-list .filtered .results, 23 | [dir="rtl"] .change-list .filtered .paginator, 24 | [dir="rtl"] .filtered #toolbar, 25 | [dir="rtl"] .filtered div.xfull, 26 | [dir="rtl"] .filtered .actions, 27 | [dir="rtl"] #changelist-filter { 28 | margin-left: 0; 29 | } 30 | 31 | [dir="rtl"] .inline-group ul.tools a.add, 32 | [dir="rtl"] .inline-group div.add-row a, 33 | [dir="rtl"] .inline-group .tabular tr.add-row td a { 34 | padding: 8px 26px 8px 10px; 35 | background-position: calc(100% - 8px) 9px; 36 | } 37 | 38 | [dir="rtl"] .related-widget-wrapper-link + .selector { 39 | margin-right: 0; 40 | margin-left: 15px; 41 | } 42 | 43 | [dir="rtl"] .selector .selector-filter label { 44 | margin-right: 0; 45 | margin-left: 8px; 46 | } 47 | 48 | [dir="rtl"] .object-tools li { 49 | float: right; 50 | } 51 | 52 | [dir="rtl"] .object-tools li + li { 53 | margin-left: 0; 54 | margin-right: 15px; 55 | } 56 | 57 | [dir="rtl"] .dashboard .module table td a { 58 | padding-left: 0; 59 | padding-right: 16px; 60 | } 61 | } 62 | 63 | /* MOBILE */ 64 | 65 | @media (max-width: 767px) { 66 | [dir="rtl"] .aligned .related-lookup, 67 | [dir="rtl"] .aligned .datetimeshortcuts { 68 | margin-left: 0; 69 | margin-right: 15px; 70 | } 71 | 72 | [dir="rtl"] .aligned ul { 73 | margin-right: 0; 74 | } 75 | 76 | [dir="rtl"] #changelist-filter { 77 | margin-left: 0; 78 | margin-right: 0; 79 | } 80 | } 81 | -------------------------------------------------------------------------------- /asert/admin/css/rtl.css: -------------------------------------------------------------------------------- 1 | body { 2 | direction: rtl; 3 | } 4 | 5 | /* LOGIN */ 6 | 7 | .login .form-row { 8 | float: right; 9 | } 10 | 11 | .login .form-row label { 12 | float: right; 13 | padding-left: 0.5em; 14 | padding-right: 0; 15 | text-align: left; 16 | } 17 | 18 | .login .submit-row { 19 | clear: both; 20 | padding: 1em 9.4em 0 0; 21 | } 22 | 23 | /* GLOBAL */ 24 | 25 | th { 26 | text-align: right; 27 | } 28 | 29 | .module h2, .module caption { 30 | text-align: right; 31 | } 32 | 33 | .module ul, .module ol { 34 | margin-left: 0; 35 | margin-right: 1.5em; 36 | } 37 | 38 | .viewlink, .addlink, .changelink { 39 | padding-left: 0; 40 | padding-right: 16px; 41 | background-position: 100% 1px; 42 | } 43 | 44 | .deletelink { 45 | padding-left: 0; 46 | padding-right: 16px; 47 | background-position: 100% 1px; 48 | } 49 | 50 | .object-tools { 51 | float: left; 52 | } 53 | 54 | thead th:first-child, 55 | tfoot td:first-child { 56 | border-left: none; 57 | } 58 | 59 | /* LAYOUT */ 60 | 61 | #user-tools { 62 | right: auto; 63 | left: 0; 64 | text-align: left; 65 | } 66 | 67 | div.breadcrumbs { 68 | text-align: right; 69 | } 70 | 71 | #content-main { 72 | float: right; 73 | } 74 | 75 | #content-related { 76 | float: left; 77 | margin-left: -300px; 78 | margin-right: auto; 79 | } 80 | 81 | .colMS { 82 | margin-left: 300px; 83 | margin-right: 0; 84 | } 85 | 86 | /* SORTABLE TABLES */ 87 | 88 | table thead th.sorted .sortoptions { 89 | float: left; 90 | } 91 | 92 | thead th.sorted .text { 93 | padding-right: 0; 94 | padding-left: 42px; 95 | } 96 | 97 | /* dashboard styles */ 98 | 99 | .dashboard .module table td a { 100 | padding-left: .6em; 101 | padding-right: 16px; 102 | } 103 | 104 | /* changelists styles */ 105 | 106 | .change-list .filtered table { 107 | border-left: none; 108 | border-right: 0px none; 109 | } 110 | 111 | #changelist-filter { 112 | border-left: none; 113 | border-right: none; 114 | margin-left: 0; 115 | margin-right: 30px; 116 | } 117 | 118 | #changelist-filter li.selected { 119 | border-left: none; 120 | padding-left: 10px; 121 | margin-left: 0; 122 | border-right: 5px solid #eaeaea; 123 | padding-right: 10px; 124 | margin-right: -15px; 125 | } 126 | 127 | #changelist table tbody td:first-child, #changelist table tbody th:first-child { 128 | border-right: none; 129 | border-left: none; 130 | } 131 | 132 | /* FORMS */ 133 | 134 | .aligned label { 135 | padding: 0 0 3px 1em; 136 | float: right; 137 | } 138 | 139 | .submit-row { 140 | text-align: left 141 | } 142 | 143 | .submit-row p.deletelink-box { 144 | float: right; 145 | } 146 | 147 | .submit-row input.default { 148 | margin-left: 0; 149 | } 150 | 151 | .vDateField, .vTimeField { 152 | margin-left: 2px; 153 | } 154 | 155 | .aligned .form-row input { 156 | margin-left: 5px; 157 | } 158 | 159 | form .aligned p.help, form .aligned div.help { 160 | clear: right; 161 | } 162 | 163 | form .aligned ul { 164 | margin-right: 163px; 165 | margin-left: 0; 166 | } 167 | 168 | form ul.inline li { 169 | float: right; 170 | padding-right: 0; 171 | padding-left: 7px; 172 | } 173 | 174 | input[type=submit].default, .submit-row input.default { 175 | float: left; 176 | } 177 | 178 | fieldset .fieldBox { 179 | float: right; 180 | margin-left: 20px; 181 | margin-right: 0; 182 | } 183 | 184 | .errorlist li { 185 | background-position: 100% 12px; 186 | padding: 0; 187 | } 188 | 189 | .errornote { 190 | background-position: 100% 12px; 191 | padding: 10px 12px; 192 | } 193 | 194 | /* WIDGETS */ 195 | 196 | .calendarnav-previous { 197 | top: 0; 198 | left: auto; 199 | right: 10px; 200 | } 201 | 202 | .calendarnav-next { 203 | top: 0; 204 | right: auto; 205 | left: 10px; 206 | } 207 | 208 | .calendar caption, .calendarbox h2 { 209 | text-align: center; 210 | } 211 | 212 | .selector { 213 | float: right; 214 | } 215 | 216 | .selector .selector-filter { 217 | text-align: right; 218 | } 219 | 220 | .inline-deletelink { 221 | float: left; 222 | } 223 | 224 | form .form-row p.datetime { 225 | overflow: hidden; 226 | } 227 | 228 | .related-widget-wrapper { 229 | float: right; 230 | } 231 | 232 | /* MISC */ 233 | 234 | .inline-related h2, .inline-group h2 { 235 | text-align: right 236 | } 237 | 238 | .inline-related h3 span.delete { 239 | padding-right: 20px; 240 | padding-left: inherit; 241 | left: 10px; 242 | right: inherit; 243 | float:left; 244 | } 245 | 246 | .inline-related h3 span.delete label { 247 | margin-left: inherit; 248 | margin-right: 2px; 249 | } 250 | -------------------------------------------------------------------------------- /asert/admin/css/vendor/select2/LICENSE-SELECT2.md: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2012-2017 Kevin Brown, Igor Vaynberg, and Select2 contributors 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /asert/admin/fonts/README.txt: -------------------------------------------------------------------------------- 1 | Roboto webfont source: https://www.google.com/fonts/specimen/Roboto 2 | WOFF files extracted using https://github.com/majodev/google-webfonts-helper 3 | Weights used in this project: Light (300), Regular (400), Bold (700) 4 | -------------------------------------------------------------------------------- /asert/admin/fonts/Roboto-Bold-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KenBroTech/Django-Inventory-Management-System/f43bfb6439fa6103fd5d4d0e6e4073a386e82e53/asert/admin/fonts/Roboto-Bold-webfont.woff -------------------------------------------------------------------------------- /asert/admin/fonts/Roboto-Light-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KenBroTech/Django-Inventory-Management-System/f43bfb6439fa6103fd5d4d0e6e4073a386e82e53/asert/admin/fonts/Roboto-Light-webfont.woff -------------------------------------------------------------------------------- /asert/admin/fonts/Roboto-Regular-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KenBroTech/Django-Inventory-Management-System/f43bfb6439fa6103fd5d4d0e6e4073a386e82e53/asert/admin/fonts/Roboto-Regular-webfont.woff -------------------------------------------------------------------------------- /asert/admin/img/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 Code Charm Ltd 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of 6 | this software and associated documentation files (the "Software"), to deal in 7 | the Software without restriction, including without limitation the rights to 8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 9 | the Software, and to permit persons to whom the Software is furnished to do so, 10 | subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 18 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /asert/admin/img/README.txt: -------------------------------------------------------------------------------- 1 | All icons are taken from Font Awesome (http://fontawesome.io/) project. 2 | The Font Awesome font is licensed under the SIL OFL 1.1: 3 | - https://scripts.sil.org/OFL 4 | 5 | SVG icons source: https://github.com/encharm/Font-Awesome-SVG-PNG 6 | Font-Awesome-SVG-PNG is licensed under the MIT license (see file license 7 | in current folder). 8 | -------------------------------------------------------------------------------- /asert/admin/img/calendar-icons.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /asert/admin/img/gis/move_vertex_off.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /asert/admin/img/gis/move_vertex_on.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /asert/admin/img/icon-addlink.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /asert/admin/img/icon-alert.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /asert/admin/img/icon-calendar.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /asert/admin/img/icon-changelink.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /asert/admin/img/icon-clock.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /asert/admin/img/icon-deletelink.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /asert/admin/img/icon-no.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /asert/admin/img/icon-unknown-alt.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /asert/admin/img/icon-unknown.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /asert/admin/img/icon-viewlink.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /asert/admin/img/icon-yes.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /asert/admin/img/inline-delete.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /asert/admin/img/search.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /asert/admin/img/selector-icons.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /asert/admin/img/sorting-icons.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /asert/admin/img/tooltag-add.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /asert/admin/img/tooltag-arrowright.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /asert/admin/js/SelectBox.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | { 3 | const SelectBox = { 4 | cache: {}, 5 | init: function(id) { 6 | const box = document.getElementById(id); 7 | SelectBox.cache[id] = []; 8 | const cache = SelectBox.cache[id]; 9 | for (const node of box.options) { 10 | cache.push({value: node.value, text: node.text, displayed: 1}); 11 | } 12 | }, 13 | redisplay: function(id) { 14 | // Repopulate HTML select box from cache 15 | const box = document.getElementById(id); 16 | box.innerHTML = ''; 17 | for (const node of SelectBox.cache[id]) { 18 | if (node.displayed) { 19 | const new_option = new Option(node.text, node.value, false, false); 20 | // Shows a tooltip when hovering over the option 21 | new_option.title = node.text; 22 | box.appendChild(new_option); 23 | } 24 | } 25 | }, 26 | filter: function(id, text) { 27 | // Redisplay the HTML select box, displaying only the choices containing ALL 28 | // the words in text. (It's an AND search.) 29 | const tokens = text.toLowerCase().split(/\s+/); 30 | for (const node of SelectBox.cache[id]) { 31 | node.displayed = 1; 32 | const node_text = node.text.toLowerCase(); 33 | for (const token of tokens) { 34 | if (node_text.indexOf(token) === -1) { 35 | node.displayed = 0; 36 | break; // Once the first token isn't found we're done 37 | } 38 | } 39 | } 40 | SelectBox.redisplay(id); 41 | }, 42 | delete_from_cache: function(id, value) { 43 | let delete_index = null; 44 | const cache = SelectBox.cache[id]; 45 | for (const [i, node] of cache.entries()) { 46 | if (node.value === value) { 47 | delete_index = i; 48 | break; 49 | } 50 | } 51 | cache.splice(delete_index, 1); 52 | }, 53 | add_to_cache: function(id, option) { 54 | SelectBox.cache[id].push({value: option.value, text: option.text, displayed: 1}); 55 | }, 56 | cache_contains: function(id, value) { 57 | // Check if an item is contained in the cache 58 | for (const node of SelectBox.cache[id]) { 59 | if (node.value === value) { 60 | return true; 61 | } 62 | } 63 | return false; 64 | }, 65 | move: function(from, to) { 66 | const from_box = document.getElementById(from); 67 | for (const option of from_box.options) { 68 | const option_value = option.value; 69 | if (option.selected && SelectBox.cache_contains(from, option_value)) { 70 | SelectBox.add_to_cache(to, {value: option_value, text: option.text, displayed: 1}); 71 | SelectBox.delete_from_cache(from, option_value); 72 | } 73 | } 74 | SelectBox.redisplay(from); 75 | SelectBox.redisplay(to); 76 | }, 77 | move_all: function(from, to) { 78 | const from_box = document.getElementById(from); 79 | for (const option of from_box.options) { 80 | const option_value = option.value; 81 | if (SelectBox.cache_contains(from, option_value)) { 82 | SelectBox.add_to_cache(to, {value: option_value, text: option.text, displayed: 1}); 83 | SelectBox.delete_from_cache(from, option_value); 84 | } 85 | } 86 | SelectBox.redisplay(from); 87 | SelectBox.redisplay(to); 88 | }, 89 | sort: function(id) { 90 | SelectBox.cache[id].sort(function(a, b) { 91 | a = a.text.toLowerCase(); 92 | b = b.text.toLowerCase(); 93 | if (a > b) { 94 | return 1; 95 | } 96 | if (a < b) { 97 | return -1; 98 | } 99 | return 0; 100 | } ); 101 | }, 102 | select_all: function(id) { 103 | const box = document.getElementById(id); 104 | for (const option of box.options) { 105 | option.selected = true; 106 | } 107 | } 108 | }; 109 | window.SelectBox = SelectBox; 110 | } 111 | -------------------------------------------------------------------------------- /asert/admin/js/actions.js: -------------------------------------------------------------------------------- 1 | /*global gettext, interpolate, ngettext*/ 2 | 'use strict'; 3 | { 4 | const $ = django.jQuery; 5 | let lastChecked; 6 | 7 | $.fn.actions = function(opts) { 8 | const options = $.extend({}, $.fn.actions.defaults, opts); 9 | const actionCheckboxes = $(this); 10 | let list_editable_changed = false; 11 | const showQuestion = function() { 12 | $(options.acrossClears).hide(); 13 | $(options.acrossQuestions).show(); 14 | $(options.allContainer).hide(); 15 | }, 16 | showClear = function() { 17 | $(options.acrossClears).show(); 18 | $(options.acrossQuestions).hide(); 19 | $(options.actionContainer).toggleClass(options.selectedClass); 20 | $(options.allContainer).show(); 21 | $(options.counterContainer).hide(); 22 | }, 23 | reset = function() { 24 | $(options.acrossClears).hide(); 25 | $(options.acrossQuestions).hide(); 26 | $(options.allContainer).hide(); 27 | $(options.counterContainer).show(); 28 | }, 29 | clearAcross = function() { 30 | reset(); 31 | $(options.acrossInput).val(0); 32 | $(options.actionContainer).removeClass(options.selectedClass); 33 | }, 34 | checker = function(checked) { 35 | if (checked) { 36 | showQuestion(); 37 | } else { 38 | reset(); 39 | } 40 | $(actionCheckboxes).prop("checked", checked) 41 | .parent().parent().toggleClass(options.selectedClass, checked); 42 | }, 43 | updateCounter = function() { 44 | const sel = $(actionCheckboxes).filter(":checked").length; 45 | // data-actions-icnt is defined in the generated HTML 46 | // and contains the total amount of objects in the queryset 47 | const actions_icnt = $('.action-counter').data('actionsIcnt'); 48 | $(options.counterContainer).html(interpolate( 49 | ngettext('%(sel)s of %(cnt)s selected', '%(sel)s of %(cnt)s selected', sel), { 50 | sel: sel, 51 | cnt: actions_icnt 52 | }, true)); 53 | $(options.allToggle).prop("checked", function() { 54 | let value; 55 | if (sel === actionCheckboxes.length) { 56 | value = true; 57 | showQuestion(); 58 | } else { 59 | value = false; 60 | clearAcross(); 61 | } 62 | return value; 63 | }); 64 | }; 65 | // Show counter by default 66 | $(options.counterContainer).show(); 67 | // Check state of checkboxes and reinit state if needed 68 | $(this).filter(":checked").each(function(i) { 69 | $(this).parent().parent().toggleClass(options.selectedClass); 70 | updateCounter(); 71 | if ($(options.acrossInput).val() === 1) { 72 | showClear(); 73 | } 74 | }); 75 | $(options.allToggle).show().on('click', function() { 76 | checker($(this).prop("checked")); 77 | updateCounter(); 78 | }); 79 | $("a", options.acrossQuestions).on('click', function(event) { 80 | event.preventDefault(); 81 | $(options.acrossInput).val(1); 82 | showClear(); 83 | }); 84 | $("a", options.acrossClears).on('click', function(event) { 85 | event.preventDefault(); 86 | $(options.allToggle).prop("checked", false); 87 | clearAcross(); 88 | checker(0); 89 | updateCounter(); 90 | }); 91 | lastChecked = null; 92 | $(actionCheckboxes).on('click', function(event) { 93 | if (!event) { event = window.event; } 94 | const target = event.target ? event.target : event.srcElement; 95 | if (lastChecked && $.data(lastChecked) !== $.data(target) && event.shiftKey === true) { 96 | let inrange = false; 97 | $(lastChecked).prop("checked", target.checked) 98 | .parent().parent().toggleClass(options.selectedClass, target.checked); 99 | $(actionCheckboxes).each(function() { 100 | if ($.data(this) === $.data(lastChecked) || $.data(this) === $.data(target)) { 101 | inrange = (inrange) ? false : true; 102 | } 103 | if (inrange) { 104 | $(this).prop("checked", target.checked) 105 | .parent().parent().toggleClass(options.selectedClass, target.checked); 106 | } 107 | }); 108 | } 109 | $(target).parent().parent().toggleClass(options.selectedClass, target.checked); 110 | lastChecked = target; 111 | updateCounter(); 112 | }); 113 | $('form#changelist-form table#result_list tr').on('change', 'td:gt(0) :input', function() { 114 | list_editable_changed = true; 115 | }); 116 | $('form#changelist-form button[name="index"]').on('click', function(event) { 117 | if (list_editable_changed) { 118 | return confirm(gettext("You have unsaved changes on individual editable fields. If you run an action, your unsaved changes will be lost.")); 119 | } 120 | }); 121 | $('form#changelist-form input[name="_save"]').on('click', function(event) { 122 | let action_changed = false; 123 | $('select option:selected', options.actionContainer).each(function() { 124 | if ($(this).val()) { 125 | action_changed = true; 126 | } 127 | }); 128 | if (action_changed) { 129 | if (list_editable_changed) { 130 | return confirm(gettext("You have selected an action, but you haven’t saved your changes to individual fields yet. Please click OK to save. You’ll need to re-run the action.")); 131 | } else { 132 | return confirm(gettext("You have selected an action, and you haven’t made any changes on individual fields. You’re probably looking for the Go button rather than the Save button.")); 133 | } 134 | } 135 | }); 136 | }; 137 | /* Setup plugin defaults */ 138 | $.fn.actions.defaults = { 139 | actionContainer: "div.actions", 140 | counterContainer: "span.action-counter", 141 | allContainer: "div.actions span.all", 142 | acrossInput: "div.actions input.select-across", 143 | acrossQuestions: "div.actions span.question", 144 | acrossClears: "div.actions span.clear", 145 | allToggle: "#action-toggle", 146 | selectedClass: "selected" 147 | }; 148 | $(document).ready(function() { 149 | const $actionsEls = $('tr input.action-select'); 150 | if ($actionsEls.length > 0) { 151 | $actionsEls.actions(); 152 | } 153 | }); 154 | } 155 | -------------------------------------------------------------------------------- /asert/admin/js/actions.min.js: -------------------------------------------------------------------------------- 1 | 'use strict';{const a=django.jQuery;let e;a.fn.actions=function(g){const b=a.extend({},a.fn.actions.defaults,g),f=a(this);let k=!1;const l=function(){a(b.acrossClears).hide();a(b.acrossQuestions).show();a(b.allContainer).hide()},m=function(){a(b.acrossClears).show();a(b.acrossQuestions).hide();a(b.actionContainer).toggleClass(b.selectedClass);a(b.allContainer).show();a(b.counterContainer).hide()},n=function(){a(b.acrossClears).hide();a(b.acrossQuestions).hide();a(b.allContainer).hide();a(b.counterContainer).show()}, 2 | p=function(){n();a(b.acrossInput).val(0);a(b.actionContainer).removeClass(b.selectedClass)},q=function(c){c?l():n();a(f).prop("checked",c).parent().parent().toggleClass(b.selectedClass,c)},h=function(){const c=a(f).filter(":checked").length,d=a(".action-counter").data("actionsIcnt");a(b.counterContainer).html(interpolate(ngettext("%(sel)s of %(cnt)s selected","%(sel)s of %(cnt)s selected",c),{sel:c,cnt:d},!0));a(b.allToggle).prop("checked",function(){let a;c===f.length?(a=!0,l()):(a=!1,p());return a})}; 3 | a(b.counterContainer).show();a(this).filter(":checked").each(function(c){a(this).parent().parent().toggleClass(b.selectedClass);h();1===a(b.acrossInput).val()&&m()});a(b.allToggle).show().on("click",function(){q(a(this).prop("checked"));h()});a("a",b.acrossQuestions).on("click",function(c){c.preventDefault();a(b.acrossInput).val(1);m()});a("a",b.acrossClears).on("click",function(c){c.preventDefault();a(b.allToggle).prop("checked",!1);p();q(0);h()});e=null;a(f).on("click",function(c){c||(c=window.event); 4 | const d=c.target?c.target:c.srcElement;if(e&&a.data(e)!==a.data(d)&&!0===c.shiftKey){let c=!1;a(e).prop("checked",d.checked).parent().parent().toggleClass(b.selectedClass,d.checked);a(f).each(function(){if(a.data(this)===a.data(e)||a.data(this)===a.data(d))c=c?!1:!0;c&&a(this).prop("checked",d.checked).parent().parent().toggleClass(b.selectedClass,d.checked)})}a(d).parent().parent().toggleClass(b.selectedClass,d.checked);e=d;h()});a("form#changelist-form table#result_list tr").on("change","td:gt(0) :input", 5 | function(){k=!0});a('form#changelist-form button[name="index"]').on("click",function(a){if(k)return confirm(gettext("You have unsaved changes on individual editable fields. If you run an action, your unsaved changes will be lost."))});a('form#changelist-form input[name="_save"]').on("click",function(c){let d=!1;a("select option:selected",b.actionContainer).each(function(){a(this).val()&&(d=!0)});if(d)return k?confirm(gettext("You have selected an action, but you haven\u2019t saved your changes to individual fields yet. Please click OK to save. You\u2019ll need to re-run the action.")): 6 | confirm(gettext("You have selected an action, and you haven\u2019t made any changes on individual fields. You\u2019re probably looking for the Go button rather than the Save button."))})};a.fn.actions.defaults={actionContainer:"div.actions",counterContainer:"span.action-counter",allContainer:"div.actions span.all",acrossInput:"div.actions input.select-across",acrossQuestions:"div.actions span.question",acrossClears:"div.actions span.clear",allToggle:"#action-toggle",selectedClass:"selected"};a(document).ready(function(){const g= 7 | a("tr input.action-select");0= 12) ? 'PM' : 'AM', 104 | S: this.getTwoDigitSecond(), 105 | w: '0' + this.getDay(), 106 | x: this.toLocaleDateString(), 107 | X: this.toLocaleTimeString(), 108 | y: ('' + this.getFullYear()).substr(2, 4), 109 | Y: '' + this.getFullYear(), 110 | '%': '%' 111 | }; 112 | let result = '', i = 0; 113 | while (i < format.length) { 114 | if (format.charAt(i) === '%') { 115 | result = result + fields[format.charAt(i + 1)]; 116 | ++i; 117 | } 118 | else { 119 | result = result + format.charAt(i); 120 | } 121 | ++i; 122 | } 123 | return result; 124 | }; 125 | 126 | // ---------------------------------------------------------------------------- 127 | // String object extensions 128 | // ---------------------------------------------------------------------------- 129 | String.prototype.strptime = function(format) { 130 | const split_format = format.split(/[.\-/]/); 131 | const date = this.split(/[.\-/]/); 132 | let i = 0; 133 | let day, month, year; 134 | while (i < split_format.length) { 135 | switch (split_format[i]) { 136 | case "%d": 137 | day = date[i]; 138 | break; 139 | case "%m": 140 | month = date[i] - 1; 141 | break; 142 | case "%Y": 143 | year = date[i]; 144 | break; 145 | case "%y": 146 | // A %y value in the range of [00, 68] is in the current 147 | // century, while [69, 99] is in the previous century, 148 | // according to the Open Group Specification. 149 | if (parseInt(date[i], 10) >= 69) { 150 | year = date[i]; 151 | } else { 152 | year = (new Date(Date.UTC(date[i], 0))).getUTCFullYear() + 100; 153 | } 154 | break; 155 | } 156 | ++i; 157 | } 158 | // Create Date object from UTC since the parsed value is supposed to be 159 | // in UTC, not local time. Also, the calendar uses UTC functions for 160 | // date extraction. 161 | return new Date(Date.UTC(year, month, day)); 162 | }; 163 | } 164 | -------------------------------------------------------------------------------- /asert/admin/js/inlines.min.js: -------------------------------------------------------------------------------- 1 | 'use strict';{const b=django.jQuery;b.fn.formset=function(c){const a=b.extend({},b.fn.formset.defaults,c),e=b(this),l=e.parent(),m=function(a,d,h){const g=new RegExp("("+d+"-(\\d+|__prefix__))");d=d+"-"+h;b(a).prop("for")&&b(a).prop("for",b(a).prop("for").replace(g,d));a.id&&(a.id=a.id.replace(g,d));a.name&&(a.name=a.name.replace(g,d))},f=b("#id_"+a.prefix+"-TOTAL_FORMS").prop("autocomplete","off");let n=parseInt(f.val(),10);const h=b("#id_"+a.prefix+"-MAX_NUM_FORMS").prop("autocomplete","off"),q= 2 | b("#id_"+a.prefix+"-MIN_NUM_FORMS").prop("autocomplete","off");let k;const t=function(g){g.preventDefault();g=b("#"+a.prefix+"-empty");const d=g.clone(!0);d.removeClass(a.emptyCssClass).addClass(a.formCssClass).attr("id",a.prefix+"-"+n);r(d);d.find("*").each(function(){m(this,a.prefix,f.val())});d.insertBefore(b(g));b(f).val(parseInt(f.val(),10)+1);n+=1;""!==h.val()&&0>=h.val()-f.val()&&k.parent().hide();p(d.closest(".inline-group"));a.added&&a.added(d);b(document).trigger("formset:added",[d,a.prefix])}, 3 | r=function(b){b.is("tr")?b.children(":last").append('
'+a.deleteText+"
"):b.is("ul")||b.is("ol")?b.append('
  • '+a.deleteText+"
  • "):b.children(":first").append(''+a.deleteText+"");b.find("a."+a.deleteCssClass).on("click",u.bind(this))},u=function(g){g.preventDefault();var d=b(g.target).closest("."+a.formCssClass);g=d.closest(".inline-group"); 4 | var f=d.prev();f.length&&f.hasClass("row-form-errors")&&f.remove();d.remove();--n;a.removed&&a.removed(d);b(document).trigger("formset:removed",[d,a.prefix]);d=b("."+a.formCssClass);b("#id_"+a.prefix+"-TOTAL_FORMS").val(d.length);(""===h.val()||0'+a.addText+"");k=l.find("tr:last a")}else e.filter(":last").after('"), 6 | k=e.filter(":last").next().find("a");k.on("click",t)})();c=""===h.val()||0 tr.form-row",b(c).tabularFormset(c,a.options)}})})}; 12 | -------------------------------------------------------------------------------- /asert/admin/js/jquery.init.js: -------------------------------------------------------------------------------- 1 | /*global jQuery:false*/ 2 | 'use strict'; 3 | /* Puts the included jQuery into our own namespace using noConflict and passing 4 | * it 'true'. This ensures that the included jQuery doesn't pollute the global 5 | * namespace (i.e. this preserves pre-existing values for both window.$ and 6 | * window.jQuery). 7 | */ 8 | window.django = {jQuery: jQuery.noConflict(true)}; 9 | -------------------------------------------------------------------------------- /asert/admin/js/nav_sidebar.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | { 3 | const toggleNavSidebar = document.getElementById('toggle-nav-sidebar'); 4 | if (toggleNavSidebar !== null) { 5 | const navLinks = document.querySelectorAll('#nav-sidebar a'); 6 | function disableNavLinkTabbing() { 7 | for (const navLink of navLinks) { 8 | navLink.tabIndex = -1; 9 | } 10 | } 11 | function enableNavLinkTabbing() { 12 | for (const navLink of navLinks) { 13 | navLink.tabIndex = 0; 14 | } 15 | } 16 | 17 | const main = document.getElementById('main'); 18 | let navSidebarIsOpen = localStorage.getItem('django.admin.navSidebarIsOpen'); 19 | if (navSidebarIsOpen === null) { 20 | navSidebarIsOpen = 'true'; 21 | } 22 | if (navSidebarIsOpen === 'false') { 23 | disableNavLinkTabbing(); 24 | } 25 | main.classList.toggle('shifted', navSidebarIsOpen === 'true'); 26 | 27 | toggleNavSidebar.addEventListener('click', function() { 28 | if (navSidebarIsOpen === 'true') { 29 | navSidebarIsOpen = 'false'; 30 | disableNavLinkTabbing(); 31 | } else { 32 | navSidebarIsOpen = 'true'; 33 | enableNavLinkTabbing(); 34 | } 35 | localStorage.setItem('django.admin.navSidebarIsOpen', navSidebarIsOpen); 36 | main.classList.toggle('shifted'); 37 | }); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /asert/admin/js/popup_response.js: -------------------------------------------------------------------------------- 1 | /*global opener */ 2 | 'use strict'; 3 | { 4 | const initData = JSON.parse(document.getElementById('django-admin-popup-response-constants').dataset.popupResponse); 5 | switch(initData.action) { 6 | case 'change': 7 | opener.dismissChangeRelatedObjectPopup(window, initData.value, initData.obj, initData.new_value); 8 | break; 9 | case 'delete': 10 | opener.dismissDeleteRelatedObjectPopup(window, initData.value); 11 | break; 12 | default: 13 | opener.dismissAddRelatedObjectPopup(window, initData.value, initData.obj); 14 | break; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /asert/admin/js/prepopulate.js: -------------------------------------------------------------------------------- 1 | /*global URLify*/ 2 | 'use strict'; 3 | { 4 | const $ = django.jQuery; 5 | $.fn.prepopulate = function(dependencies, maxLength, allowUnicode) { 6 | /* 7 | Depends on urlify.js 8 | Populates a selected field with the values of the dependent fields, 9 | URLifies and shortens the string. 10 | dependencies - array of dependent fields ids 11 | maxLength - maximum length of the URLify'd string 12 | allowUnicode - Unicode support of the URLify'd string 13 | */ 14 | return this.each(function() { 15 | const prepopulatedField = $(this); 16 | 17 | const populate = function() { 18 | // Bail if the field's value has been changed by the user 19 | if (prepopulatedField.data('_changed')) { 20 | return; 21 | } 22 | 23 | const values = []; 24 | $.each(dependencies, function(i, field) { 25 | field = $(field); 26 | if (field.val().length > 0) { 27 | values.push(field.val()); 28 | } 29 | }); 30 | prepopulatedField.val(URLify(values.join(' '), maxLength, allowUnicode)); 31 | }; 32 | 33 | prepopulatedField.data('_changed', false); 34 | prepopulatedField.on('change', function() { 35 | prepopulatedField.data('_changed', true); 36 | }); 37 | 38 | if (!prepopulatedField.val()) { 39 | $(dependencies.join(',')).on('keyup change focus', populate); 40 | } 41 | }); 42 | }; 43 | } 44 | -------------------------------------------------------------------------------- /asert/admin/js/prepopulate.min.js: -------------------------------------------------------------------------------- 1 | 'use strict';{const b=django.jQuery;b.fn.prepopulate=function(d,f,g){return this.each(function(){const a=b(this),h=function(){if(!a.data("_changed")){var e=[];b.each(d,function(a,c){c=b(c);01&&(u+="a"),u},inputTooShort:function(n){var e=n.minimum-n.input.length,u="Моля въведете още "+e+" символ";return e>1&&(u+="a"),u},loadingMore:function(){return"Зареждат се още…"},maximumSelected:function(n){var e="Можете да направите до "+n.maximum+" ";return n.maximum>1?e+="избора":e+="избор",e},noResults:function(){return"Няма намерени съвпадения"},searching:function(){return"Търсене…"},removeAllItems:function(){return"Премахнете всички елементи"}}}),n.define,n.require}(); -------------------------------------------------------------------------------- /asert/admin/js/vendor/select2/i18n/bn.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/bn",[],function(){return{errorLoading:function(){return"ফলাফলগুলি লোড করা যায়নি।"},inputTooLong:function(n){var e=n.input.length-n.maximum,u="অনুগ্রহ করে "+e+" টি অক্ষর মুছে দিন।";return 1!=e&&(u="অনুগ্রহ করে "+e+" টি অক্ষর মুছে দিন।"),u},inputTooShort:function(n){return n.minimum-n.input.length+" টি অক্ষর অথবা অধিক অক্ষর লিখুন।"},loadingMore:function(){return"আরো ফলাফল লোড হচ্ছে ..."},maximumSelected:function(n){var e=n.maximum+" টি আইটেম নির্বাচন করতে পারবেন।";return 1!=n.maximum&&(e=n.maximum+" টি আইটেম নির্বাচন করতে পারবেন।"),e},noResults:function(){return"কোন ফলাফল পাওয়া যায়নি।"},searching:function(){return"অনুসন্ধান করা হচ্ছে ..."}}}),n.define,n.require}(); -------------------------------------------------------------------------------- /asert/admin/js/vendor/select2/i18n/bs.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/bs",[],function(){function e(e,n,r,t){return e%10==1&&e%100!=11?n:e%10>=2&&e%10<=4&&(e%100<12||e%100>14)?r:t}return{errorLoading:function(){return"Preuzimanje nije uspijelo."},inputTooLong:function(n){var r=n.input.length-n.maximum,t="Obrišite "+r+" simbol";return t+=e(r,"","a","a")},inputTooShort:function(n){var r=n.minimum-n.input.length,t="Ukucajte bar još "+r+" simbol";return t+=e(r,"","a","a")},loadingMore:function(){return"Preuzimanje još rezultata…"},maximumSelected:function(n){var r="Možete izabrati samo "+n.maximum+" stavk";return r+=e(n.maximum,"u","e","i")},noResults:function(){return"Ništa nije pronađeno"},searching:function(){return"Pretraga…"},removeAllItems:function(){return"Uklonite sve stavke"}}}),e.define,e.require}(); -------------------------------------------------------------------------------- /asert/admin/js/vendor/select2/i18n/ca.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/ca",[],function(){return{errorLoading:function(){return"La càrrega ha fallat"},inputTooLong:function(e){var n=e.input.length-e.maximum,r="Si us plau, elimina "+n+" car";return r+=1==n?"àcter":"àcters"},inputTooShort:function(e){var n=e.minimum-e.input.length,r="Si us plau, introdueix "+n+" car";return r+=1==n?"àcter":"àcters"},loadingMore:function(){return"Carregant més resultats…"},maximumSelected:function(e){var n="Només es pot seleccionar "+e.maximum+" element";return 1!=e.maximum&&(n+="s"),n},noResults:function(){return"No s'han trobat resultats"},searching:function(){return"Cercant…"},removeAllItems:function(){return"Treu tots els elements"}}}),e.define,e.require}(); -------------------------------------------------------------------------------- /asert/admin/js/vendor/select2/i18n/cs.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/cs",[],function(){function e(e,n){switch(e){case 2:return n?"dva":"dvě";case 3:return"tři";case 4:return"čtyři"}return""}return{errorLoading:function(){return"Výsledky nemohly být načteny."},inputTooLong:function(n){var t=n.input.length-n.maximum;return 1==t?"Prosím, zadejte o jeden znak méně.":t<=4?"Prosím, zadejte o "+e(t,!0)+" znaky méně.":"Prosím, zadejte o "+t+" znaků méně."},inputTooShort:function(n){var t=n.minimum-n.input.length;return 1==t?"Prosím, zadejte ještě jeden znak.":t<=4?"Prosím, zadejte ještě další "+e(t,!0)+" znaky.":"Prosím, zadejte ještě dalších "+t+" znaků."},loadingMore:function(){return"Načítají se další výsledky…"},maximumSelected:function(n){var t=n.maximum;return 1==t?"Můžete zvolit jen jednu položku.":t<=4?"Můžete zvolit maximálně "+e(t,!1)+" položky.":"Můžete zvolit maximálně "+t+" položek."},noResults:function(){return"Nenalezeny žádné položky."},searching:function(){return"Vyhledávání…"},removeAllItems:function(){return"Odstraňte všechny položky"}}}),e.define,e.require}(); -------------------------------------------------------------------------------- /asert/admin/js/vendor/select2/i18n/da.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/da",[],function(){return{errorLoading:function(){return"Resultaterne kunne ikke indlæses."},inputTooLong:function(e){return"Angiv venligst "+(e.input.length-e.maximum)+" tegn mindre"},inputTooShort:function(e){return"Angiv venligst "+(e.minimum-e.input.length)+" tegn mere"},loadingMore:function(){return"Indlæser flere resultater…"},maximumSelected:function(e){var n="Du kan kun vælge "+e.maximum+" emne";return 1!=e.maximum&&(n+="r"),n},noResults:function(){return"Ingen resultater fundet"},searching:function(){return"Søger…"},removeAllItems:function(){return"Fjern alle elementer"}}}),e.define,e.require}(); -------------------------------------------------------------------------------- /asert/admin/js/vendor/select2/i18n/de.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/de",[],function(){return{errorLoading:function(){return"Die Ergebnisse konnten nicht geladen werden."},inputTooLong:function(e){return"Bitte "+(e.input.length-e.maximum)+" Zeichen weniger eingeben"},inputTooShort:function(e){return"Bitte "+(e.minimum-e.input.length)+" Zeichen mehr eingeben"},loadingMore:function(){return"Lade mehr Ergebnisse…"},maximumSelected:function(e){var n="Sie können nur "+e.maximum+" Element";return 1!=e.maximum&&(n+="e"),n+=" auswählen"},noResults:function(){return"Keine Übereinstimmungen gefunden"},searching:function(){return"Suche…"},removeAllItems:function(){return"Entferne alle Elemente"}}}),e.define,e.require}(); -------------------------------------------------------------------------------- /asert/admin/js/vendor/select2/i18n/dsb.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/dsb",[],function(){var n=["znamuško","znamušce","znamuška","znamuškow"],e=["zapisk","zapiska","zapiski","zapiskow"],u=function(n,e){return 1===n?e[0]:2===n?e[1]:n>2&&n<=4?e[2]:n>=5?e[3]:void 0};return{errorLoading:function(){return"Wuslědki njejsu se dali zacytaś."},inputTooLong:function(e){var a=e.input.length-e.maximum;return"Pšosym lašuj "+a+" "+u(a,n)},inputTooShort:function(e){var a=e.minimum-e.input.length;return"Pšosym zapódaj nanejmjenjej "+a+" "+u(a,n)},loadingMore:function(){return"Dalšne wuslědki se zacytaju…"},maximumSelected:function(n){return"Móžoš jano "+n.maximum+" "+u(n.maximum,e)+"wubraś."},noResults:function(){return"Žedne wuslědki namakane"},searching:function(){return"Pyta se…"},removeAllItems:function(){return"Remove all items"}}}),n.define,n.require}(); -------------------------------------------------------------------------------- /asert/admin/js/vendor/select2/i18n/el.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/el",[],function(){return{errorLoading:function(){return"Τα αποτελέσματα δεν μπόρεσαν να φορτώσουν."},inputTooLong:function(n){var e=n.input.length-n.maximum,u="Παρακαλώ διαγράψτε "+e+" χαρακτήρ";return 1==e&&(u+="α"),1!=e&&(u+="ες"),u},inputTooShort:function(n){return"Παρακαλώ συμπληρώστε "+(n.minimum-n.input.length)+" ή περισσότερους χαρακτήρες"},loadingMore:function(){return"Φόρτωση περισσότερων αποτελεσμάτων…"},maximumSelected:function(n){var e="Μπορείτε να επιλέξετε μόνο "+n.maximum+" επιλογ";return 1==n.maximum&&(e+="ή"),1!=n.maximum&&(e+="ές"),e},noResults:function(){return"Δεν βρέθηκαν αποτελέσματα"},searching:function(){return"Αναζήτηση…"},removeAllItems:function(){return"Καταργήστε όλα τα στοιχεία"}}}),n.define,n.require}(); -------------------------------------------------------------------------------- /asert/admin/js/vendor/select2/i18n/en.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/en",[],function(){return{errorLoading:function(){return"The results could not be loaded."},inputTooLong:function(e){var n=e.input.length-e.maximum,r="Please delete "+n+" character";return 1!=n&&(r+="s"),r},inputTooShort:function(e){return"Please enter "+(e.minimum-e.input.length)+" or more characters"},loadingMore:function(){return"Loading more results…"},maximumSelected:function(e){var n="You can only select "+e.maximum+" item";return 1!=e.maximum&&(n+="s"),n},noResults:function(){return"No results found"},searching:function(){return"Searching…"},removeAllItems:function(){return"Remove all items"}}}),e.define,e.require}(); -------------------------------------------------------------------------------- /asert/admin/js/vendor/select2/i18n/es.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/es",[],function(){return{errorLoading:function(){return"No se pudieron cargar los resultados"},inputTooLong:function(e){var n=e.input.length-e.maximum,r="Por favor, elimine "+n+" car";return r+=1==n?"ácter":"acteres"},inputTooShort:function(e){var n=e.minimum-e.input.length,r="Por favor, introduzca "+n+" car";return r+=1==n?"ácter":"acteres"},loadingMore:function(){return"Cargando más resultados…"},maximumSelected:function(e){var n="Sólo puede seleccionar "+e.maximum+" elemento";return 1!=e.maximum&&(n+="s"),n},noResults:function(){return"No se encontraron resultados"},searching:function(){return"Buscando…"},removeAllItems:function(){return"Eliminar todos los elementos"}}}),e.define,e.require}(); -------------------------------------------------------------------------------- /asert/admin/js/vendor/select2/i18n/et.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/et",[],function(){return{inputTooLong:function(e){var n=e.input.length-e.maximum,t="Sisesta "+n+" täht";return 1!=n&&(t+="e"),t+=" vähem"},inputTooShort:function(e){var n=e.minimum-e.input.length,t="Sisesta "+n+" täht";return 1!=n&&(t+="e"),t+=" rohkem"},loadingMore:function(){return"Laen tulemusi…"},maximumSelected:function(e){var n="Saad vaid "+e.maximum+" tulemus";return 1==e.maximum?n+="e":n+="t",n+=" valida"},noResults:function(){return"Tulemused puuduvad"},searching:function(){return"Otsin…"},removeAllItems:function(){return"Eemalda kõik esemed"}}}),e.define,e.require}(); -------------------------------------------------------------------------------- /asert/admin/js/vendor/select2/i18n/eu.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/eu",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="Idatzi ";return n+=1==t?"karaktere bat":t+" karaktere",n+=" gutxiago"},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Idatzi ";return n+=1==t?"karaktere bat":t+" karaktere",n+=" gehiago"},loadingMore:function(){return"Emaitza gehiago kargatzen…"},maximumSelected:function(e){return 1===e.maximum?"Elementu bakarra hauta dezakezu":e.maximum+" elementu hauta ditzakezu soilik"},noResults:function(){return"Ez da bat datorrenik aurkitu"},searching:function(){return"Bilatzen…"},removeAllItems:function(){return"Kendu elementu guztiak"}}}),e.define,e.require}(); -------------------------------------------------------------------------------- /asert/admin/js/vendor/select2/i18n/fa.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/fa",[],function(){return{errorLoading:function(){return"امکان بارگذاری نتایج وجود ندارد."},inputTooLong:function(n){return"لطفاً "+(n.input.length-n.maximum)+" کاراکتر را حذف نمایید"},inputTooShort:function(n){return"لطفاً تعداد "+(n.minimum-n.input.length)+" کاراکتر یا بیشتر وارد نمایید"},loadingMore:function(){return"در حال بارگذاری نتایج بیشتر..."},maximumSelected:function(n){return"شما تنها می‌توانید "+n.maximum+" آیتم را انتخاب نمایید"},noResults:function(){return"هیچ نتیجه‌ای یافت نشد"},searching:function(){return"در حال جستجو..."},removeAllItems:function(){return"همه موارد را حذف کنید"}}}),n.define,n.require}(); -------------------------------------------------------------------------------- /asert/admin/js/vendor/select2/i18n/fi.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/fi",[],function(){return{errorLoading:function(){return"Tuloksia ei saatu ladattua."},inputTooLong:function(n){return"Ole hyvä ja anna "+(n.input.length-n.maximum)+" merkkiä vähemmän"},inputTooShort:function(n){return"Ole hyvä ja anna "+(n.minimum-n.input.length)+" merkkiä lisää"},loadingMore:function(){return"Ladataan lisää tuloksia…"},maximumSelected:function(n){return"Voit valita ainoastaan "+n.maximum+" kpl"},noResults:function(){return"Ei tuloksia"},searching:function(){return"Haetaan…"},removeAllItems:function(){return"Poista kaikki kohteet"}}}),n.define,n.require}(); -------------------------------------------------------------------------------- /asert/admin/js/vendor/select2/i18n/fr.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/fr",[],function(){return{errorLoading:function(){return"Les résultats ne peuvent pas être chargés."},inputTooLong:function(e){var n=e.input.length-e.maximum;return"Supprimez "+n+" caractère"+(n>1?"s":"")},inputTooShort:function(e){var n=e.minimum-e.input.length;return"Saisissez au moins "+n+" caractère"+(n>1?"s":"")},loadingMore:function(){return"Chargement de résultats supplémentaires…"},maximumSelected:function(e){return"Vous pouvez seulement sélectionner "+e.maximum+" élément"+(e.maximum>1?"s":"")},noResults:function(){return"Aucun résultat trouvé"},searching:function(){return"Recherche en cours…"},removeAllItems:function(){return"Supprimer tous les éléments"}}}),e.define,e.require}(); -------------------------------------------------------------------------------- /asert/admin/js/vendor/select2/i18n/gl.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/gl",[],function(){return{errorLoading:function(){return"Non foi posíbel cargar os resultados."},inputTooLong:function(e){var n=e.input.length-e.maximum;return 1===n?"Elimine un carácter":"Elimine "+n+" caracteres"},inputTooShort:function(e){var n=e.minimum-e.input.length;return 1===n?"Engada un carácter":"Engada "+n+" caracteres"},loadingMore:function(){return"Cargando máis resultados…"},maximumSelected:function(e){return 1===e.maximum?"Só pode seleccionar un elemento":"Só pode seleccionar "+e.maximum+" elementos"},noResults:function(){return"Non se atoparon resultados"},searching:function(){return"Buscando…"},removeAllItems:function(){return"Elimina todos os elementos"}}}),e.define,e.require}(); -------------------------------------------------------------------------------- /asert/admin/js/vendor/select2/i18n/he.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/he",[],function(){return{errorLoading:function(){return"שגיאה בטעינת התוצאות"},inputTooLong:function(n){var e=n.input.length-n.maximum,r="נא למחוק ";return r+=1===e?"תו אחד":e+" תווים"},inputTooShort:function(n){var e=n.minimum-n.input.length,r="נא להכניס ";return r+=1===e?"תו אחד":e+" תווים",r+=" או יותר"},loadingMore:function(){return"טוען תוצאות נוספות…"},maximumSelected:function(n){var e="באפשרותך לבחור עד ";return 1===n.maximum?e+="פריט אחד":e+=n.maximum+" פריטים",e},noResults:function(){return"לא נמצאו תוצאות"},searching:function(){return"מחפש…"},removeAllItems:function(){return"הסר את כל הפריטים"}}}),n.define,n.require}(); -------------------------------------------------------------------------------- /asert/admin/js/vendor/select2/i18n/hi.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/hi",[],function(){return{errorLoading:function(){return"परिणामों को लोड नहीं किया जा सका।"},inputTooLong:function(n){var e=n.input.length-n.maximum,r=e+" अक्षर को हटा दें";return e>1&&(r=e+" अक्षरों को हटा दें "),r},inputTooShort:function(n){return"कृपया "+(n.minimum-n.input.length)+" या अधिक अक्षर दर्ज करें"},loadingMore:function(){return"अधिक परिणाम लोड हो रहे है..."},maximumSelected:function(n){return"आप केवल "+n.maximum+" आइटम का चयन कर सकते हैं"},noResults:function(){return"कोई परिणाम नहीं मिला"},searching:function(){return"खोज रहा है..."},removeAllItems:function(){return"सभी वस्तुओं को हटा दें"}}}),n.define,n.require}(); -------------------------------------------------------------------------------- /asert/admin/js/vendor/select2/i18n/hr.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/hr",[],function(){function n(n){var e=" "+n+" znak";return n%10<5&&n%10>0&&(n%100<5||n%100>19)?n%10>1&&(e+="a"):e+="ova",e}return{errorLoading:function(){return"Preuzimanje nije uspjelo."},inputTooLong:function(e){return"Unesite "+n(e.input.length-e.maximum)},inputTooShort:function(e){return"Unesite još "+n(e.minimum-e.input.length)},loadingMore:function(){return"Učitavanje rezultata…"},maximumSelected:function(n){return"Maksimalan broj odabranih stavki je "+n.maximum},noResults:function(){return"Nema rezultata"},searching:function(){return"Pretraga…"},removeAllItems:function(){return"Ukloni sve stavke"}}}),n.define,n.require}(); -------------------------------------------------------------------------------- /asert/admin/js/vendor/select2/i18n/hsb.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/hsb",[],function(){var n=["znamješko","znamješce","znamješka","znamješkow"],e=["zapisk","zapiskaj","zapiski","zapiskow"],u=function(n,e){return 1===n?e[0]:2===n?e[1]:n>2&&n<=4?e[2]:n>=5?e[3]:void 0};return{errorLoading:function(){return"Wuslědki njedachu so začitać."},inputTooLong:function(e){var a=e.input.length-e.maximum;return"Prošu zhašej "+a+" "+u(a,n)},inputTooShort:function(e){var a=e.minimum-e.input.length;return"Prošu zapodaj znajmjeńša "+a+" "+u(a,n)},loadingMore:function(){return"Dalše wuslědki so začitaja…"},maximumSelected:function(n){return"Móžeš jenož "+n.maximum+" "+u(n.maximum,e)+"wubrać"},noResults:function(){return"Žane wuslědki namakane"},searching:function(){return"Pyta so…"},removeAllItems:function(){return"Remove all items"}}}),n.define,n.require}(); -------------------------------------------------------------------------------- /asert/admin/js/vendor/select2/i18n/hu.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/hu",[],function(){return{errorLoading:function(){return"Az eredmények betöltése nem sikerült."},inputTooLong:function(e){return"Túl hosszú. "+(e.input.length-e.maximum)+" karakterrel több, mint kellene."},inputTooShort:function(e){return"Túl rövid. Még "+(e.minimum-e.input.length)+" karakter hiányzik."},loadingMore:function(){return"Töltés…"},maximumSelected:function(e){return"Csak "+e.maximum+" elemet lehet kiválasztani."},noResults:function(){return"Nincs találat."},searching:function(){return"Keresés…"},removeAllItems:function(){return"Távolítson el minden elemet"}}}),e.define,e.require}(); -------------------------------------------------------------------------------- /asert/admin/js/vendor/select2/i18n/hy.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/hy",[],function(){return{errorLoading:function(){return"Արդյունքները հնարավոր չէ բեռնել։"},inputTooLong:function(n){return"Խնդրում ենք հեռացնել "+(n.input.length-n.maximum)+" նշան"},inputTooShort:function(n){return"Խնդրում ենք մուտքագրել "+(n.minimum-n.input.length)+" կամ ավել նշաններ"},loadingMore:function(){return"Բեռնվում են նոր արդյունքներ․․․"},maximumSelected:function(n){return"Դուք կարող եք ընտրել առավելագույնը "+n.maximum+" կետ"},noResults:function(){return"Արդյունքներ չեն գտնվել"},searching:function(){return"Որոնում․․․"},removeAllItems:function(){return"Հեռացնել բոլոր տարրերը"}}}),n.define,n.require}(); -------------------------------------------------------------------------------- /asert/admin/js/vendor/select2/i18n/id.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/id",[],function(){return{errorLoading:function(){return"Data tidak boleh diambil."},inputTooLong:function(n){return"Hapuskan "+(n.input.length-n.maximum)+" huruf"},inputTooShort:function(n){return"Masukkan "+(n.minimum-n.input.length)+" huruf lagi"},loadingMore:function(){return"Mengambil data…"},maximumSelected:function(n){return"Anda hanya dapat memilih "+n.maximum+" pilihan"},noResults:function(){return"Tidak ada data yang sesuai"},searching:function(){return"Mencari…"},removeAllItems:function(){return"Hapus semua item"}}}),n.define,n.require}(); -------------------------------------------------------------------------------- /asert/admin/js/vendor/select2/i18n/is.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/is",[],function(){return{inputTooLong:function(n){var t=n.input.length-n.maximum,e="Vinsamlegast styttið texta um "+t+" staf";return t<=1?e:e+"i"},inputTooShort:function(n){var t=n.minimum-n.input.length,e="Vinsamlegast skrifið "+t+" staf";return t>1&&(e+="i"),e+=" í viðbót"},loadingMore:function(){return"Sæki fleiri niðurstöður…"},maximumSelected:function(n){return"Þú getur aðeins valið "+n.maximum+" atriði"},noResults:function(){return"Ekkert fannst"},searching:function(){return"Leita…"},removeAllItems:function(){return"Fjarlægðu öll atriði"}}}),n.define,n.require}(); -------------------------------------------------------------------------------- /asert/admin/js/vendor/select2/i18n/it.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/it",[],function(){return{errorLoading:function(){return"I risultati non possono essere caricati."},inputTooLong:function(e){var n=e.input.length-e.maximum,t="Per favore cancella "+n+" caratter";return t+=1!==n?"i":"e"},inputTooShort:function(e){return"Per favore inserisci "+(e.minimum-e.input.length)+" o più caratteri"},loadingMore:function(){return"Caricando più risultati…"},maximumSelected:function(e){var n="Puoi selezionare solo "+e.maximum+" element";return 1!==e.maximum?n+="i":n+="o",n},noResults:function(){return"Nessun risultato trovato"},searching:function(){return"Sto cercando…"},removeAllItems:function(){return"Rimuovi tutti gli oggetti"}}}),e.define,e.require}(); -------------------------------------------------------------------------------- /asert/admin/js/vendor/select2/i18n/ja.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/ja",[],function(){return{errorLoading:function(){return"結果が読み込まれませんでした"},inputTooLong:function(n){return n.input.length-n.maximum+" 文字を削除してください"},inputTooShort:function(n){return"少なくとも "+(n.minimum-n.input.length)+" 文字を入力してください"},loadingMore:function(){return"読み込み中…"},maximumSelected:function(n){return n.maximum+" 件しか選択できません"},noResults:function(){return"対象が見つかりません"},searching:function(){return"検索しています…"},removeAllItems:function(){return"すべてのアイテムを削除"}}}),n.define,n.require}(); -------------------------------------------------------------------------------- /asert/admin/js/vendor/select2/i18n/ka.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/ka",[],function(){return{errorLoading:function(){return"მონაცემების ჩატვირთვა შეუძლებელია."},inputTooLong:function(n){return"გთხოვთ აკრიფეთ "+(n.input.length-n.maximum)+" სიმბოლოთი ნაკლები"},inputTooShort:function(n){return"გთხოვთ აკრიფეთ "+(n.minimum-n.input.length)+" სიმბოლო ან მეტი"},loadingMore:function(){return"მონაცემების ჩატვირთვა…"},maximumSelected:function(n){return"თქვენ შეგიძლიათ აირჩიოთ არაუმეტეს "+n.maximum+" ელემენტი"},noResults:function(){return"რეზულტატი არ მოიძებნა"},searching:function(){return"ძიება…"},removeAllItems:function(){return"ამოიღე ყველა ელემენტი"}}}),n.define,n.require}(); -------------------------------------------------------------------------------- /asert/admin/js/vendor/select2/i18n/km.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/km",[],function(){return{errorLoading:function(){return"មិនអាចទាញយកទិន្នន័យ"},inputTooLong:function(n){return"សូមលុបចេញ "+(n.input.length-n.maximum)+" អក្សរ"},inputTooShort:function(n){return"សូមបញ្ចូល"+(n.minimum-n.input.length)+" អក្សរ រឺ ច្រើនជាងនេះ"},loadingMore:function(){return"កំពុងទាញយកទិន្នន័យបន្ថែម..."},maximumSelected:function(n){return"អ្នកអាចជ្រើសរើសបានតែ "+n.maximum+" ជម្រើសប៉ុណ្ណោះ"},noResults:function(){return"មិនមានលទ្ធផល"},searching:function(){return"កំពុងស្វែងរក..."},removeAllItems:function(){return"លុបធាតុទាំងអស់"}}}),n.define,n.require}(); -------------------------------------------------------------------------------- /asert/admin/js/vendor/select2/i18n/ko.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/ko",[],function(){return{errorLoading:function(){return"결과를 불러올 수 없습니다."},inputTooLong:function(n){return"너무 깁니다. "+(n.input.length-n.maximum)+" 글자 지워주세요."},inputTooShort:function(n){return"너무 짧습니다. "+(n.minimum-n.input.length)+" 글자 더 입력해주세요."},loadingMore:function(){return"불러오는 중…"},maximumSelected:function(n){return"최대 "+n.maximum+"개까지만 선택 가능합니다."},noResults:function(){return"결과가 없습니다."},searching:function(){return"검색 중…"},removeAllItems:function(){return"모든 항목 삭제"}}}),n.define,n.require}(); -------------------------------------------------------------------------------- /asert/admin/js/vendor/select2/i18n/lt.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/lt",[],function(){function n(n,e,i,t){return n%10==1&&(n%100<11||n%100>19)?e:n%10>=2&&n%10<=9&&(n%100<11||n%100>19)?i:t}return{inputTooLong:function(e){var i=e.input.length-e.maximum,t="Pašalinkite "+i+" simbol";return t+=n(i,"į","ius","ių")},inputTooShort:function(e){var i=e.minimum-e.input.length,t="Įrašykite dar "+i+" simbol";return t+=n(i,"į","ius","ių")},loadingMore:function(){return"Kraunama daugiau rezultatų…"},maximumSelected:function(e){var i="Jūs galite pasirinkti tik "+e.maximum+" element";return i+=n(e.maximum,"ą","us","ų")},noResults:function(){return"Atitikmenų nerasta"},searching:function(){return"Ieškoma…"},removeAllItems:function(){return"Pašalinti visus elementus"}}}),n.define,n.require}(); -------------------------------------------------------------------------------- /asert/admin/js/vendor/select2/i18n/lv.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/lv",[],function(){function e(e,n,u,i){return 11===e?n:e%10==1?u:i}return{inputTooLong:function(n){var u=n.input.length-n.maximum,i="Lūdzu ievadiet par "+u;return(i+=" simbol"+e(u,"iem","u","iem"))+" mazāk"},inputTooShort:function(n){var u=n.minimum-n.input.length,i="Lūdzu ievadiet vēl "+u;return i+=" simbol"+e(u,"us","u","us")},loadingMore:function(){return"Datu ielāde…"},maximumSelected:function(n){var u="Jūs varat izvēlēties ne vairāk kā "+n.maximum;return u+=" element"+e(n.maximum,"us","u","us")},noResults:function(){return"Sakritību nav"},searching:function(){return"Meklēšana…"},removeAllItems:function(){return"Noņemt visus vienumus"}}}),e.define,e.require}(); -------------------------------------------------------------------------------- /asert/admin/js/vendor/select2/i18n/mk.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/mk",[],function(){return{inputTooLong:function(n){var e=(n.input.length,n.maximum,"Ве молиме внесете "+n.maximum+" помалку карактер");return 1!==n.maximum&&(e+="и"),e},inputTooShort:function(n){var e=(n.minimum,n.input.length,"Ве молиме внесете уште "+n.maximum+" карактер");return 1!==n.maximum&&(e+="и"),e},loadingMore:function(){return"Вчитување резултати…"},maximumSelected:function(n){var e="Можете да изберете само "+n.maximum+" ставк";return 1===n.maximum?e+="а":e+="и",e},noResults:function(){return"Нема пронајдено совпаѓања"},searching:function(){return"Пребарување…"},removeAllItems:function(){return"Отстрани ги сите предмети"}}}),n.define,n.require}(); -------------------------------------------------------------------------------- /asert/admin/js/vendor/select2/i18n/ms.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/ms",[],function(){return{errorLoading:function(){return"Keputusan tidak berjaya dimuatkan."},inputTooLong:function(n){return"Sila hapuskan "+(n.input.length-n.maximum)+" aksara"},inputTooShort:function(n){return"Sila masukkan "+(n.minimum-n.input.length)+" atau lebih aksara"},loadingMore:function(){return"Sedang memuatkan keputusan…"},maximumSelected:function(n){return"Anda hanya boleh memilih "+n.maximum+" pilihan"},noResults:function(){return"Tiada padanan yang ditemui"},searching:function(){return"Mencari…"},removeAllItems:function(){return"Keluarkan semua item"}}}),n.define,n.require}(); -------------------------------------------------------------------------------- /asert/admin/js/vendor/select2/i18n/nb.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/nb",[],function(){return{errorLoading:function(){return"Kunne ikke hente resultater."},inputTooLong:function(e){return"Vennligst fjern "+(e.input.length-e.maximum)+" tegn"},inputTooShort:function(e){return"Vennligst skriv inn "+(e.minimum-e.input.length)+" tegn til"},loadingMore:function(){return"Laster flere resultater…"},maximumSelected:function(e){return"Du kan velge maks "+e.maximum+" elementer"},noResults:function(){return"Ingen treff"},searching:function(){return"Søker…"},removeAllItems:function(){return"Fjern alle elementer"}}}),e.define,e.require}(); -------------------------------------------------------------------------------- /asert/admin/js/vendor/select2/i18n/ne.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/ne",[],function(){return{errorLoading:function(){return"नतिजाहरु देखाउन सकिएन।"},inputTooLong:function(n){var e=n.input.length-n.maximum,u="कृपया "+e+" अक्षर मेटाउनुहोस्।";return 1!=e&&(u+="कृपया "+e+" अक्षरहरु मेटाउनुहोस्।"),u},inputTooShort:function(n){return"कृपया बाँकी रहेका "+(n.minimum-n.input.length)+" वा अरु धेरै अक्षरहरु भर्नुहोस्।"},loadingMore:function(){return"अरु नतिजाहरु भरिँदैछन् …"},maximumSelected:function(n){var e="तँपाई "+n.maximum+" वस्तु मात्र छान्न पाउँनुहुन्छ।";return 1!=n.maximum&&(e="तँपाई "+n.maximum+" वस्तुहरु मात्र छान्न पाउँनुहुन्छ।"),e},noResults:function(){return"कुनै पनि नतिजा भेटिएन।"},searching:function(){return"खोजि हुँदैछ…"}}}),n.define,n.require}(); -------------------------------------------------------------------------------- /asert/admin/js/vendor/select2/i18n/nl.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/nl",[],function(){return{errorLoading:function(){return"De resultaten konden niet worden geladen."},inputTooLong:function(e){return"Gelieve "+(e.input.length-e.maximum)+" karakters te verwijderen"},inputTooShort:function(e){return"Gelieve "+(e.minimum-e.input.length)+" of meer karakters in te voeren"},loadingMore:function(){return"Meer resultaten laden…"},maximumSelected:function(e){var n=1==e.maximum?"kan":"kunnen",r="Er "+n+" maar "+e.maximum+" item";return 1!=e.maximum&&(r+="s"),r+=" worden geselecteerd"},noResults:function(){return"Geen resultaten gevonden…"},searching:function(){return"Zoeken…"},removeAllItems:function(){return"Verwijder alle items"}}}),e.define,e.require}(); -------------------------------------------------------------------------------- /asert/admin/js/vendor/select2/i18n/pl.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/pl",[],function(){var n=["znak","znaki","znaków"],e=["element","elementy","elementów"],r=function(n,e){return 1===n?e[0]:n>1&&n<=4?e[1]:n>=5?e[2]:void 0};return{errorLoading:function(){return"Nie można załadować wyników."},inputTooLong:function(e){var t=e.input.length-e.maximum;return"Usuń "+t+" "+r(t,n)},inputTooShort:function(e){var t=e.minimum-e.input.length;return"Podaj przynajmniej "+t+" "+r(t,n)},loadingMore:function(){return"Trwa ładowanie…"},maximumSelected:function(n){return"Możesz zaznaczyć tylko "+n.maximum+" "+r(n.maximum,e)},noResults:function(){return"Brak wyników"},searching:function(){return"Trwa wyszukiwanie…"},removeAllItems:function(){return"Usuń wszystkie przedmioty"}}}),n.define,n.require}(); -------------------------------------------------------------------------------- /asert/admin/js/vendor/select2/i18n/ps.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/ps",[],function(){return{errorLoading:function(){return"پايلي نه سي ترلاسه کېدای"},inputTooLong:function(n){var e=n.input.length-n.maximum,r="د مهربانۍ لمخي "+e+" توری ړنګ کړئ";return 1!=e&&(r=r.replace("توری","توري")),r},inputTooShort:function(n){return"لږ تر لږه "+(n.minimum-n.input.length)+" يا ډېر توري وليکئ"},loadingMore:function(){return"نوري پايلي ترلاسه کيږي..."},maximumSelected:function(n){var e="تاسو يوازي "+n.maximum+" قلم په نښه کولای سی";return 1!=n.maximum&&(e=e.replace("قلم","قلمونه")),e},noResults:function(){return"پايلي و نه موندل سوې"},searching:function(){return"لټول کيږي..."},removeAllItems:function(){return"ټول توکي لرې کړئ"}}}),n.define,n.require}(); -------------------------------------------------------------------------------- /asert/admin/js/vendor/select2/i18n/pt-BR.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/pt-BR",[],function(){return{errorLoading:function(){return"Os resultados não puderam ser carregados."},inputTooLong:function(e){var n=e.input.length-e.maximum,r="Apague "+n+" caracter";return 1!=n&&(r+="es"),r},inputTooShort:function(e){return"Digite "+(e.minimum-e.input.length)+" ou mais caracteres"},loadingMore:function(){return"Carregando mais resultados…"},maximumSelected:function(e){var n="Você só pode selecionar "+e.maximum+" ite";return 1==e.maximum?n+="m":n+="ns",n},noResults:function(){return"Nenhum resultado encontrado"},searching:function(){return"Buscando…"},removeAllItems:function(){return"Remover todos os itens"}}}),e.define,e.require}(); -------------------------------------------------------------------------------- /asert/admin/js/vendor/select2/i18n/pt.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/pt",[],function(){return{errorLoading:function(){return"Os resultados não puderam ser carregados."},inputTooLong:function(e){var r=e.input.length-e.maximum,n="Por favor apague "+r+" ";return n+=1!=r?"caracteres":"caractere"},inputTooShort:function(e){return"Introduza "+(e.minimum-e.input.length)+" ou mais caracteres"},loadingMore:function(){return"A carregar mais resultados…"},maximumSelected:function(e){var r="Apenas pode seleccionar "+e.maximum+" ";return r+=1!=e.maximum?"itens":"item"},noResults:function(){return"Sem resultados"},searching:function(){return"A procurar…"},removeAllItems:function(){return"Remover todos os itens"}}}),e.define,e.require}(); -------------------------------------------------------------------------------- /asert/admin/js/vendor/select2/i18n/ro.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/ro",[],function(){return{errorLoading:function(){return"Rezultatele nu au putut fi incărcate."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Vă rugăm să ștergeți"+t+" caracter";return 1!==t&&(n+="e"),n},inputTooShort:function(e){return"Vă rugăm să introduceți "+(e.minimum-e.input.length)+" sau mai multe caractere"},loadingMore:function(){return"Se încarcă mai multe rezultate…"},maximumSelected:function(e){var t="Aveți voie să selectați cel mult "+e.maximum;return t+=" element",1!==e.maximum&&(t+="e"),t},noResults:function(){return"Nu au fost găsite rezultate"},searching:function(){return"Căutare…"},removeAllItems:function(){return"Eliminați toate elementele"}}}),e.define,e.require}(); -------------------------------------------------------------------------------- /asert/admin/js/vendor/select2/i18n/ru.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/ru",[],function(){function n(n,e,r,u){return n%10<5&&n%10>0&&n%100<5||n%100>20?n%10>1?r:e:u}return{errorLoading:function(){return"Невозможно загрузить результаты"},inputTooLong:function(e){var r=e.input.length-e.maximum,u="Пожалуйста, введите на "+r+" символ";return u+=n(r,"","a","ов"),u+=" меньше"},inputTooShort:function(e){var r=e.minimum-e.input.length,u="Пожалуйста, введите ещё хотя бы "+r+" символ";return u+=n(r,"","a","ов")},loadingMore:function(){return"Загрузка данных…"},maximumSelected:function(e){var r="Вы можете выбрать не более "+e.maximum+" элемент";return r+=n(e.maximum,"","a","ов")},noResults:function(){return"Совпадений не найдено"},searching:function(){return"Поиск…"},removeAllItems:function(){return"Удалить все элементы"}}}),n.define,n.require}(); -------------------------------------------------------------------------------- /asert/admin/js/vendor/select2/i18n/sk.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/sk",[],function(){var e={2:function(e){return e?"dva":"dve"},3:function(){return"tri"},4:function(){return"štyri"}};return{errorLoading:function(){return"Výsledky sa nepodarilo načítať."},inputTooLong:function(n){var t=n.input.length-n.maximum;return 1==t?"Prosím, zadajte o jeden znak menej":t>=2&&t<=4?"Prosím, zadajte o "+e[t](!0)+" znaky menej":"Prosím, zadajte o "+t+" znakov menej"},inputTooShort:function(n){var t=n.minimum-n.input.length;return 1==t?"Prosím, zadajte ešte jeden znak":t<=4?"Prosím, zadajte ešte ďalšie "+e[t](!0)+" znaky":"Prosím, zadajte ešte ďalších "+t+" znakov"},loadingMore:function(){return"Načítanie ďalších výsledkov…"},maximumSelected:function(n){return 1==n.maximum?"Môžete zvoliť len jednu položku":n.maximum>=2&&n.maximum<=4?"Môžete zvoliť najviac "+e[n.maximum](!1)+" položky":"Môžete zvoliť najviac "+n.maximum+" položiek"},noResults:function(){return"Nenašli sa žiadne položky"},searching:function(){return"Vyhľadávanie…"},removeAllItems:function(){return"Odstráňte všetky položky"}}}),e.define,e.require}(); -------------------------------------------------------------------------------- /asert/admin/js/vendor/select2/i18n/sl.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/sl",[],function(){return{errorLoading:function(){return"Zadetkov iskanja ni bilo mogoče naložiti."},inputTooLong:function(e){var n=e.input.length-e.maximum,t="Prosim zbrišite "+n+" znak";return 2==n?t+="a":1!=n&&(t+="e"),t},inputTooShort:function(e){var n=e.minimum-e.input.length,t="Prosim vpišite še "+n+" znak";return 2==n?t+="a":1!=n&&(t+="e"),t},loadingMore:function(){return"Nalagam več zadetkov…"},maximumSelected:function(e){var n="Označite lahko največ "+e.maximum+" predmet";return 2==e.maximum?n+="a":1!=e.maximum&&(n+="e"),n},noResults:function(){return"Ni zadetkov."},searching:function(){return"Iščem…"},removeAllItems:function(){return"Odstranite vse elemente"}}}),e.define,e.require}(); -------------------------------------------------------------------------------- /asert/admin/js/vendor/select2/i18n/sq.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/sq",[],function(){return{errorLoading:function(){return"Rezultatet nuk mund të ngarkoheshin."},inputTooLong:function(e){var n=e.input.length-e.maximum,t="Të lutem fshi "+n+" karakter";return 1!=n&&(t+="e"),t},inputTooShort:function(e){return"Të lutem shkruaj "+(e.minimum-e.input.length)+" ose më shumë karaktere"},loadingMore:function(){return"Duke ngarkuar më shumë rezultate…"},maximumSelected:function(e){var n="Mund të zgjedhësh vetëm "+e.maximum+" element";return 1!=e.maximum&&(n+="e"),n},noResults:function(){return"Nuk u gjet asnjë rezultat"},searching:function(){return"Duke kërkuar…"},removeAllItems:function(){return"Hiq të gjitha sendet"}}}),e.define,e.require}(); -------------------------------------------------------------------------------- /asert/admin/js/vendor/select2/i18n/sr-Cyrl.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/sr-Cyrl",[],function(){function n(n,e,r,u){return n%10==1&&n%100!=11?e:n%10>=2&&n%10<=4&&(n%100<12||n%100>14)?r:u}return{errorLoading:function(){return"Преузимање није успело."},inputTooLong:function(e){var r=e.input.length-e.maximum,u="Обришите "+r+" симбол";return u+=n(r,"","а","а")},inputTooShort:function(e){var r=e.minimum-e.input.length,u="Укуцајте бар још "+r+" симбол";return u+=n(r,"","а","а")},loadingMore:function(){return"Преузимање још резултата…"},maximumSelected:function(e){var r="Можете изабрати само "+e.maximum+" ставк";return r+=n(e.maximum,"у","е","и")},noResults:function(){return"Ништа није пронађено"},searching:function(){return"Претрага…"},removeAllItems:function(){return"Уклоните све ставке"}}}),n.define,n.require}(); -------------------------------------------------------------------------------- /asert/admin/js/vendor/select2/i18n/sr.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/sr",[],function(){function n(n,e,r,t){return n%10==1&&n%100!=11?e:n%10>=2&&n%10<=4&&(n%100<12||n%100>14)?r:t}return{errorLoading:function(){return"Preuzimanje nije uspelo."},inputTooLong:function(e){var r=e.input.length-e.maximum,t="Obrišite "+r+" simbol";return t+=n(r,"","a","a")},inputTooShort:function(e){var r=e.minimum-e.input.length,t="Ukucajte bar još "+r+" simbol";return t+=n(r,"","a","a")},loadingMore:function(){return"Preuzimanje još rezultata…"},maximumSelected:function(e){var r="Možete izabrati samo "+e.maximum+" stavk";return r+=n(e.maximum,"u","e","i")},noResults:function(){return"Ništa nije pronađeno"},searching:function(){return"Pretraga…"},removeAllItems:function(){return"Уклоните све ставке"}}}),n.define,n.require}(); -------------------------------------------------------------------------------- /asert/admin/js/vendor/select2/i18n/sv.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/sv",[],function(){return{errorLoading:function(){return"Resultat kunde inte laddas."},inputTooLong:function(n){return"Vänligen sudda ut "+(n.input.length-n.maximum)+" tecken"},inputTooShort:function(n){return"Vänligen skriv in "+(n.minimum-n.input.length)+" eller fler tecken"},loadingMore:function(){return"Laddar fler resultat…"},maximumSelected:function(n){return"Du kan max välja "+n.maximum+" element"},noResults:function(){return"Inga träffar"},searching:function(){return"Söker…"},removeAllItems:function(){return"Ta bort alla objekt"}}}),n.define,n.require}(); -------------------------------------------------------------------------------- /asert/admin/js/vendor/select2/i18n/th.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/th",[],function(){return{errorLoading:function(){return"ไม่สามารถค้นข้อมูลได้"},inputTooLong:function(n){return"โปรดลบออก "+(n.input.length-n.maximum)+" ตัวอักษร"},inputTooShort:function(n){return"โปรดพิมพ์เพิ่มอีก "+(n.minimum-n.input.length)+" ตัวอักษร"},loadingMore:function(){return"กำลังค้นข้อมูลเพิ่ม…"},maximumSelected:function(n){return"คุณสามารถเลือกได้ไม่เกิน "+n.maximum+" รายการ"},noResults:function(){return"ไม่พบข้อมูล"},searching:function(){return"กำลังค้นข้อมูล…"},removeAllItems:function(){return"ลบรายการทั้งหมด"}}}),n.define,n.require}(); -------------------------------------------------------------------------------- /asert/admin/js/vendor/select2/i18n/tk.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/tk",[],function(){return{errorLoading:function(){return"Netije ýüklenmedi."},inputTooLong:function(e){return e.input.length-e.maximum+" harp bozuň."},inputTooShort:function(e){return"Ýene-de iň az "+(e.minimum-e.input.length)+" harp ýazyň."},loadingMore:function(){return"Köpräk netije görkezilýär…"},maximumSelected:function(e){return"Diňe "+e.maximum+" sanysyny saýlaň."},noResults:function(){return"Netije tapylmady."},searching:function(){return"Gözlenýär…"},removeAllItems:function(){return"Remove all items"}}}),e.define,e.require}(); -------------------------------------------------------------------------------- /asert/admin/js/vendor/select2/i18n/tr.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/tr",[],function(){return{errorLoading:function(){return"Sonuç yüklenemedi"},inputTooLong:function(n){return n.input.length-n.maximum+" karakter daha girmelisiniz"},inputTooShort:function(n){return"En az "+(n.minimum-n.input.length)+" karakter daha girmelisiniz"},loadingMore:function(){return"Daha fazla…"},maximumSelected:function(n){return"Sadece "+n.maximum+" seçim yapabilirsiniz"},noResults:function(){return"Sonuç bulunamadı"},searching:function(){return"Aranıyor…"},removeAllItems:function(){return"Tüm öğeleri kaldır"}}}),n.define,n.require}(); -------------------------------------------------------------------------------- /asert/admin/js/vendor/select2/i18n/uk.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/uk",[],function(){function n(n,e,u,r){return n%100>10&&n%100<15?r:n%10==1?e:n%10>1&&n%10<5?u:r}return{errorLoading:function(){return"Неможливо завантажити результати"},inputTooLong:function(e){return"Будь ласка, видаліть "+(e.input.length-e.maximum)+" "+n(e.maximum,"літеру","літери","літер")},inputTooShort:function(n){return"Будь ласка, введіть "+(n.minimum-n.input.length)+" або більше літер"},loadingMore:function(){return"Завантаження інших результатів…"},maximumSelected:function(e){return"Ви можете вибрати лише "+e.maximum+" "+n(e.maximum,"пункт","пункти","пунктів")},noResults:function(){return"Нічого не знайдено"},searching:function(){return"Пошук…"},removeAllItems:function(){return"Видалити всі елементи"}}}),n.define,n.require}(); -------------------------------------------------------------------------------- /asert/admin/js/vendor/select2/i18n/vi.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/vi",[],function(){return{inputTooLong:function(n){return"Vui lòng xóa bớt "+(n.input.length-n.maximum)+" ký tự"},inputTooShort:function(n){return"Vui lòng nhập thêm từ "+(n.minimum-n.input.length)+" ký tự trở lên"},loadingMore:function(){return"Đang lấy thêm kết quả…"},maximumSelected:function(n){return"Chỉ có thể chọn được "+n.maximum+" lựa chọn"},noResults:function(){return"Không tìm thấy kết quả"},searching:function(){return"Đang tìm…"},removeAllItems:function(){return"Xóa tất cả các mục"}}}),n.define,n.require}(); -------------------------------------------------------------------------------- /asert/admin/js/vendor/select2/i18n/zh-CN.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/zh-CN",[],function(){return{errorLoading:function(){return"无法载入结果。"},inputTooLong:function(n){return"请删除"+(n.input.length-n.maximum)+"个字符"},inputTooShort:function(n){return"请再输入至少"+(n.minimum-n.input.length)+"个字符"},loadingMore:function(){return"载入更多结果…"},maximumSelected:function(n){return"最多只能选择"+n.maximum+"个项目"},noResults:function(){return"未找到结果"},searching:function(){return"搜索中…"},removeAllItems:function(){return"删除所有项目"}}}),n.define,n.require}(); -------------------------------------------------------------------------------- /asert/admin/js/vendor/select2/i18n/zh-TW.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/zh-TW",[],function(){return{inputTooLong:function(n){return"請刪掉"+(n.input.length-n.maximum)+"個字元"},inputTooShort:function(n){return"請再輸入"+(n.minimum-n.input.length)+"個字元"},loadingMore:function(){return"載入中…"},maximumSelected:function(n){return"你只能選擇最多"+n.maximum+"項"},noResults:function(){return"沒有找到相符的項目"},searching:function(){return"搜尋中…"},removeAllItems:function(){return"刪除所有項目"}}}),n.define,n.require}(); -------------------------------------------------------------------------------- /asert/admin/js/vendor/xregexp/LICENSE.txt: -------------------------------------------------------------------------------- 1 | The MIT License 2 | 3 | Copyright (c) 2007-2017 Steven Levithan 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /asert/style.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KenBroTech/Django-Inventory-Management-System/f43bfb6439fa6103fd5d4d0e6e4073a386e82e53/asert/style.css -------------------------------------------------------------------------------- /dashboard/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KenBroTech/Django-Inventory-Management-System/f43bfb6439fa6103fd5d4d0e6e4073a386e82e53/dashboard/__init__.py -------------------------------------------------------------------------------- /dashboard/__pycache__/__init__.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KenBroTech/Django-Inventory-Management-System/f43bfb6439fa6103fd5d4d0e6e4073a386e82e53/dashboard/__pycache__/__init__.cpython-39.pyc -------------------------------------------------------------------------------- /dashboard/__pycache__/admin.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KenBroTech/Django-Inventory-Management-System/f43bfb6439fa6103fd5d4d0e6e4073a386e82e53/dashboard/__pycache__/admin.cpython-39.pyc -------------------------------------------------------------------------------- /dashboard/__pycache__/apps.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KenBroTech/Django-Inventory-Management-System/f43bfb6439fa6103fd5d4d0e6e4073a386e82e53/dashboard/__pycache__/apps.cpython-39.pyc -------------------------------------------------------------------------------- /dashboard/__pycache__/decorators.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KenBroTech/Django-Inventory-Management-System/f43bfb6439fa6103fd5d4d0e6e4073a386e82e53/dashboard/__pycache__/decorators.cpython-39.pyc -------------------------------------------------------------------------------- /dashboard/__pycache__/forms.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KenBroTech/Django-Inventory-Management-System/f43bfb6439fa6103fd5d4d0e6e4073a386e82e53/dashboard/__pycache__/forms.cpython-39.pyc -------------------------------------------------------------------------------- /dashboard/__pycache__/models.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KenBroTech/Django-Inventory-Management-System/f43bfb6439fa6103fd5d4d0e6e4073a386e82e53/dashboard/__pycache__/models.cpython-39.pyc -------------------------------------------------------------------------------- /dashboard/__pycache__/urls.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KenBroTech/Django-Inventory-Management-System/f43bfb6439fa6103fd5d4d0e6e4073a386e82e53/dashboard/__pycache__/urls.cpython-39.pyc -------------------------------------------------------------------------------- /dashboard/__pycache__/views.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KenBroTech/Django-Inventory-Management-System/f43bfb6439fa6103fd5d4d0e6e4073a386e82e53/dashboard/__pycache__/views.cpython-39.pyc -------------------------------------------------------------------------------- /dashboard/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | from .models import Product, Order 3 | 4 | 5 | # Register your models here. 6 | admin.site.register(Product) 7 | admin.site.register(Order) 8 | -------------------------------------------------------------------------------- /dashboard/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class DashboardConfig(AppConfig): 5 | name = 'dashboard' 6 | -------------------------------------------------------------------------------- /dashboard/decorators.py: -------------------------------------------------------------------------------- 1 | from django.http import HttpResponse 2 | from django.shortcuts import redirect 3 | 4 | 5 | def auth_users(view_func): 6 | def wrapper(request, *args, **kwargs): 7 | if request.user.is_authenticated: 8 | return redirect('dashboard-index') 9 | else: 10 | return view_func(request, *args, **kwargs) 11 | return wrapper 12 | 13 | 14 | def allowed_users(allowed_roles=[]): 15 | def decorators(view_func): 16 | def wrapper(request, *args, **kwargs): 17 | group = None 18 | if request.user.groups.exists(): 19 | group = request.user.groups.all()[0].name 20 | if group in allowed_roles: 21 | return view_func(request, *args, **kwargs) 22 | else: 23 | return HttpResponse('You are not authorized to view this page') 24 | return wrapper 25 | return decorators 26 | -------------------------------------------------------------------------------- /dashboard/filter.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KenBroTech/Django-Inventory-Management-System/f43bfb6439fa6103fd5d4d0e6e4073a386e82e53/dashboard/filter.py -------------------------------------------------------------------------------- /dashboard/forms.py: -------------------------------------------------------------------------------- 1 | from django import forms 2 | from .models import Product, Order 3 | 4 | 5 | class ProductForm(forms.ModelForm): 6 | class Meta: 7 | model = Product 8 | fields = '__all__' 9 | 10 | 11 | class OrderForm(forms.ModelForm): 12 | 13 | class Meta: 14 | model = Order 15 | fields = ['name', 'order_quantity'] 16 | -------------------------------------------------------------------------------- /dashboard/migrations/0001_initial.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.1.7 on 2021-03-18 06:15 2 | 3 | from django.conf import settings 4 | from django.db import migrations, models 5 | import django.db.models.deletion 6 | 7 | 8 | class Migration(migrations.Migration): 9 | 10 | initial = True 11 | 12 | dependencies = [ 13 | migrations.swappable_dependency(settings.AUTH_USER_MODEL), 14 | ] 15 | 16 | operations = [ 17 | migrations.CreateModel( 18 | name='Product', 19 | fields=[ 20 | ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), 21 | ('name', models.CharField(max_length=100, null=True)), 22 | ('price', models.PositiveIntegerField(null=True)), 23 | ('quantity', models.PositiveIntegerField(null=True)), 24 | ('category', models.CharField(choices=[('Stationary', 'Stationary'), ('Electronics', 'Electronics'), ('Cosmetics', 'Cosmetics')], max_length=50, null=True)), 25 | ], 26 | ), 27 | migrations.CreateModel( 28 | name='Order', 29 | fields=[ 30 | ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), 31 | ('customer', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), 32 | ('name', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='dashboard.product')), 33 | ], 34 | ), 35 | ] 36 | -------------------------------------------------------------------------------- /dashboard/migrations/0002_order_order_quantity.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.1.7 on 2021-03-18 12:36 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('dashboard', '0001_initial'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AddField( 14 | model_name='order', 15 | name='order_quantity', 16 | field=models.PositiveIntegerField(null=True), 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /dashboard/migrations/0003_remove_product_price.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.1.7 on 2021-03-19 12:19 2 | 3 | from django.db import migrations 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('dashboard', '0002_order_order_quantity'), 10 | ] 11 | 12 | operations = [ 13 | migrations.RemoveField( 14 | model_name='product', 15 | name='price', 16 | ), 17 | ] 18 | -------------------------------------------------------------------------------- /dashboard/migrations/0004_auto_20210320_1908.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.1.7 on 2021-03-20 19:08 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('dashboard', '0003_remove_product_price'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AlterField( 14 | model_name='product', 15 | name='category', 16 | field=models.CharField(choices=[('Stationary', 'Stationary'), ('Electronics', 'Electronics'), ('Food', 'Food')], max_length=50, null=True), 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /dashboard/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KenBroTech/Django-Inventory-Management-System/f43bfb6439fa6103fd5d4d0e6e4073a386e82e53/dashboard/migrations/__init__.py -------------------------------------------------------------------------------- /dashboard/migrations/__pycache__/0001_initial.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KenBroTech/Django-Inventory-Management-System/f43bfb6439fa6103fd5d4d0e6e4073a386e82e53/dashboard/migrations/__pycache__/0001_initial.cpython-39.pyc -------------------------------------------------------------------------------- /dashboard/migrations/__pycache__/0002_order_order_quantity.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KenBroTech/Django-Inventory-Management-System/f43bfb6439fa6103fd5d4d0e6e4073a386e82e53/dashboard/migrations/__pycache__/0002_order_order_quantity.cpython-39.pyc -------------------------------------------------------------------------------- /dashboard/migrations/__pycache__/0003_remove_product_price.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KenBroTech/Django-Inventory-Management-System/f43bfb6439fa6103fd5d4d0e6e4073a386e82e53/dashboard/migrations/__pycache__/0003_remove_product_price.cpython-39.pyc -------------------------------------------------------------------------------- /dashboard/migrations/__pycache__/0004_auto_20210320_1908.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KenBroTech/Django-Inventory-Management-System/f43bfb6439fa6103fd5d4d0e6e4073a386e82e53/dashboard/migrations/__pycache__/0004_auto_20210320_1908.cpython-39.pyc -------------------------------------------------------------------------------- /dashboard/migrations/__pycache__/__init__.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KenBroTech/Django-Inventory-Management-System/f43bfb6439fa6103fd5d4d0e6e4073a386e82e53/dashboard/migrations/__pycache__/__init__.cpython-39.pyc -------------------------------------------------------------------------------- /dashboard/models.py: -------------------------------------------------------------------------------- 1 | from django.db import models 2 | from django.contrib.auth.models import User 3 | 4 | # Create your models here. 5 | CATEGORY = ( 6 | ('Stationary', 'Stationary'), 7 | ('Electronics', 'Electronics'), 8 | ('Food', 'Food'), 9 | ) 10 | 11 | 12 | class Product(models.Model): 13 | name = models.CharField(max_length=100, null=True) 14 | quantity = models.PositiveIntegerField(null=True) 15 | category = models.CharField(max_length=50, choices=CATEGORY, null=True) 16 | 17 | def __str__(self): 18 | return f'{self.name}' 19 | 20 | 21 | class Order(models.Model): 22 | name = models.ForeignKey(Product, on_delete=models.CASCADE, null=True) 23 | customer = models.ForeignKey(User, on_delete=models.CASCADE, null=True) 24 | order_quantity = models.PositiveIntegerField(null=True) 25 | 26 | def __str__(self): 27 | return f'{self.customer}-{self.name}' 28 | -------------------------------------------------------------------------------- /dashboard/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /dashboard/urls.py: -------------------------------------------------------------------------------- 1 | from django.urls import path 2 | from . import views 3 | 4 | urlpatterns = [ 5 | path('index/', views.index, name='dashboard-index'), 6 | path('products/', views.products, name='dashboard-products'), 7 | path('products/delete//', views.product_delete, 8 | name='dashboard-products-delete'), 9 | path('products/detail//', views.product_detail, 10 | name='dashboard-products-detail'), 11 | path('products/edit//', views.product_edit, 12 | name='dashboard-products-edit'), 13 | path('customers/', views.customers, name='dashboard-customers'), 14 | path('customers/detial//', views.customer_detail, 15 | name='dashboard-customer-detail'), 16 | path('order/', views.order, name='dashboard-order'), 17 | ] 18 | -------------------------------------------------------------------------------- /dashboard/views.py: -------------------------------------------------------------------------------- 1 | from django.shortcuts import render, redirect 2 | from django.contrib.auth.models import User 3 | from .models import Product, Order 4 | from .forms import ProductForm, OrderForm 5 | from django.contrib import messages 6 | from django.contrib.auth.decorators import login_required 7 | from .decorators import auth_users, allowed_users 8 | # Create your views here. 9 | 10 | 11 | @login_required(login_url='user-login') 12 | def index(request): 13 | product = Product.objects.all() 14 | product_count = product.count() 15 | order = Order.objects.all() 16 | order_count = order.count() 17 | customer = User.objects.filter(groups=2) 18 | customer_count = customer.count() 19 | 20 | if request.method == 'POST': 21 | form = OrderForm(request.POST) 22 | if form.is_valid(): 23 | obj = form.save(commit=False) 24 | obj.customer = request.user 25 | obj.save() 26 | return redirect('dashboard-index') 27 | else: 28 | form = OrderForm() 29 | context = { 30 | 'form': form, 31 | 'order': order, 32 | 'product': product, 33 | 'product_count': product_count, 34 | 'order_count': order_count, 35 | 'customer_count': customer_count, 36 | } 37 | return render(request, 'dashboard/index.html', context) 38 | 39 | 40 | @login_required(login_url='user-login') 41 | def products(request): 42 | product = Product.objects.all() 43 | product_count = product.count() 44 | customer = User.objects.filter(groups=2) 45 | customer_count = customer.count() 46 | order = Order.objects.all() 47 | order_count = order.count() 48 | product_quantity = Product.objects.filter(name='') 49 | if request.method == 'POST': 50 | form = ProductForm(request.POST) 51 | if form.is_valid(): 52 | form.save() 53 | product_name = form.cleaned_data.get('name') 54 | messages.success(request, f'{product_name} has been added') 55 | return redirect('dashboard-products') 56 | else: 57 | form = ProductForm() 58 | context = { 59 | 'product': product, 60 | 'form': form, 61 | 'customer_count': customer_count, 62 | 'product_count': product_count, 63 | 'order_count': order_count, 64 | } 65 | return render(request, 'dashboard/products.html', context) 66 | 67 | 68 | @login_required(login_url='user-login') 69 | def product_detail(request, pk): 70 | context = { 71 | 72 | } 73 | return render(request, 'dashboard/products_detail.html', context) 74 | 75 | 76 | @login_required(login_url='user-login') 77 | @allowed_users(allowed_roles=['Admin']) 78 | def customers(request): 79 | customer = User.objects.filter(groups=2) 80 | customer_count = customer.count() 81 | product = Product.objects.all() 82 | product_count = product.count() 83 | order = Order.objects.all() 84 | order_count = order.count() 85 | context = { 86 | 'customer': customer, 87 | 'customer_count': customer_count, 88 | 'product_count': product_count, 89 | 'order_count': order_count, 90 | } 91 | return render(request, 'dashboard/customers.html', context) 92 | 93 | 94 | @login_required(login_url='user-login') 95 | @allowed_users(allowed_roles=['Admin']) 96 | def customer_detail(request, pk): 97 | customer = User.objects.filter(groups=2) 98 | customer_count = customer.count() 99 | product = Product.objects.all() 100 | product_count = product.count() 101 | order = Order.objects.all() 102 | order_count = order.count() 103 | customers = User.objects.get(id=pk) 104 | context = { 105 | 'customers': customers, 106 | 'customer_count': customer_count, 107 | 'product_count': product_count, 108 | 'order_count': order_count, 109 | 110 | } 111 | return render(request, 'dashboard/customers_detail.html', context) 112 | 113 | 114 | @login_required(login_url='user-login') 115 | @allowed_users(allowed_roles=['Admin']) 116 | def product_edit(request, pk): 117 | item = Product.objects.get(id=pk) 118 | if request.method == 'POST': 119 | form = ProductForm(request.POST, instance=item) 120 | if form.is_valid(): 121 | form.save() 122 | return redirect('dashboard-products') 123 | else: 124 | form = ProductForm(instance=item) 125 | context = { 126 | 'form': form, 127 | } 128 | return render(request, 'dashboard/products_edit.html', context) 129 | 130 | 131 | @login_required(login_url='user-login') 132 | @allowed_users(allowed_roles=['Admin']) 133 | def product_delete(request, pk): 134 | item = Product.objects.get(id=pk) 135 | if request.method == 'POST': 136 | item.delete() 137 | return redirect('dashboard-products') 138 | context = { 139 | 'item': item 140 | } 141 | return render(request, 'dashboard/products_delete.html', context) 142 | 143 | 144 | @login_required(login_url='user-login') 145 | def order(request): 146 | order = Order.objects.all() 147 | order_count = order.count() 148 | customer = User.objects.filter(groups=2) 149 | customer_count = customer.count() 150 | product = Product.objects.all() 151 | product_count = product.count() 152 | 153 | context = { 154 | 'order': order, 155 | 'customer_count': customer_count, 156 | 'product_count': product_count, 157 | 'order_count': order_count, 158 | } 159 | return render(request, 'dashboard/order.html', context) 160 | -------------------------------------------------------------------------------- /db.sqlite3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KenBroTech/Django-Inventory-Management-System/f43bfb6439fa6103fd5d4d0e6e4073a386e82e53/db.sqlite3 -------------------------------------------------------------------------------- /db.sqlite3-journal: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KenBroTech/Django-Inventory-Management-System/f43bfb6439fa6103fd5d4d0e6e4073a386e82e53/db.sqlite3-journal -------------------------------------------------------------------------------- /inventoryproject/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KenBroTech/Django-Inventory-Management-System/f43bfb6439fa6103fd5d4d0e6e4073a386e82e53/inventoryproject/__init__.py -------------------------------------------------------------------------------- /inventoryproject/__pycache__/__init__.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KenBroTech/Django-Inventory-Management-System/f43bfb6439fa6103fd5d4d0e6e4073a386e82e53/inventoryproject/__pycache__/__init__.cpython-39.pyc -------------------------------------------------------------------------------- /inventoryproject/__pycache__/settings.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KenBroTech/Django-Inventory-Management-System/f43bfb6439fa6103fd5d4d0e6e4073a386e82e53/inventoryproject/__pycache__/settings.cpython-39.pyc -------------------------------------------------------------------------------- /inventoryproject/__pycache__/urls.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KenBroTech/Django-Inventory-Management-System/f43bfb6439fa6103fd5d4d0e6e4073a386e82e53/inventoryproject/__pycache__/urls.cpython-39.pyc -------------------------------------------------------------------------------- /inventoryproject/__pycache__/wsgi.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KenBroTech/Django-Inventory-Management-System/f43bfb6439fa6103fd5d4d0e6e4073a386e82e53/inventoryproject/__pycache__/wsgi.cpython-39.pyc -------------------------------------------------------------------------------- /inventoryproject/asgi.py: -------------------------------------------------------------------------------- 1 | """ 2 | ASGI config for inventoryproject project. 3 | 4 | It exposes the ASGI callable as a module-level variable named ``application``. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/3.1/howto/deployment/asgi/ 8 | """ 9 | 10 | import os 11 | 12 | from django.core.asgi import get_asgi_application 13 | 14 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'inventoryproject.settings') 15 | 16 | application = get_asgi_application() 17 | -------------------------------------------------------------------------------- /inventoryproject/settings.py: -------------------------------------------------------------------------------- 1 | """ 2 | Django settings for inventoryproject project. 3 | 4 | Generated by 'django-admin startproject' using Django 3.1.7. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/3.1/topics/settings/ 8 | 9 | For the full list of settings and their values, see 10 | https://docs.djangoproject.com/en/3.1/ref/settings/ 11 | """ 12 | 13 | from pathlib import Path 14 | 15 | # Build paths inside the project like this: BASE_DIR / 'subdir'. 16 | BASE_DIR = Path(__file__).resolve().parent.parent 17 | 18 | 19 | # Quick-start development settings - unsuitable for production 20 | # See https://docs.djangoproject.com/en/3.1/howto/deployment/checklist/ 21 | 22 | # SECURITY WARNING: keep the secret key used in production secret! 23 | SECRET_KEY = '@ujr-e&a%8m%6!z(+ka16+(sm6cug(h6noe%#p%=6%d2nz5t+#' 24 | 25 | # SECURITY WARNING: don't run with debug turned on in production! 26 | DEBUG = True 27 | 28 | ALLOWED_HOSTS = [] 29 | 30 | 31 | # Application definition 32 | 33 | INSTALLED_APPS = [ 34 | 'django.contrib.admin', 35 | 'django.contrib.auth', 36 | 'django.contrib.contenttypes', 37 | 'django.contrib.sessions', 38 | 'django.contrib.messages', 39 | 'django.contrib.staticfiles', 40 | 'dashboard.apps.DashboardConfig', 41 | 'user.apps.UserConfig', 42 | 'crispy_forms', 43 | ] 44 | 45 | MIDDLEWARE = [ 46 | 'django.middleware.security.SecurityMiddleware', 47 | 'django.contrib.sessions.middleware.SessionMiddleware', 48 | 'django.middleware.common.CommonMiddleware', 49 | 'django.middleware.csrf.CsrfViewMiddleware', 50 | 'django.contrib.auth.middleware.AuthenticationMiddleware', 51 | 'django.contrib.messages.middleware.MessageMiddleware', 52 | 'django.middleware.clickjacking.XFrameOptionsMiddleware', 53 | ] 54 | 55 | ROOT_URLCONF = 'inventoryproject.urls' 56 | 57 | TEMPLATES = [ 58 | { 59 | 'BACKEND': 'django.template.backends.django.DjangoTemplates', 60 | 'DIRS': [BASE_DIR / 'templates'], 61 | 'APP_DIRS': True, 62 | 'OPTIONS': { 63 | 'context_processors': [ 64 | 'django.template.context_processors.debug', 65 | 'django.template.context_processors.request', 66 | 'django.contrib.auth.context_processors.auth', 67 | 'django.contrib.messages.context_processors.messages', 68 | ], 69 | }, 70 | }, 71 | ] 72 | 73 | WSGI_APPLICATION = 'inventoryproject.wsgi.application' 74 | 75 | 76 | # Database 77 | # https://docs.djangoproject.com/en/3.1/ref/settings/#databases 78 | 79 | DATABASES = { 80 | 'default': { 81 | 'ENGINE': 'django.db.backends.mysql', 82 | 'NAME': 'inventory', 83 | 'USERNAME': 'root', 84 | 'HOST': 'localhost', 85 | 'PORT': 3306, 86 | 'PASSWORD': '', # Your Password 87 | } 88 | } 89 | 90 | 91 | # Password validation 92 | # https://docs.djangoproject.com/en/3.1/ref/settings/#auth-password-validators 93 | 94 | AUTH_PASSWORD_VALIDATORS = [ 95 | { 96 | 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator', 97 | }, 98 | { 99 | 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator', 100 | }, 101 | { 102 | 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator', 103 | }, 104 | { 105 | 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator', 106 | }, 107 | ] 108 | 109 | 110 | # Internationalization 111 | # https://docs.djangoproject.com/en/3.1/topics/i18n/ 112 | 113 | LANGUAGE_CODE = 'en-us' 114 | 115 | TIME_ZONE = 'UTC' 116 | 117 | USE_I18N = True 118 | 119 | USE_L10N = True 120 | 121 | USE_TZ = True 122 | 123 | 124 | CRISPY_TEMPLATE_PACK = 'bootstrap4' 125 | # Static files (CSS, JavaScript, Images) 126 | # https://docs.djangoproject.com/en/3.1/howto/static-files/ 127 | 128 | STATIC_URL = '/static/' 129 | 130 | MEDIA_ROOT = (BASE_DIR/"media/") 131 | 132 | MEDIA_URL = '/media/' 133 | 134 | STATICFILES_DIRS = [ 135 | BASE_DIR / "static", 136 | ] 137 | 138 | STATIC_ROOT = (BASE_DIR/"asert/") 139 | 140 | LOGIN_REDIRECT_URL = 'dashboard-index' 141 | 142 | LOGIN_URL = 'user-login' 143 | -------------------------------------------------------------------------------- /inventoryproject/urls.py: -------------------------------------------------------------------------------- 1 | """inventoryproject URL Configuration 2 | 3 | The `urlpatterns` list routes URLs to views. For more information please see: 4 | https://docs.djangoproject.com/en/3.1/topics/http/urls/ 5 | Examples: 6 | Function views 7 | 1. Add an import: from my_app import views 8 | 2. Add a URL to urlpatterns: path('', views.home, name='home') 9 | Class-based views 10 | 1. Add an import: from other_app.views import Home 11 | 2. Add a URL to urlpatterns: path('', Home.as_view(), name='home') 12 | Including another URLconf 13 | 1. Import the include() function: from django.urls import include, path 14 | 2. Add a URL to urlpatterns: path('blog/', include('blog.urls')) 15 | """ 16 | from django.contrib import admin 17 | from django.urls import path, include 18 | from django.contrib.auth import views as auth_views 19 | from user import views as user_views 20 | from django.conf import settings 21 | from django.conf.urls.static import static 22 | 23 | urlpatterns = [ 24 | path('admin/', admin.site.urls), 25 | path('', include('dashboard.urls')), 26 | path('register/', user_views.register, name='user-register'), 27 | path('', auth_views.LoginView.as_view( 28 | template_name='user/login.html'), name='user-login'), 29 | path('profile/', user_views.profile, name='user-profile'), 30 | path('profile/update/', user_views.profile_update, 31 | name='user-profile-update'), 32 | path('logout/', auth_views.LogoutView.as_view(template_name='user/logout.html'), 33 | name='user-logout'), 34 | ] 35 | 36 | if settings.DEBUG: 37 | urlpatterns += static(settings.MEDIA_URL, 38 | document_root=settings.MEDIA_ROOT) 39 | -------------------------------------------------------------------------------- /inventoryproject/wsgi.py: -------------------------------------------------------------------------------- 1 | """ 2 | WSGI config for inventoryproject project. 3 | 4 | It exposes the WSGI callable as a module-level variable named ``application``. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/3.1/howto/deployment/wsgi/ 8 | """ 9 | 10 | import os 11 | 12 | from django.core.wsgi import get_wsgi_application 13 | 14 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'inventoryproject.settings') 15 | 16 | application = get_wsgi_application() 17 | -------------------------------------------------------------------------------- /manage.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | """Django's command-line utility for administrative tasks.""" 3 | import os 4 | import sys 5 | 6 | 7 | def main(): 8 | """Run administrative tasks.""" 9 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'inventoryproject.settings') 10 | try: 11 | from django.core.management import execute_from_command_line 12 | except ImportError as exc: 13 | raise ImportError( 14 | "Couldn't import Django. Are you sure it's installed and " 15 | "available on your PYTHONPATH environment variable? Did you " 16 | "forget to activate a virtual environment?" 17 | ) from exc 18 | execute_from_command_line(sys.argv) 19 | 20 | 21 | if __name__ == '__main__': 22 | main() 23 | -------------------------------------------------------------------------------- /media/default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KenBroTech/Django-Inventory-Management-System/f43bfb6439fa6103fd5d4d0e6e4073a386e82e53/media/default.png -------------------------------------------------------------------------------- /media/profile_images/KBT.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KenBroTech/Django-Inventory-Management-System/f43bfb6439fa6103fd5d4d0e6e4073a386e82e53/media/profile_images/KBT.png -------------------------------------------------------------------------------- /media/profile_images/pro.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KenBroTech/Django-Inventory-Management-System/f43bfb6439fa6103fd5d4d0e6e4073a386e82e53/media/profile_images/pro.jpg -------------------------------------------------------------------------------- /media/profile_images/pro_RgZ9xZj.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KenBroTech/Django-Inventory-Management-System/f43bfb6439fa6103fd5d4d0e6e4073a386e82e53/media/profile_images/pro_RgZ9xZj.jpg -------------------------------------------------------------------------------- /media/profile_images/profile-img1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KenBroTech/Django-Inventory-Management-System/f43bfb6439fa6103fd5d4d0e6e4073a386e82e53/media/profile_images/profile-img1.jpg -------------------------------------------------------------------------------- /media/profile_images/profile-img2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KenBroTech/Django-Inventory-Management-System/f43bfb6439fa6103fd5d4d0e6e4073a386e82e53/media/profile_images/profile-img2.jpg -------------------------------------------------------------------------------- /media/profile_images/profile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KenBroTech/Django-Inventory-Management-System/f43bfb6439fa6103fd5d4d0e6e4073a386e82e53/media/profile_images/profile.png -------------------------------------------------------------------------------- /media/profile_images/profile_5TOhE0J.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KenBroTech/Django-Inventory-Management-System/f43bfb6439fa6103fd5d4d0e6e4073a386e82e53/media/profile_images/profile_5TOhE0J.png -------------------------------------------------------------------------------- /media/profile_images/profile_tqghBQl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KenBroTech/Django-Inventory-Management-System/f43bfb6439fa6103fd5d4d0e6e4073a386e82e53/media/profile_images/profile_tqghBQl.png -------------------------------------------------------------------------------- /static/style.css: -------------------------------------------------------------------------------- 1 | body{ 2 | background: rgb(230, 227, 227); 3 | } 4 | .my-card:hover{ 5 | transform: scale(1.1); 6 | transition: 0.2s ease-in-out; 7 | } 8 | -------------------------------------------------------------------------------- /templates/dashboard/customer_index.html: -------------------------------------------------------------------------------- 1 | {% load crispy_forms_tags %} 2 |
    3 |
    4 |
    5 |
    6 |
    7 | Make Request 8 |
    9 |
    10 |
    11 | {% csrf_token %} 12 | {{ form|crispy }} 13 | 14 |
    15 |
    16 |
    17 |
    18 |
    19 |
    20 |
    21 | Orders Records 22 |
    23 |
    24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | {% for order in order %} 34 | {% if order.customer == user %} 35 | 36 | 37 | 38 | 39 | 40 | {% endif %} 41 | {% endfor %} 42 | 43 |
    ProductCategoryQuantity
    {{ order.name }}{{ order.name.category }}{{ order.order_quantity }}
    44 |
    45 |
    46 |
    47 |
    48 |
    -------------------------------------------------------------------------------- /templates/dashboard/customers.html: -------------------------------------------------------------------------------- 1 | {% extends 'partials/base.html' %} 2 | {% block title %}Customer Page{% endblock %} 3 | 4 | 5 | {% block content %} 6 | {% include 'partials/topside.html' %} 7 |
    8 |
    9 |
    10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | {% for customer in customer %} 21 | 22 | 24 | 25 | 26 | 27 | 28 | {% endfor %} 29 | 30 |
    FirstPhoneEmail
    View{{ customer.username }}{{ customer.profile.phone }}{{ customer.email }}
    31 |
    32 |
    33 | 34 | {% endblock %} -------------------------------------------------------------------------------- /templates/dashboard/customers_detail.html: -------------------------------------------------------------------------------- 1 | {% extends 'partials/base.html' %} 2 | {% block title %}Customer Detail Page{% endblock %} 3 | 4 | 5 | {% block content %} 6 | {% include 'partials/topside.html' %} 7 |
    8 |
    9 | 10 |
    11 |
    12 |
    13 |
    14 | Customer Detail Page 15 |
    16 |
    17 |
    18 | 19 | 20 | Porfile Information 21 |
    22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 |
    Name{{ customers.username }}
    Email{{ customers.email }}
    Phone{{ customers.profile.phone }}
    Address{{ customers.profile.address }}
    42 |
    43 |
    44 | profile-image 45 |
    46 |
    47 |
    48 |
    49 |
    50 | 51 | {% endblock %} -------------------------------------------------------------------------------- /templates/dashboard/index.html: -------------------------------------------------------------------------------- 1 | {% extends 'partials/base.html' %} 2 | {% block title %}Home Page{% endblock %} 3 | 4 | {% block content %} 5 | {% if user.is_authenticated and user.is_staff and user.is_superuser %} 6 | {% include 'partials/topside.html' %} 7 |
    8 |
    9 |
    10 |
    11 | 12 | 51 |
    52 |
    53 |
    54 |
    55 |
    56 |
    57 | 58 | 97 |
    98 |
    99 |
    100 |
    101 | {% else %} 102 | {% include 'dashboard/customer_index.html' %} 103 | {% endif%} 104 | 105 | {% endblock %} -------------------------------------------------------------------------------- /templates/dashboard/order.html: -------------------------------------------------------------------------------- 1 | {% extends 'partials/base.html' %} 2 | {% block title %}Order Page{% endblock %} 3 | 4 | {% block content %} 5 | {% include 'partials/topside.html' %} 6 |
    7 |
    8 |
    9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | {% for order in order %} 20 | 21 | 22 | 23 | 24 | 25 | 26 | {% endfor %} 27 | 28 |
    ProductCategoryQuantityOdered by
    {{ order.name }}{{ order.name.category }}{{ order.order_quantity }}{{ order.customer.username }}
    29 |
    30 |
    31 | 32 | {% endblock %} -------------------------------------------------------------------------------- /templates/dashboard/products.html: -------------------------------------------------------------------------------- 1 | {% extends 'partials/base.html' %} 2 | {% block title %}Products Page{% endblock %} 3 | {% load crispy_forms_tags %} 4 | 5 | {% block content %} 6 | {% include 'partials/topside.html' %} 7 |
    8 |
    9 | {% if messages %} 10 | {% for message in messages %} 11 |
    12 | {{ message }} 13 |
    14 | {% endfor %} 15 | {% endif %} 16 |
    17 |
    Add New Products
    18 |
    19 |
    20 | {% csrf_token %} 21 | {{ form|crispy }} 22 | 23 |
    24 |
    25 |
    26 |
    27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | {% for product in product %} 38 | 39 | 40 | 41 | 42 | 48 | 49 | {% endfor %} 50 | 51 |
    NameCategoryQuantityActivity
    {{ product.name }}{{ product.category }}{{ product.quantity }} 43 | Edit 45 | Delete 47 |
    52 |
    53 |
    54 | {% endblock %} -------------------------------------------------------------------------------- /templates/dashboard/products_delete.html: -------------------------------------------------------------------------------- 1 | {% extends 'partials/base.html' %} 2 | {% block title %}Product Delete Page{% endblock %} 3 | 4 | {% block content %} 5 | 6 |
    7 |
    8 |
    9 |

    Delete Item

    10 |
    11 |
    12 |
    13 |

    Are you sure, you want to delete {{ item }}?

    14 |
    15 | {% csrf_token %} 16 | {{ form }} 17 | Cancel 18 | 19 |
    20 |
    21 |
    22 |
    23 | {% endblock %} -------------------------------------------------------------------------------- /templates/dashboard/products_detail.html: -------------------------------------------------------------------------------- 1 | {% extends 'partials/base.html' %} 2 | {% block title %}Products Edit Page{% endblock %} 3 | {% load crispy_forms_tags %} 4 | 5 | {% block content %} 6 |
    7 |
    8 |

    Order {{ objects.name }}

    9 |
    10 |
    11 | {% csrf_token %} 12 | {{ form|crispy }} 13 | 14 |
    15 |
    16 |
    17 | {% endblock %} -------------------------------------------------------------------------------- /templates/dashboard/products_edit.html: -------------------------------------------------------------------------------- 1 | {% extends 'partials/base.html' %} 2 | {% block title %}Products Edit Page{% endblock %} 3 | {% load crispy_forms_tags %} 4 | 5 | {% block content %} 6 |
    7 |
    8 |

    Edit Item

    9 |
    10 |
    11 | {% csrf_token %} 12 | {{ form|crispy }} 13 | 14 |
    15 |
    16 |
    17 | {% endblock %} -------------------------------------------------------------------------------- /templates/partials/base.html: -------------------------------------------------------------------------------- 1 | {% load static %} 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 13 | 14 | 15 | 17 | 18 | 19 | 20 | 21 | 22 | {% block title %}{% endblock %} 23 | 24 | 25 | 26 | {% include 'partials/nav.html' %} 27 | 28 |
    29 | 30 | {% block content %} 31 | 32 | {% endblock %} 33 |
    34 | 35 | 36 | 37 | 38 | 39 | 42 | 45 | 46 | 47 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /templates/partials/nav.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /templates/partials/topside.html: -------------------------------------------------------------------------------- 1 |
    2 |
    3 |
    4 |
    5 | Information 6 |
    7 |
    8 | 9 |

    New Information

    10 |
    11 |
    12 |
    13 |
    14 | 55 |
    -------------------------------------------------------------------------------- /templates/user/login.html: -------------------------------------------------------------------------------- 1 | {% extends 'partials/base.html' %} 2 | {% block title %}Login Page{% endblock %} 3 | {% load crispy_forms_tags %} 4 | 5 | {% block content %} 6 |
    7 |
    8 |
    9 |

    Login Page

    10 |
    11 |
    12 | {% csrf_token %} 13 | {{ form|crispy }} 14 | 15 |
    16 |
    17 |
    18 |
    19 | 20 | 21 | {% endblock %} -------------------------------------------------------------------------------- /templates/user/logout.html: -------------------------------------------------------------------------------- 1 | {% extends 'partials/base.html' %} 2 | {% block title %}Logout Page{% endblock %} 3 | {% load crispy_forms_tags %} 4 | 5 | {% block content %} 6 |
    7 |
    8 |
    9 |

    Logout Page

    10 |
    11 |
    12 |
    You have been logged out
    13 |
    14 | Login 15 |
    16 |
    17 |
    18 | 19 | 20 | {% endblock %} -------------------------------------------------------------------------------- /templates/user/profile.html: -------------------------------------------------------------------------------- 1 | {% extends 'partials/base.html' %} 2 | {% block title %}Customer Page{% endblock %} 3 | 4 | {% block content %} 5 |
    6 |
    7 |
    8 |
    9 |
    10 | Customer Detail Page 11 |
    12 |
    13 |
    14 | 15 | 16 | Porfile Information 17 | Edit 18 |
    19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 |
    Name{{ user.username }}
    Email{{ user.email }}
    Phone{{ user.profile.phone }}
    Address{{ user.profile.address }}
    39 |
    40 |
    41 | profile-image 42 |
    43 |
    44 |
    45 |
    46 |
    47 | 48 | {% endblock %} -------------------------------------------------------------------------------- /templates/user/profile_update.html: -------------------------------------------------------------------------------- 1 | {% extends 'partials/base.html' %} 2 | {% block title %}Customer Page{% endblock %} 3 | {% load crispy_forms_tags %} 4 | {% block content %} 5 |
    6 |
    7 |
    8 |
    9 |
    10 | Customer Detail Page 11 |
    12 |
    13 |
    14 |
    15 | {% csrf_token %} 16 | {{ u_form|crispy }} 17 | {{ p_form|crispy }} 18 | 19 |
    20 |
    21 |
    22 |
    23 |
    24 |
    25 | 26 | {% endblock %} -------------------------------------------------------------------------------- /templates/user/register.html: -------------------------------------------------------------------------------- 1 | {% extends 'partials/base.html' %} 2 | {% block title %}Register Page{% endblock %} 3 | {% load crispy_forms_tags %} 4 | 5 | {% block content %} 6 |
    7 |
    8 |
    9 |

    Register Page

    10 |
    11 |
    12 | {% csrf_token %} 13 | {{ form|crispy }} 14 | 15 |
    16 |
    17 |
    18 |
    19 | 20 | 21 | {% endblock %} -------------------------------------------------------------------------------- /user/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KenBroTech/Django-Inventory-Management-System/f43bfb6439fa6103fd5d4d0e6e4073a386e82e53/user/__init__.py -------------------------------------------------------------------------------- /user/__pycache__/__init__.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KenBroTech/Django-Inventory-Management-System/f43bfb6439fa6103fd5d4d0e6e4073a386e82e53/user/__pycache__/__init__.cpython-39.pyc -------------------------------------------------------------------------------- /user/__pycache__/admin.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KenBroTech/Django-Inventory-Management-System/f43bfb6439fa6103fd5d4d0e6e4073a386e82e53/user/__pycache__/admin.cpython-39.pyc -------------------------------------------------------------------------------- /user/__pycache__/apps.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KenBroTech/Django-Inventory-Management-System/f43bfb6439fa6103fd5d4d0e6e4073a386e82e53/user/__pycache__/apps.cpython-39.pyc -------------------------------------------------------------------------------- /user/__pycache__/forms.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KenBroTech/Django-Inventory-Management-System/f43bfb6439fa6103fd5d4d0e6e4073a386e82e53/user/__pycache__/forms.cpython-39.pyc -------------------------------------------------------------------------------- /user/__pycache__/models.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KenBroTech/Django-Inventory-Management-System/f43bfb6439fa6103fd5d4d0e6e4073a386e82e53/user/__pycache__/models.cpython-39.pyc -------------------------------------------------------------------------------- /user/__pycache__/signals.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KenBroTech/Django-Inventory-Management-System/f43bfb6439fa6103fd5d4d0e6e4073a386e82e53/user/__pycache__/signals.cpython-39.pyc -------------------------------------------------------------------------------- /user/__pycache__/views.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KenBroTech/Django-Inventory-Management-System/f43bfb6439fa6103fd5d4d0e6e4073a386e82e53/user/__pycache__/views.cpython-39.pyc -------------------------------------------------------------------------------- /user/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | from .models import Profile 3 | 4 | # Register your models here. 5 | admin.site.register(Profile) 6 | -------------------------------------------------------------------------------- /user/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class UserConfig(AppConfig): 5 | name = 'user' 6 | 7 | def ready(self): 8 | from user import signals 9 | -------------------------------------------------------------------------------- /user/forms.py: -------------------------------------------------------------------------------- 1 | from django import forms 2 | from django.contrib.auth.forms import UserCreationForm 3 | from django.contrib.auth.models import User 4 | from .models import Profile 5 | 6 | 7 | class CreateUserForm(UserCreationForm): 8 | email = forms.EmailField() 9 | 10 | class Meta: 11 | model = User 12 | fields = ['username', 'email', 'password1', 'password2'] 13 | 14 | 15 | class UserUpdateForm(forms.ModelForm): 16 | class Meta: 17 | model = User 18 | fields = ['username', 'email'] 19 | 20 | 21 | class ProfileUpdateForm(forms.ModelForm): 22 | class Meta: 23 | model = Profile 24 | fields = ['phone', 'address', 'image'] 25 | -------------------------------------------------------------------------------- /user/migrations/0001_initial.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.1.7 on 2021-03-18 06:15 2 | 3 | from django.conf import settings 4 | from django.db import migrations, models 5 | import django.db.models.deletion 6 | 7 | 8 | class Migration(migrations.Migration): 9 | 10 | initial = True 11 | 12 | dependencies = [ 13 | migrations.swappable_dependency(settings.AUTH_USER_MODEL), 14 | ] 15 | 16 | operations = [ 17 | migrations.CreateModel( 18 | name='Profile', 19 | fields=[ 20 | ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), 21 | ('address', models.CharField(max_length=200)), 22 | ('phone', models.CharField(max_length=50)), 23 | ('image', models.ImageField(default='default.png', upload_to='profile_images')), 24 | ('customer', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), 25 | ], 26 | ), 27 | ] 28 | -------------------------------------------------------------------------------- /user/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KenBroTech/Django-Inventory-Management-System/f43bfb6439fa6103fd5d4d0e6e4073a386e82e53/user/migrations/__init__.py -------------------------------------------------------------------------------- /user/migrations/__pycache__/0001_initial.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KenBroTech/Django-Inventory-Management-System/f43bfb6439fa6103fd5d4d0e6e4073a386e82e53/user/migrations/__pycache__/0001_initial.cpython-39.pyc -------------------------------------------------------------------------------- /user/migrations/__pycache__/__init__.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KenBroTech/Django-Inventory-Management-System/f43bfb6439fa6103fd5d4d0e6e4073a386e82e53/user/migrations/__pycache__/__init__.cpython-39.pyc -------------------------------------------------------------------------------- /user/models.py: -------------------------------------------------------------------------------- 1 | from django.db import models 2 | from django.contrib.auth.models import User 3 | 4 | # Create your models here. 5 | 6 | 7 | class Profile(models.Model): 8 | customer = models.OneToOneField(User, on_delete=models.CASCADE) 9 | address = models.CharField(max_length=200) 10 | phone = models.CharField(max_length=50) 11 | image = models.ImageField(default='default.png', 12 | upload_to='profile_images') 13 | 14 | def __str__(self): 15 | return f'{self.customer.username}-Profile' 16 | -------------------------------------------------------------------------------- /user/signals.py: -------------------------------------------------------------------------------- 1 | from django.db.models.signals import post_save 2 | from django.contrib.auth.models import User 3 | from .models import Profile 4 | from django.dispatch import receiver 5 | 6 | 7 | @receiver(post_save, sender=User) 8 | def create_profile(sender, instance, created, **kwargs): 9 | if created: 10 | Profile.objects.create(customer=instance) 11 | 12 | 13 | @receiver(post_save, sender=User) 14 | def save_profile(sender, instance, **kwargs): 15 | instance.profile.save() 16 | -------------------------------------------------------------------------------- /user/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /user/views.py: -------------------------------------------------------------------------------- 1 | from django.shortcuts import render, redirect 2 | from django.contrib.auth.forms import UserCreationForm 3 | from django.contrib.auth.models import Group 4 | from django.contrib.auth.decorators import login_required 5 | from .forms import CreateUserForm, UserUpdateForm, ProfileUpdateForm 6 | 7 | # Create your views here. 8 | 9 | 10 | def register(request): 11 | if request.method == 'POST': 12 | form = CreateUserForm(request.POST) 13 | if form.is_valid(): 14 | user = form.save() 15 | group = Group.objects.get(name='Customers') 16 | user.groups.add(group) 17 | return redirect('user-login') 18 | else: 19 | form = CreateUserForm() 20 | context = { 21 | 'form': form 22 | } 23 | return render(request, 'user/register.html', context) 24 | 25 | 26 | def profile(request): 27 | context = { 28 | 29 | } 30 | return render(request, 'user/profile.html', context) 31 | 32 | 33 | def profile_update(request): 34 | if request.method == 'POST': 35 | u_form = UserUpdateForm(request.POST, instance=request.user) 36 | p_form = ProfileUpdateForm( 37 | request.POST, request.FILES, instance=request.user.profile) 38 | if u_form.is_valid() and p_form.is_valid(): 39 | u_form.save() 40 | p_form.save() 41 | return redirect('user-profile') 42 | else: 43 | u_form = UserUpdateForm(instance=request.user) 44 | p_form = ProfileUpdateForm(instance=request.user.profile) 45 | 46 | context = { 47 | 'u_form': u_form, 48 | 'p_form': p_form, 49 | } 50 | return render(request, 'user/profile_update.html', context) 51 | --------------------------------------------------------------------------------