Show information in folder panel if ignore patterns are active, fixes #1279

This commit is contained in:
Karol Różycki 2015-01-27 15:27:44 +01:00
parent ae1d3b3dd3
commit 952e51ac75
3 changed files with 16 additions and 1 deletions

View File

@ -302,6 +302,15 @@ func restGetModel(m *model.Model, w http.ResponseWriter, r *http.Request) {
res["state"], res["stateChanged"] = m.State(folder)
res["version"] = m.CurrentLocalVersion(folder) + m.RemoteLocalVersion(folder)
ignorePatterns, _, _ := m.GetIgnores(folder)
res["ignorePatterns"] = false
for _, line := range ignorePatterns {
if len(line) > 0 && !strings.HasPrefix(line, "//") {
res["ignorePatterns"] = true
break
}
}
w.Header().Set("Content-Type", "application/json; charset=utf-8")
json.NewEncoder(w).Encode(res)
}

View File

@ -224,6 +224,12 @@
<span translate>Yes</span>
</td>
</tr>
<tr ng-if="model[folder.ID].ignorePatterns">
<th><span class="glyphicon glyphicon-minus"></span>&emsp;<span translate>Ignore Patterns</span></th>
<td class="text-right">
<span translate>Yes</span>
</td>
</tr>
<tr ng-if="folder.IgnorePerms">
<th><span class="glyphicon glyphicon-unchecked"></span>&emsp;<span translate>Ignore Permissions</span></th>
<td class="text-right">

File diff suppressed because one or more lines are too long