Skip to content

Commit

Permalink
Merge fbd6aa3 into 2a6c14c
Browse files Browse the repository at this point in the history
  • Loading branch information
azaroth42 committed Jun 29, 2020
2 parents 2a6c14c + fbd6aa3 commit 358fb7f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,13 @@ define([
self.newFacet(card);
};
}, this);
_.each(response.graphs, function(graph) {
var graphs = response.graphs.sort(function(a,b) {return a.name > b.name ? 1 : -1;});
_.each(graphs, function(graph) {
if (graph.isresource && graph.isactive) {
var graphCards = _.filter(response.cards, function(card) {
return card.graph_id === graph.graphid && card.nodes.length > 0;
});
graphCards.sort(function(a,b) {return a.name > b.name ? 1 : -1;});
if (graphCards.length > 0) {
_.each(graphCards, function(card) {
card.getGraph = function() {
Expand Down
7 changes: 5 additions & 2 deletions arches/app/views/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
from arches.app.datatypes.datatypes import DataTypeFactory
from arches.app.utils.permission_backend import get_createable_resource_types, user_is_resource_reviewer


class BaseManagerView(TemplateView):

template_name = ""
Expand All @@ -39,8 +38,11 @@ def get_context_data(self, **kwargs):
for plugin in models.Plugin.objects.all().order_by("sortorder"):
if self.request.user.has_perm("view_plugin", plugin):
context["plugins"].append(plugin)

createable = get_createable_resource_types(self.request.user)
createable.sort(key=lambda x: x.name)
context["createable_resources"] = JSONSerializer().serialize(
get_createable_resource_types(self.request.user),
createable,
exclude=[
"functions",
"ontology",
Expand All @@ -54,6 +56,7 @@ def get_context_data(self, **kwargs):
"author",
],
)

context["notifications"] = models.UserXNotification.objects.filter(recipient=self.request.user, isread=False)
context["nav"] = {
"icon": "fa fa-chevron-circle-right",
Expand Down

0 comments on commit 358fb7f

Please sign in to comment.