From a6b2e09383b50095ba6213b9f6bd6b82d53a36f6 Mon Sep 17 00:00:00 2001 From: RomanSteinberg <romanofficial@yandex.com> Date: Fri, 4 Sep 2015 12:25:54 +0300 Subject: [PATCH] subjects upload partial fix --- .../views/office/subjects/upload.twig | 34 ++++++++++--------- 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/~dev_rating/application/views/office/subjects/upload.twig b/~dev_rating/application/views/office/subjects/upload.twig index 54082e757..9d18176b5 100644 --- a/~dev_rating/application/views/office/subjects/upload.twig +++ b/~dev_rating/application/views/office/subjects/upload.twig @@ -22,21 +22,6 @@ <h2 class="Margin5 Bottom">Пакетная загрузка предметов</h2> - {% if UploadingResult is not empty %} - <p>Обработано: {{ UploadingResult.RecordsCount }}, РІ том числе СЃ ошибками: {{ UploadingResult.ErrorsCount }}, - найдены РІ базе: {{ UploadingResult.RecordsExistsCount }}.</p> - - {% if UploadingResult.Errors is not empty %} - {% set res %} - {% for item in UploadingResult.Errors %} - <li>Строка #{{ item.Row }}: {{ item.Info }}</li> - {% endfor %} - {% endset %} - - {{ admin.message(warning, 'Возникли проблемы!', res) }} - {% endif %} - {% endif %} - <p>Рнструмент пакетной загрузки предметов предоставляет возможность добавлять РІ систему множество наименований предметов.</p> <p>Файл СЃРѕ СЃРїРёСЃРєРѕРј предметов представляет СЃРѕР±РѕР№ <code>.txt</code>-файл, который должен иметь следующий формат:</p> <p><pre>Название;Аббревиатура</pre></p> @@ -52,8 +37,25 @@ </select> </div> <div class="ClearFix"> - <input name="students" class="defaultForm FullWidth P1Width FLeft" type="file"> + <input name="subjects" class="defaultForm FullWidth P1Width FLeft" type="file"> <input type="submit" class="defaultForm GreenButton P2Width noMargin FRight" value="Загрузить"> </div> </form> + + {% if UploadingResult is not empty %} + <h2 class="Margin5 Bottom">Результат добавления</h2> + <p>Обработано: {{ UploadingResult.RecordsCount }}, РІ том числе СЃ ошибками: {{ UploadingResult.ErrorsCount }}, + найдены РІ базе: {{ UploadingResult.RecordsExistsCount }}.</p> + + {% if UploadingResult.Errors is not empty %} + {% set res %} + {% for item in UploadingResult.Errors %} + <li>Строка #{{ item.Row }}: {{ item.Info }}</li> + {% endfor %} + {% endset %} + + {{ admin.message(warning, 'Возникли проблемы!', res) }} + {% endif %} + {% endif %} + {% endblock %} -- GitLab