4 changed files with 108 additions and 58 deletions
-
44searchapp/locale/ru/LC_MESSAGES/django.po
-
57searchapp/templates/searchapp/index.html
-
16searchapp/views.py
-
49taskapp/handle.sh
@ -0,0 +1,44 @@ |
|||||
|
# SOME DESCRIPTIVE TITLE. |
||||
|
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER |
||||
|
# This file is distributed under the same license as the PACKAGE package. |
||||
|
# Dmitry Novikov nerosketch@gmail.com, 2018. |
||||
|
# |
||||
|
#, fuzzy |
||||
|
msgid "" |
||||
|
msgstr "" |
||||
|
"Report-Msgid-Bugs-To: \n" |
||||
|
"POT-Creation-Date: 2018-04-09 11:15+0300\n" |
||||
|
"Last-Translator: Dmitry Novikov nerosketch@gmail.com\n" |
||||
|
"Language: ru\n" |
||||
|
"MIME-Version: 1.0\n" |
||||
|
"Content-Type: text/plain; charset=UTF-8\n" |
||||
|
"Content-Transfer-Encoding: 8bit\n" |
||||
|
"Plural-Forms: nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" |
||||
|
"%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n" |
||||
|
"%100>=11 && n%100<=14)? 2 : 3);\n" |
||||
|
|
||||
|
#: templates/searchapp/index.html:8 |
||||
|
#, python-format |
||||
|
msgid "Search by %(searchstring)s" |
||||
|
msgstr "Поиск по %(searchstring)s" |
||||
|
|
||||
|
#: templates/searchapp/index.html:16 |
||||
|
msgid "Change search string there" |
||||
|
msgstr "Измените строку поиска" |
||||
|
|
||||
|
#: templates/searchapp/index.html:21 |
||||
|
msgid "Find" |
||||
|
msgstr "Найти" |
||||
|
|
||||
|
#: templates/searchapp/index.html:46 templates/searchapp/index.html:75 |
||||
|
msgid "Nothing to found" |
||||
|
msgstr "Ничего не найдено" |
||||
|
|
||||
|
#: templates/searchapp/index.html:49 templates/searchapp/index.html:78 |
||||
|
msgid "You can change search string and try again" |
||||
|
msgstr "Вы можете изменить строку поиска и попробовать ещё раз" |
||||
|
|
||||
|
#: templates/searchapp/index.html:68 |
||||
|
#, python-format |
||||
|
msgid "Network state is %(netw_status)s" |
||||
|
msgstr "Сетевой статус: %(netw_status)s" |
||||
@ -1,49 +0,0 @@ |
|||||
#!/usr/bin/env bash |
|
||||
|
|
||||
FIRST="$1" # $1 - 'start' or 'change' |
|
||||
FAIL_MODE="$2" # $2 - mode |
|
||||
RESERVED="$3" # $3 - (dev ip) |
|
||||
STATE="$4" # $4 - state |
|
||||
AUTHOR_TEL="$5" # $5 - author telephone |
|
||||
RECIPIENT_TEL="$6" # $6 - recipient telephone |
|
||||
DESCR="$7" # $7 - description |
|
||||
ABON_FIO="$8" # $8 - abon fio |
|
||||
ABON_ADDR="$9" # $9 - abon address |
|
||||
ABON_TEL="${10}" # $10- abon telephone |
|
||||
ABON_GRP="${11}" # $11- имя группы абонента |
|
||||
|
|
||||
|
|
||||
text='' |
|
||||
if [[ "$FIRST" == "start" ]] |
|
||||
then |
|
||||
text="Нов" |
|
||||
else |
|
||||
text="Изм" |
|
||||
fi |
|
||||
|
|
||||
# Если сигнал самому себе то молчим |
|
||||
if [[ "$AUTHOR_TEL" == "$RECIPIENT_TEL" ]] |
|
||||
then |
|
||||
exit |
|
||||
fi |
|
||||
|
|
||||
# Если задача 'На выполнении' то молчим |
|
||||
if [[ "$STATE" == "C" ]] |
|
||||
then |
|
||||
exit |
|
||||
fi |
|
||||
|
|
||||
# Если задача завершена |
|
||||
if [[ "$STATE" == "F" ]] |
|
||||
then |
|
||||
text="Задача завершена" |
|
||||
# Меняем телефон назначения на телефон автора, т.к. при завершении |
|
||||
# идёт оповещение автору о выполнении |
|
||||
RECIPIENT_TEL="$AUTHOR_TEL" |
|
||||
fi |
|
||||
|
|
||||
FULLTEXT="$text: $ABON_FIO. $ABON_ADDR $ABON_TEL. $ABON_GRP. $FAIL_MODE. $DESCR" |
|
||||
|
|
||||
echo "TO $RECIPIENT_TEL: $FULLTEXT" |
|
||||
|
|
||||
/usr/bin/gammu-smsd-inject EMS $RECIPIENT_TEL -text "$FULLTEXT" -unicode |
|
||||
Write
Preview
Loading…
Cancel
Save
Reference in new issue