Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Merge pull request #7 from aarushiibisht/master
Top banner, side navigation bar and refactored apps
- Loading branch information
Showing
15 changed files
with
405 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -0,0 +1,70 @@ | ||
<template> | ||
<div class="row"> | ||
<div class="col-7"> | ||
<h1 class="h4 mb-4">{{heading}}</h1> | ||
</div> | ||
<div class="col-4"> | ||
<div class="btn-toolbar"> | ||
<div class="btn-group mr-4" role="group"> | ||
<div class="dropdown"> | ||
<button class="btn btn-sm btn-outline-secondary dropdown-toggle" href="#" role="button" id="dropdownMenuLink" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Sort by</button> | ||
<div class="dropdown-menu" aria-labelledby="dropdownMenuButton"> | ||
<a class="dropdown-item" href="#">Name</a> | ||
<a class="dropdown-item" href="#">Size</a> | ||
</div> | ||
</div> | ||
</div> | ||
<div class="btn-group mr-4" role="group"> | ||
<button class="btn btn-sm btn-outline-secondary list"><i class="fa fa-bars"></i></button> | ||
<button class="btn btn-sm btn-outline-secondary list"><i class="fa fa-th"></i></button> | ||
</div> | ||
</div> | ||
</div> | ||
<table class="table table-hover main-table"> | ||
<thead> | ||
<tr> | ||
<th scope="col">Name</th> | ||
<th scope="col">Size</th> | ||
<th scope="col">Last Modified</th> | ||
<th scope="col"></th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<tr v-for="resource in resources" | ||
:key="resource.resourceId"> | ||
<th scope="row"><i class="fa fa-folder resource-name-icon"></i> | ||
{{resource.name}}</th> | ||
<td>{{resource.size}}</td> | ||
<td>{{resource.lastModified}}</td> | ||
<td><b-button class="btn btn-info btn-sm transfer">Transfer</b-button></td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
export default { | ||
name: "StorageResources.vue", | ||
props: ["resourcesList", "title"], | ||
data: function(){ | ||
return { | ||
resources: this.resourcesList, | ||
heading: this.title | ||
} | ||
}, | ||
} | ||
</script> | ||
|
||
<style scoped> | ||
.main-table{ | ||
width: 83%!important; | ||
} | ||
.transfer { | ||
width: 45%; | ||
} | ||
.resource-name-icon{ | ||
padding-right: 3%; | ||
font-size:smaller; | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -0,0 +1,34 @@ | ||
import Vue from 'vue' | ||
import StorageResources from "./containers/StorageResources" | ||
import { BootstrapVue } from 'bootstrap-vue' | ||
|
||
Vue.use(BootstrapVue); | ||
import 'bootstrap/dist/css/bootstrap.css' | ||
import 'bootstrap-vue/dist/bootstrap-vue.css' | ||
|
||
window.onload = function() { | ||
new Vue({ | ||
render(h) { | ||
return h(StorageResources, { | ||
props: { | ||
resourcesList: this.resourcesList, | ||
title: this.title | ||
} | ||
}); | ||
|
||
}, | ||
data() { | ||
return { | ||
resourcesList: null, | ||
}; | ||
}, | ||
beforeMount() { | ||
if (this.$el.dataset.resourcesList) { | ||
this.resourcesList = JSON.parse(this.$el.dataset.resourcesList); | ||
} | ||
if (this.$el.dataset.title) { | ||
this.title = this.$el.dataset.title; | ||
} | ||
} | ||
}).$mount("#resources") | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -0,0 +1,14 @@ | ||
{% extends "base.html" %} | ||
|
||
{% load static %} | ||
{% load render_bundle from webpack_loader %} | ||
|
||
{% block scripts %} | ||
{% render_bundle "chunk-vendors" config='WORKSPACE'%} | ||
{% render_bundle bundle_name config='WORKSPACE'%} | ||
{% endblock scripts %} | ||
|
||
{% block app %} | ||
<div id={{ bundle_name }}> | ||
</div> | ||
{% endblock app %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -0,0 +1,6 @@ | ||
{% extends "container-header.html" %} | ||
|
||
{% block app %} | ||
<div id={{ bundle_name }} data-resources-list="{{ data }}" data-title ="{{ title }}"></div> | ||
{% endblock app %} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -1,13 +1,6 @@ | ||
{% extends "base.html" %} | ||
{% extends "container-header.html" %} | ||
|
||
{% load static %} | ||
{% load render_bundle from webpack_loader %} | ||
|
||
{% block scripts %} | ||
{% render_bundle "chunk-vendors" config='WORKSPACE'%} | ||
{% render_bundle "storage" config='WORKSPACE'%} | ||
{% endblock scripts %} | ||
{% block app %} | ||
<div id="storage" data-storage-list="{{ data }}"></div> | ||
<div id={{ bundle_name }} data-storage-list="{{ data }}" data-title ="{{ title }}"></div> | ||
{% endblock app %} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -1,6 +1,7 @@ | ||
from . import views | ||
from django.urls import path | ||
from django.conf.urls import url | ||
|
||
urlpatterns = [ | ||
path('storage/', views.storage) | ||
url(r'^storage/$', views.storage), | ||
url(r'^storage/(?P<storage_id>[^/]+)/$', views.resources) | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.