# Path: findingaids/fa/urls.py
# TITLE_LETTERS = '[a-zA-Z]'
# EADID_URL_REGEX = "(?P<id>[-_A-Za-z0-9.]+)"
# 
# Path: findingaids/fa_admin/views.py
# def main(request):
# def list_files(request, archive):
# def archive_order(request):
# def current_archive(request):
# def logout(request):
# def _prepublication_check(request, filename, archive, mode='publish', xml=None):
# def publish(request):
# def preview(request, archive):
# def prepared_eadxml(request, archive, filename):
#         def get_log_message(arg):
# def prepared_ead(request, archive, filename, mode):
# def list_published(request, archive=None):
# def delete_ead(request, id, archive=None):
# def init_ldap_user(request):


from django.conf.urls import url, patterns, include
from django.contrib.auth import views as authviews
from findingaids.fa.urls import EADID_URL_REGEX, findingaid_urlpatterns
from findingaids.fa_admin import views
#
#       http://www.apache.org/licenses/LICENSE-2.0
#
#   Unless required by applicable law or agreed to in writing, software
#   distributed under the License is distributed on an "AS IS" BASIS,
#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#   See the License for the specific language governing permissions and
#   limitations under the License.


urlpatterns = [
    url(r'^$', views.main, name="index"),
    url(r'^(?P<archive>[a-z0-9-]+)/files/', views.list_files, name='files'),
    url(r'^archives/order/', views.archive_order, name='archive-order'),
    url(r'^archives/current/', views.current_archive, name='current-archive'),
    url(r'^accounts/logout$', views.logout, name="logout"),
    url(r'^publish/$', views.publish, name="publish-ead"),
    url(r'^(?P<archive>[a-z0-9-]+)/preview/$', views.preview, name="preview-ead"),
    url(r'^(?P<archive>[a-z0-9-]+)/(?P<filename>[^/]+)/prep/$',
        views.prepared_eadxml, name="prep-ead"),
    url(r'^(?P<archive>[a-z0-9-]+)/(?P<filename>[^/]+)/prep/diff/',
        views.prepared_ead, {'mode': 'diff'}, name="prep-ead-diff"),
    url(r'^(?P<archive>[a-z0-9-]+)/(?P<filename>[^/]+)/prep/about/',
        views.prepared_ead, {'mode': 'summary'}, name="prep-ead-about"),
    # include finding aid document urls in preview mode
    url(r'^preview/documents/', include(findingaid_urlpatterns, namespace='preview'),
            {'preview': True}),
    url(r'^documents/$', views.list_published, name="list-published"),
    url(r'^(?P<archive>[a-z0-9-]+)/documents/$', views.list_published, name="published-by-archive"),
    url(r'^documents/%s/delete/$' % EADID_URL_REGEX, views.delete_ead, name="delete-ead"),

# Path: findingaids/fa/urls.py
# TITLE_LETTERS = '[a-zA-Z]'
# EADID_URL_REGEX = "(?P<id>[-_A-Za-z0-9.]+)"
# 
# Path: findingaids/fa_admin/views.py
# def main(request):
# def list_files(request, archive):
# def archive_order(request):
# def current_archive(request):
# def logout(request):
# def _prepublication_check(request, filename, archive, mode='publish', xml=None):
# def publish(request):
# def preview(request, archive):
# def prepared_eadxml(request, archive, filename):
#         def get_log_message(arg):
# def prepared_ead(request, archive, filename, mode):
# def list_published(request, archive=None):
# def delete_ead(request, id, archive=None):
# def init_ldap_user(request):


# Path: findingaids/fa_admin/urls.py
from django.conf.urls import url, patterns, include
from django.contrib.auth import views as authviews
from findingaids.fa.urls import EADID_URL_REGEX, findingaid_urlpatterns
from findingaids.fa_admin import views

#
#       http://www.apache.org/licenses/LICENSE-2.0
#
#   Unless required by applicable law or agreed to in writing, software
#   distributed under the License is distributed on an "AS IS" BASIS,
#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#   See the License for the specific language governing permissions and
#   limitations under the License.


urlpatterns = [
    url(r'^$', views.main, name="index"),
    url(r'^(?P<archive>[a-z0-9-]+)/files/', views.list_files, name='files'),
    url(r'^archives/order/', views.archive_order, name='archive-order'),
    url(r'^archives/current/', views.current_archive, name='current-archive'),
    url(r'^accounts/logout$', views.logout, name="logout"),
    url(r'^publish/$', views.publish, name="publish-ead"),
    url(r'^(?P<archive>[a-z0-9-]+)/preview/$', views.preview, name="preview-ead"),
    url(r'^(?P<archive>[a-z0-9-]+)/(?P<filename>[^/]+)/prep/$',
        views.prepared_eadxml, name="prep-ead"),
    url(r'^(?P<archive>[a-z0-9-]+)/(?P<filename>[^/]+)/prep/diff/',
        views.prepared_ead, {'mode': 'diff'}, name="prep-ead-diff"),
    url(r'^(?P<archive>[a-z0-9-]+)/(?P<filename>[^/]+)/prep/about/',
        views.prepared_ead, {'mode': 'summary'}, name="prep-ead-about"),
    # include finding aid document urls in preview mode
    url(r'^preview/documents/', include(findingaid_urlpatterns, namespace='preview'),
            {'preview': True}),
    url(r'^documents/$', views.list_published, name="list-published"),
    url(r'^(?P<archive>[a-z0-9-]+)/documents/$', views.list_published, name="published-by-archive"),
    url(r'^documents/%s/delete/$' % EADID_URL_REGEX, views.delete_ead, name="delete-ead"),

    url(r'^(?P<archive>[a-z0-9-]+)/documents/%s/delete/$' % EADID_URL_REGEX, views.delete_ead,