Merge branch 'master' of 192.168.0.2:photoassistant
This commit is contained in:
4
files.py
4
files.py
@@ -271,6 +271,8 @@ def files_sp():
|
|||||||
noo, grouping, how_many, offset, size, folders, cwd, root = ViewingOptions( request )
|
noo, grouping, how_many, offset, size, folders, cwd, root = ViewingOptions( request )
|
||||||
entries=[]
|
entries=[]
|
||||||
|
|
||||||
|
people = Person.query.all()
|
||||||
|
|
||||||
# per storage path, add entries to view
|
# per storage path, add entries to view
|
||||||
settings=Settings.query.first()
|
settings=Settings.query.first()
|
||||||
paths = settings.storage_path.split("#")
|
paths = settings.storage_path.split("#")
|
||||||
@@ -283,7 +285,7 @@ def files_sp():
|
|||||||
else:
|
else:
|
||||||
entries+=GetEntriesInFlatView( cwd, prefix, noo, offset, how_many )
|
entries+=GetEntriesInFlatView( cwd, prefix, noo, offset, how_many )
|
||||||
|
|
||||||
return render_template("files.html", page_title='View Files (Storage Path)', entry_data=entries, noo=noo, grouping=grouping, how_many=how_many, offset=offset, size=size, folders=folders, cwd=cwd, root=root )
|
return render_template("files.html", page_title='View Files (Storage Path)', entry_data=entries, noo=noo, grouping=grouping, how_many=how_many, offset=offset, size=size, folders=folders, cwd=cwd, root=root, people=people )
|
||||||
|
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
|
|||||||
2
main.py
2
main.py
@@ -20,8 +20,10 @@ import socket
|
|||||||
|
|
||||||
####################################### Flask App globals #######################################
|
####################################### Flask App globals #######################################
|
||||||
PROD_HOST="pa_web"
|
PROD_HOST="pa_web"
|
||||||
|
|
||||||
hostname = socket.gethostname()
|
hostname = socket.gethostname()
|
||||||
print( "Running on: {}".format( hostname) )
|
print( "Running on: {}".format( hostname) )
|
||||||
|
|
||||||
app = Flask(__name__)
|
app = Flask(__name__)
|
||||||
### what is this value? I gather I should change it?
|
### what is this value? I gather I should change it?
|
||||||
|
|
||||||
|
|||||||
@@ -12,7 +12,6 @@
|
|||||||
caption-side: bottom;
|
caption-side: bottom;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
<form id="main_form" method="POST">
|
<form id="main_form" method="POST">
|
||||||
<input type="hidden" name="cwd" id="cwd" value="{{cwd}}">
|
<input type="hidden" name="cwd" id="cwd" value="{{cwd}}">
|
||||||
@@ -467,7 +466,16 @@ $.contextMenu({
|
|||||||
details: { name: "Details..." },
|
details: { name: "Details..." },
|
||||||
view: { name: "View File" },
|
view: { name: "View File" },
|
||||||
sep: "---",
|
sep: "---",
|
||||||
move: { name: "Move selected file(s) to new storage folder" }
|
move: { name: "Move selected file(s) to new storage folder" },
|
||||||
|
sep2: "---",
|
||||||
|
ai: {
|
||||||
|
name: "Scan file for faces",
|
||||||
|
items: {
|
||||||
|
{% for p in people %}
|
||||||
|
"ai-{{p.tag}}": {"name": "{{p.tag}}"},
|
||||||
|
{% endfor %}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if( SelContainsBinAndNotBin() ) {
|
if( SelContainsBinAndNotBin() ) {
|
||||||
item_list['both']= { name: 'Cannot delete and restore at same time', disabled: true }
|
item_list['both']= { name: 'Cannot delete and restore at same time', disabled: true }
|
||||||
@@ -485,6 +493,7 @@ $.contextMenu({
|
|||||||
if( key == "move" ) { MoveDBox() }
|
if( key == "move" ) { MoveDBox() }
|
||||||
if( key == "del" ) { DelDBox('Delete') }
|
if( key == "del" ) { DelDBox('Delete') }
|
||||||
if( key == "undel" ) { DelDBox('Restore') }
|
if( key == "undel" ) { DelDBox('Restore') }
|
||||||
|
if( key.startsWith("ai")) { console.log( key +'was chosen')}
|
||||||
},
|
},
|
||||||
items: item_list
|
items: item_list
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user