Projet

Général

Profil

0001-manager-csv-import-translation-row-action-34748.patch

Benjamin Dauvergne, 11 juillet 2019 11:36

Télécharger (1,64 ko)

Voir les différences:

Subject: [PATCH] manager: csv import, translation row action (#34748)

 src/authentic2/csv_import.py                             | 9 +++++++++
 .../templates/authentic2/manager/user_import_report.html | 2 +-
 2 files changed, 10 insertions(+), 1 deletion(-)
src/authentic2/csv_import.py
223 223
                return cell
224 224
        raise KeyError(header.name)
225 225

  
226
    ACTIONS = {
227
        'update': _('update'),
228
        'create': _('create'),
229
    }
230

  
231
    @property
232
    def action_display(self):
233
        return self.ACTIONS.get(self.action, self.action)
234

  
226 235
    def __iter__(self):
227 236
        return iter(self.cells)
228 237

  
src/authentic2/manager/templates/authentic2/manager/user_import_report.html
123 123
                    {{ cell.value }}
124 124
                  </td>
125 125
                {% endfor %}
126
                <td class="row-action">{% firstof row.action "-" %}</td>
126
                <td class="row-action">{% firstof row.action_display "-" %}</td>
127 127
              </tr>
128 128
            {% endfor %}
129 129
          </tbody>
130
-